80 likes | 100 Views
Explore the Entity Relationship Model and its elements - entity sets, attributes, relationships, and diagrams. Learn about design principles, constraints, weak entities, and modeling techniques in databases.
E N D
Database Dr. Roueida Mohammed
The Entity Relationship Model • The entity relationship model (or ER model) is a way of graphically representing the logical relationships of entities (or objects) in order to create a database.
Elements of the E/R Model • Entity sets. • Attributes. • Relationships
Entity-Relationship Diagrams • An E/R diagram is a graph representing entity sets, attributes, and relationships. Elements of each of these kinds are represented by nodes of the graph, and we use a special shape of node to indicate the kind, as follows: • Entity sets are represented by rectangles. • Attributes are represented by ovals. • Relationships are represented by diamonds
RELATIONSHIP SETS • one-to-one • one-to-many • many-to-one • Many-to-many
Design Principles • Faithfulness • Avoiding Redundancy • Simplicity Counts • Choosing the Right Relationships • Picking the Right Kind of Element
The Modeling of Constraints • Keys • Single-value constraints • Referential integrity constraints • Domain constraints • General constraints