Presentation is loading. Please wait.

Presentation is loading. Please wait.

Description and exemplification of entity-relationship modelling.

Similar presentations


Presentation on theme: "Description and exemplification of entity-relationship modelling."— Presentation transcript:

1 Description and exemplification of entity-relationship modelling.
Translation of third normal form (3NF) into E/R diagrams: entities (weak entity, strong entity), relationships (mandatory, optional, strong/weak). Description and exemplification use of a Data Dictionary. Description and exemplification of entity/event modelling. Entity/Event Matrix: add, modify, delete, read.

2 Translation of third normal form (3NF) into E/R diagrams
Entity Relationship Diagrams (or ERD) are used to illustrate the logical structure of a database system. An ERD is a graphical representation of the entities within the database system and shows how individual entities are related to other entities in the system. Benefits of using an ERD to represent the structure of the database system include: It is non-technical and can be easily understood by non-experts. This is important since the analyst must confirm that the representation of the system is correct. It is unambiguous as there is only one way of interpreting a well-drawn Entity Relationship Diagram.

3 Translation of third normal form (3NF) into E/R diagrams
The main components of an Entity Relationship Diagram are: Entities An entity is a person, object, place or event about which information is collected. It is equivalent to a database table. An entity can be described by its properties or attributes. For example, a STUDENT entity may have attributes such as surname, address, date of birth. A single entity represents a group of objects with the same properties. Each single object within an entity is called an entity occurrence.

4 Translation of third normal form (3NF) into E/R diagrams
The main components of an Entity Relationship Diagram are: Entities There are two different types of entity: strong entities and weak entities. A strong entity does not rely on another entity for identification. Instead, it has enough attributes of its own to make a unique primary key. A weak entity cannot form a unique primary key on its own. Instead, it must make use of the primary key of another entity to form a unique identifier. In other words, a weak entity depends on another entity to exist. The entity that supports a weak entity by providing a foreign key is often referred to as the owner entity. A weak entity cannot stand alone and would not be queried on its own..

5 Translation of third normal form (3NF) into E/R diagrams
The main components of an Entity Relationship Diagram are: Attributes Attributes are the properties of entities and represent everything that we know about the entity. Attributes can be identifiers of the entity (in other words, forming all or part of the primary key of the entity) or descriptors that describe a non-unique characteristic of an entity occurrence.

6 Translation of third normal form (3NF) into E/R diagrams
The main components of an Entity Relationship Diagram are: Relationships A relationship represents an associated between two or more entities. Each relationship in a system is given a name that describes its function. The cardinality of a relationship specifies the number of entity occurrences that take part in a particular relationship. Relationship cardinality can be: one-to-one (1:1) one-to-many (1:M) – many is show with crow’s feet many-to-many (M:M) – try not to have any of these!

7 Translation of third normal form (3NF) into E/R diagrams
The main components of an Entity Relationship Diagram are: Relationship Optionality A relationship in an Entity Relationship Diagram can be either mandatory or optional. If an instance of an entity must always occur for an entity to be included in a relationship, then it is mandatory. An example of mandatory relationship is the statement "every project must be managed by a single department". Shown with a full line. However, if at least one instance of an entity is not required, the relationship is optional. An example of optional relationship is the statement, "employees may be assigned to work on projects". Shown with a dashed line.

8 Translation of third normal form (3NF) into E/R diagrams
Barred relationships In our ERD we do not show foreign keys. Instead we draw a line through our relationship to show that a primary key will be placed in the other entity as a foreign key. Non-transferability We use a diamond on our relationship to show that once a relation is made between our two entities it cannot be transferred. Rules for both Always show both of these on our log entities (hidden).

9 Translation of third normal form (3NF) into E/R diagrams
Entity Relationship Diagrams can be produced by following the steps listed below: Identify all possible entities in the system. Remember that entities are used to store information. Identify the attributes in each entity - remember not to include attributes of one entity in another entity. Identify the primary keys of each entity using # - this may not be possible in weak entities (history logs are generally weak entities!) Mandatory attributes have *, and optional attributes o. Identify the relationships between entities and define the cardinality and optionality of these relationships. Resolve any many-to-many relationships. This may mean that the list of entities and attributes may need to be revised and updated. Include barred relationships if a foreign key is within an entity. Include your diamonds for non-transferability.


Download ppt "Description and exemplification of entity-relationship modelling."

Similar presentations


Ads by Google