Unformatted text preview:

Chapter 3In this chapter, you will learn:Basic Modeling ConceptsData Models: Degrees of Data AbstractionDegrees of AbstractionDegrees of Abstraction (con’t.)The Entity Relationship (E-R) ModelAttributesAttributes (con’t.)RelationshipsConnectivity and Cardinality in an ERDRelationship StrengthRelationship ParticipationWeak EntityRelationship DegreeThree Types of RelationshipsComposite EntitiesComposite Entities (con’t.)Entity Supertypes and SubtypesGeneralization Hierarchy with Overlapping SubtypesComparison of E-R Modeling SymbolsSlide 22Developing an E-R DiagramSupertype/Subtype Relationship in an ERDFirst ERD Segment EstablishedSecond and Third ERD Segments EstablishedFourth and Fifth ERD Segments EstablishedSixth and Seventh ERD Segments EstablishedEighth ERD Segment EstablishedNinth ERD Segment EstablishedComponents of E-R ModelCompleted ERDChallenge of Database Design: Conflicting Goals3Chapter 3Entity Relationship (E-R) ModelingDatabase Systems: Design, Implementation, and Management, Fifth Edition, Rob and CoronelDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel23In this chapter, you will learn:•What a conceptual model is and what its purpose is•The difference between internal and external models•How internal and external models serve the database design process•How relationships between entities are defined and refined, and how such relationships are incorporated into the database design process•How ERD components affect database design and implementation•How to interpret the modeling symbols for the four most popular E-R modeling tools•That real-world database design often requires you to reconcile conflicting goalsDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel33Basic Modeling Concepts•Art and science•Good judgment coupled with powerful design tools•Models–“Description or analogy used to visualize something that cannot be directly observed” Webster’s Dictionary•Data Model–Relatively simple representation of complex real-world data structuresDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel43Data Models: Degrees of Data AbstractionFigure 3.1Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel53Degrees of Abstraction•Conceptual–Global view of data–Basis for identification and description of main data items–ERD used to represent conceptual data model–Hardware and software independent •Internal–Representation of database as seen by DBMS–Adapts conceptual model to specific DBMS–Software dependentDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel63Degrees of Abstraction (con’t.)•External–Users’ views of data environment–Provides subsets of internal view–Makes application program development easier–Facilitates designers’ tasks–Ensures adequacy of conceptual model–Ensures security constraints in design•Physical–Lowest level of abstraction–Software and hardware dependent–Requires definition of physical storage devices and access methodsDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel73The Entity Relationship (E-R) Model•Represents conceptual view•Main Components–Entities•Corresponds to entire table, not row•Represented by rectangle–Attributes–RelationshipsDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel83Attributes•Characteristics of entities•Domain is set of possible values•Primary keys underlinedFigure 3.6Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel93Attributes (con’t.)•Simple–Cannot be subdivided–Age, sex, marital status•Composite–Can be subdivided into additional attributes–Address into street, city, zip•Single-valued–Can have only a single value–Person has one social security number•Multi-valued–Can have many values–Person may have several college degrees•Derived–Can be derived with algorithm–Age can be derived from date of birthDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel103Relationships•Association between entities•Connected entities are called participants•Operate in both directions•Connectivity describes relationship classification–1:1, 1:M, M:N•Cardinality–Expresses number of entity occurrences associated with one occurrence of related entityDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel113Connectivity and Cardinality in an ERDFigure 3.12Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel123Relationship Strength•Existence dependence–Entity’s existence depends on existence of related entities–Existence-independent entities can exist apart from related entities–EMPLOYEE claims DEPENDENT•Weak (non-identifying) –One entity is existence-independent on another–PK of related entity doesn’t contain PK component of parent entity•Strong (identifying) –One entity is existence-dependent on another–PK of related entity contains PK component of parent entityDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel133Relationship Participation•Optional–Entity occurrence does not require a corresponding occurrence in related entity–Shown by drawing a small circle on side of optional entity on ERD •Mandatory–Entity occurrence requires corresponding occurrence in related entity–If no optionality symbol is shown on ERD, it is mandatoryDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel143Weak Entity•Existence-dependent on another entity•Has primary key that is partially or totally derived from parent entityFigure 3.19Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel153Relationship Degree•Indicates number of associated entities•Unary–Single entity–Recursive–Exists between occurrences of same entity set•Binary–Two entities associated•Ternary–Three entities associatedDatabase Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel163Three Types of RelationshipsFigure 3.21Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel173Composite Entities•Used to ‘bridge’ between M:N relationships•Bridge entities composed of primary keys of each entity needing connectionFigure


View Full Document

RU CS 445 - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?