• 120 likes • 269 Views
CS 425 Database Organization ER Diagrams. Manju Muralidharan Priya. Fundamentals. Building Blocks. Advanced concepts. Notations. EXIT. ER Diagrams. An abstract and conceptual representation of data. It is used to design database schema Commonly used during Requirement Analysis phase.
E N D
CS 425 Database OrganizationER Diagrams Manju Muralidharan Priya
Fundamentals Building Blocks Advanced concepts Notations EXIT
ER Diagrams • An abstract and conceptual representation of data. • It is used to design database schema • Commonly used during Requirement Analysis phase. • Has entities , attributes and relationships CS561 Spring 2012
ENTITIES Event Place Person Object Student Desk Classroom Seminar CS561 Spring 2012
ATTRIBUTES S_ID Primary key Why use Key? FNAME CLASS STUDENT NAME Multi-value attribute LNAME AGE Composite attribute Derived attribute DOB Simple attribute CS561 Spring 2012
RELATIONSHIPS Association between entities Can have attributes Member of STUDENT TEAM since CS561 Spring 2012
Relationshipscontd. Establishing Relationships S_ID Member of STUDENT TEAM TEAM_ID since TEAM_ID Here TEAM_ID is the foreign key connecting the entities CS561 Spring 2012
CARDINALITY Number of entities in a relationship Many to Many relationship One to Many relationship Many to One relationship One to One relationship 1 1 N N N N 1 1 Teacher Department Quiz Team Class Student Student Student Manages Belongs Belongs Manager Teaches CS561 Spring 2012
ROLES Roles of entities in relationships Leader of Leader Lab Team STUDENT TEAM Member of Member Quiz Team CS561 Spring 2012
NOTATIONS Crow’s Foot Notation Chen Notation Min-Max / ISO UML Notation <<Relationship>> < Has <<Entity>> <<Entity>> Member of Member of Member of > (0,1)Member of STUDENT CLUB 1 N Has (0,N)Has 1 0..N CS561 Spring 2012
WRAP UP… ENTITIES ATTRIBUTES RELATIONSHIPS CARDINALITY ROLES FNAME LNAME S_ID NAME CLASS Member of N 1 TEAM STUDENT Member of Has AGE since TEAM_ID DOB CS561 Spring 2012