Entity Relationship Data Model And Normalization Computer Science Essay Example
Entity Relationship Data Model And Normalization Computer Science Essay Example

Entity Relationship Data Model And Normalization Computer Science Essay Example

Available Only on StudyHippo
  • Pages: 2 (526 words)
  • Published: August 10, 2018
View Entire Sample
Text preview

Design an Entity-Relationship Data Model that outlines the data content and structure maintained by Petcare. Include the cardinality ratio and participation constraint for each relationship type. To create the Petcare database system, it is necessary to construct an Entity Relationship Diagram that depicts all entities and their relationships.

The ERD depicts the static connections between data that are stored and managed by the database. It illustrates the static relationships among data items. The next step involves determining the relationship of each entity, which includes Participation Constraint and Cardinality Ratio. In terms of Participation Constraint:

  1. There are two types of participation constraint: 'Total' and 'Partial' participation.
  2. A 'Total' participation constraint (mandatory participation) specifies that every member in the entity must participate as a m

    ...

    ember of another linked entity in the generalization.

  3. A 'Partial' participation constraint (optional participation) specifies that a member of the entity does not belong to any member of another linked entity in the generalization.
  4. Cardinality Ratio refers to a one-to-one relation between two entities that are linked solely by their primary key(s).

    The text discusses various relationships between entities in a database. The first type of relationship is called many-to-many, where two entities are connected without a primary key and may have redundancy errors. It is advisable to split this type into two relations: one-to-many and many-to-one. The second type, known as one-to-many or many-to-one, involves a relationship between two entities where the primary key(s) link to the foreign key(s). Moreover, the text presents an example of the Pet relationship in which each pet ha

View entire sample
Join StudyHippo to see entire essay

a single owner who can have multiple pets.

The owner can possess various types of pets, resulting in a total and one-to-many relationship between Pet and Owner. As for the relationship between Owner and Veterinarian, the owner would schedule appointments with the Veterinarian. In reality, an owner can have multiple appointments, and the Veterinarian is not limited to handling only one case.

The use of a relational database is prohibited under these circumstances. To address this problem, a new entity called 'Appointment' was introduced between Owner and Veterinarian. The Owner has the option to schedule an appointment prior to visiting the veterinarian, or they can choose to walk-in without an appointment. For the purpose of streamlining the database design, we consider the walk-in scenario as a new appointment as well.

Therefore, the relationship between the Owner and Appointment is Total and one to many. The Appointment is created by the pet owner and handled by the Veterinarian. However, some Veterinarians may not handle the appointment in special cases. Therefore, the relationship between Appointment and Veterinarian is Partial and many to one. As mentioned before, a Veterinarian can attend multiple appointments.

Moreover, the Veterinarian would provide multiple diagnoses, as the diagnosis is the result of the appointment conducted by the veterinarian. This relationship between the Veterinarian and Diagnosis is classified as Total and one to many. Hence, based on the entities and relationship design mentioned above, the initial ERD for Petcare is depicted below. This ERD illustrates the logical database design for Petcare and identifies a set of data elements that should be incorporated in the database.

Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New