PowerPoint PresentationChapter 7 OutlineChapter 7 Outline (cont’d.)Data Modeling Using the Entity-Relationship (ER) ModelUsing High-Level Conceptual Data Models for Database DesignUsing High-Level Conceptual Data Models (cont’d.)Slide 7A Sample Database ApplicationSlide 9Entity Types, Entity Sets, Attributes, and KeysEntities and AttributesEntities and Attributes (cont’d.)Entity Types, Entity Sets, Keys, and Value SetsEntity Types, Entity Sets, Keys, and Value Sets (cont’d.)Initial Conceptual Design of the COMPANY DatabaseRelationship Types, Relationship Sets, Roles, and Structural ConstraintsRelationship Types, Sets, and InstancesRelationship DegreeSlide 19Role Names and Recursive RelationshipsSlide 21Constraints on Binary Relationship TypesAttributes of Relationship TypesWeak Entity TypesRefining the ER Design for the COMPANY DatabaseER Diagrams, Naming Conventions, and Design IssuesProper Naming of Schema ConstructsDesign Choices for ER Conceptual DesignAlternative Notations for ER DiagramsSlide 30Example of Other Notation: UML Class DiagramsSlide 32Example of Other Notation: UML Class Diagrams (cont’d.)Slide 34Slide 35Relationship Types of Degree Higher than TwoChoosing between Binary and Ternary (or Higher-Degree) RelationshipsSlide 38Constraints on Ternary (or Higher-Degree) RelationshipsSummaryCopyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-WesleyChapter 7Data Modeling Using the Entity-Relationship (ER) ModelCopyright © 2011 Ramez Elmasri and Shamkant NavatheChapter 7 OutlineUsing High-Level Conceptual Data Models for Database DesignA Sample Database ApplicationEntity Types, Entity Sets, Attributes, and KeysRelationship Types, Relationship Sets, Roles, and Structural ConstraintsWeak Entity TypesCopyright © 2011 Ramez Elmasri and Shamkant NavatheChapter 7 Outline (cont’d.)Refining the ER Design for the COMPANY DatabaseER Diagrams, Naming Conventions, and Design IssuesExample of Other Notation: UML Class DiagramsRelationship Types of Degree Higher than TwoCopyright © 2011 Ramez Elmasri and Shamkant NavatheData Modeling Using theEntity-Relationship (ER) ModelEntity-Relationship (ER) modelPopular high-level conceptual data modelER diagramsDiagrammatic notation associated with the ER modelUnified Modeling Language (UML)Copyright © 2011 Ramez Elmasri and Shamkant NavatheUsing High-Level Conceptual Data Models for Database DesignRequirements collection and analysisDatabase designers interview prospective database users to understand and document data requirementsResult: data requirementsFunctional requirements of the applicationCopyright © 2011 Ramez Elmasri and Shamkant NavatheUsing High-Level Conceptual Data Models (cont’d.)Conceptual schema Conceptual designDescription of data requirementsIncludes detailed descriptions of the entity types, relationships, and constraintsTransformed from high-level data model into implementation data modelCopyright © 2011 Ramez Elmasri and Shamkant NavatheUsing High-Level Conceptual Data Models (cont’d.)Logical design or data model mappingResult is a database schema in implementation data model of DBMSPhysical design phaseInternal storage structures, file organizations, indexes, access paths, and physical design parameters for the database files specifiedCopyright © 2011 Ramez Elmasri and Shamkant NavatheA Sample Database ApplicationCOMPANYEmployees, departments, and projectsCompany is organized into departmentsDepartment controls a number of projectsEmployee: store each employee’s name, Social Security number, address, salary, gender, and birth dateKeep track of the dependents of each employeeCopyright © 2011 Ramez Elmasri and Shamkant NavatheCopyright © 2011 Ramez Elmasri and Shamkant NavatheEntity Types, Entity Sets, Attributes, and KeysER model describes data as: EntitiesRelationshipsAttributesCopyright © 2011 Ramez Elmasri and Shamkant NavatheEntities and AttributesEntityThing in real world with independent existenceAttributesParticular properties that describe entityTypes of attributes:•Composite versus simple (atomic) attributes•Single-valued versus multivalued attributes•Stored versus derived attributes•NULL values•Complex attributesCopyright © 2011 Ramez Elmasri and Shamkant NavatheEntities and Attributes (cont’d.)Copyright © 2011 Ramez Elmasri and Shamkant NavatheEntity Types, Entity Sets, Keys, and Value SetsEntity type Collection (or set) of entities that have the same attributesCopyright © 2011 Ramez Elmasri and Shamkant NavatheEntity Types, Entity Sets, Keys, and Value Sets (cont’d.)Key or uniqueness constraint Attributes whose values are distinct for each individual entity in entity setKey attribute•Uniqueness property must hold for every entity set of the entity typeValue sets (or domain of values)Specifies set of values that may be assigned to that attribute for each individual entityCopyright © 2011 Ramez Elmasri and Shamkant NavatheInitial Conceptual Design of the COMPANY DatabaseCopyright © 2011 Ramez Elmasri and Shamkant NavatheRelationship Types, Relationship Sets, Roles, and Structural ConstraintsRelationshipWhen an attribute of one entity type refers to another entity typeRepresent references as relationships not attributesCopyright © 2011 Ramez Elmasri and Shamkant NavatheRelationship Types, Sets, and InstancesRelationship type R among n entity types E1, E2, ..., EnDefines a set of associations among entities from these entity typesRelationship instances riEach ri associates n individual entities (e1, e2, ..., en)Each entity ej in ri is a member of entity set EjCopyright © 2011 Ramez Elmasri and Shamkant NavatheRelationship DegreeDegree of a relationship type Number of participating entity typesBinary, ternaryRelationships as attributesThink of a binary relationship type in terms of attributesCopyright © 2011 Ramez Elmasri and Shamkant NavatheCopyright © 2011 Ramez Elmasri and Shamkant NavatheRole Names and Recursive RelationshipsRole names and recursive relationshipsRole name signifies role that a participating entity plays in each relationship instanceRecursive relationshipsSame entity type participates more than once in a relationship type in different rolesMust specify role nameCopyright © 2011 Ramez Elmasri and Shamkant NavatheCopyright ©
View Full Document