ERD MODELLING Flashcards
What is an ERD
A picture showing the information created, stored, and used by a business system.
What is cardinality and what are the different types?
refers to the number of instances in one entity
can be related to instances in another entity
One instance in an entity refers to:
one and only one instance in the related entity (1:1)
one or many instances in the related entity (1:M)
Many or more instances in an entity refer to
Many or more instances in the related entity (M:N)
What is modality and what are the different types?
Refers to whether or not an instance of a child entity can exist without a related instance in the parent entity
Not Null means that an instance in the related entity
must exist for an instance in another entity
Null means that no instance in the related entity is necessary for an instance in another entity to be valid
What are dependent and independent entities
Independent Entity
Can exist without the help of another entity
Examples
Patient, Doctor, Insurance Company
Identifiers created from the entity’s own attributes
Dependent Entity
Child entity requires attributes from parent entity
to uniquely identify an instance
Identifier Contains at least one attribute from parent entity
Describe an intersection entity
Intersection entities are used in the resolution of a many to many relationship.
This resolution is done in order to store additional information which doesn’t fit into the attribute list of either entity in the M:M relationship.
For instance, in the instructor-course example given earlier, there is a M:M relationship between Course and Section.
A course can have many sections, and a section can have many courses. If we want to know how many students are registered in a particular class, we cannot store the information on either entity.
Using a suitable example and illustration discuss how a many-to-many relationship is implemented in a Relational database?
A many-to-many relationship occurs when multiple records in a table are associated with multiple records in another table .Relational database systems usually don't allow you to implement a direct many-to-many relationship between two tables. To avoid this problem, you can break the many-to-many relationship into two one-to-many relationships by using a third table, called a join table. Each record in a join table includes a match field that contains the value of the primary keys of the two tables it joins. (In the join table, these match fields are foreign keys.) A typical example of a many-to many relationship is one between students and classes. A student can register for many classes, and a class can include many students.
The following example includes a Students table, which contains a record for each student, and a Classes table, which contains a record for each class. A join table, Enrollments, creates two one-to-many relationships—one between each of the two tables.