Please enable JavaScript.
Coggle requires JavaScript to display documents.
CHAPTER 3: Entity-Relationship (E-R) Model and Normalization, Picture1
…
-
-ROSE-
Example
- Each CLASSCODE identifies a class uniquely. This table reflects a course might generate many classes. For example, a course labeled INFS 420 might be teach in two classes; 32456 identify INFS 420 class section 1 and 32457 is INFS 420 class section 2. A student can take many classes. A staff member can teach many classes, but each class is taught by only one staff member. Example; staff 20 teach class 32456, 32457 and 28458.
EXAMPLE IN BCNF
-Mukhriz Danish-
-
The structure for previous table:
STUID + STAFFID →CLASSCODE, ENROLLGRADE
CLASSCODE → STAFFID
This table is in 3NF but not in BCNF. How to solve this problem?
COMPOSITE ENTITY
- The many to many relationship identified in an ER model show a complex relationship
- this can be simplified by transforming relationship to an entity know as Composite Entity
- example:
M:N relationship
- Visio does not permit the definition of a M:N relaltionship
- two 1:M relationship has to be superimposed to make this illustration
~Josephine~
A composite entity in an ERD~Josephine~
Do not insert the system environment which is modeled as a component of the E-R model~Josephine~
Two entities can have more than 1 relationship AndrewKulleh
Top down methodology
- Determine entity and relationship between them.
- Start with main entity and followed by other entities
- Determine the attributes related to the entities.
- Determine the attributes related to the relationship (if there are any).
- Choose the keys for the entity.
- Determine the domain for each attribute.
- Combine the diagram of entity, relationship and attribute to develop a complete E-R model. The must be made without allowing entities to exist independently. (hanging)
- Thoroughly check and refined the E-R model if necessary (discuss with user).
andrew kulleh
Abstraction Of The Relationship Scheme From the Logical Data Model
- We will abstract a relationship from a logical data model which is obtained through the process of mapping from a conceptual data model.
- Each entity will abstract one table.
- The relationship between an entity and another entity is represents by the mechanism of a primary key and a foreign key in the relationship scheme.
- In deciding where to place the attribute that represents the foreign key attribute, we must first categorize the ‘parent’ and ‘child’ entities.
- A copy of the primary key attribute ‘parent’ entity will be placed in the ‘child’ entity and this attribute acts as a foreign key in the ‘child’ entity.
andrew kulleh
Abstraction Of The Relationship Scheme From the Logical Data Model
The process of abstracting the relationship scheme requires several considerations as follows:
a. Strong Entity
b. Weak Entity
c. 1:M Relationship
d. 1:1 Relationship
-Anastasia Jyntang-
Abstraction Of The Relationship Scheme From the Logical Data Modela) Strong Entity
- For each common entity (strong), you need construct a relationship by inserting all the simple attributes of the common entity into the relationship.
- In the case of composite attribute, you merely need to insert simple attributes which form the composite attribute mentioned.
- Example, a Student relationship is produced and each attribute of the Student entity will become a field for Student relationship. The primary key of Student entity will become the primary key of Student relationship.
-Anastasia Jyntang-
-Anastasia Jyntang-
Relationship
- For each 1:1 binary relationship between Entity E1 and E2 in the logical data model, a copy of a primary key for entity E1(parent) will be placed in entity E2 (child) to represent the foreign key.
- The determination for parent entity and child entity depends on the relationship participation between the entities involved.
- The entity with optional relationship participation is categorized as the parent entity, and the entity with mandatory relationship participation is categorized as child entity.
florence
florence
- Whereas the Department has mandatory participation in the relationship Manage. Department must be managed by Worker. Because of this, the primary key attribute of the Worker entity is copied into the Department entity as foreign key.
- However, if the involvement of both entities in the 1:1 relationship is optional or mandatory, the determination of parent entity is the most frequently accessed or queried by users.
florence
-
-