Скачать презентацию Notation for Constraints on Relationships n Cardinality ratio Скачать презентацию Notation for Constraints on Relationships n Cardinality ratio

30d33cf69f57d0c4f0d490ccc9ed556f.ppt

  • Количество слайдов: 13

Notation for Constraints on Relationships n Cardinality ratio (of a binary relationship): 1: 1, Notation for Constraints on Relationships n Cardinality ratio (of a binary relationship): 1: 1, 1: N, N: 1, or M: N n n Shown by placing appropriate numbers on the relationship edges. Participation constraint (on each participating entity type): total (called existence dependency) or partial. n Total shown by double line, partial by single line. Slide 3 - 1

Total and Partial Participation n n The participation of EMPLOYEE in WORKS_FOR is called Total and Partial Participation n n The participation of EMPLOYEE in WORKS_FOR is called total participation, meaning that every entity in "the total set" of employee entities must be related to a department entity via WORKS_FOR. We do not expect every employee to manage a department, so the participation of EMPLOYEE in the MANAGES relationship type is partial, meaning that some or "part of the set of" employee entities are related to a department entity via MANAGES, but not necessarily all. Slide 3 - 2

Alternative (min, max) notation for relationship structural constraints: n Examples: n A department has Alternative (min, max) notation for relationship structural constraints: n Examples: n A department has exactly one manager and an employee can manage at most one department. n n n Specify (0, 1) for participation of EMPLOYEE in MANAGES Specify (1, 1) for participation of DEPARTMENT in MANAGES An employee can work for exactly one department but a department can have any number of employees. n n Specify (1, 1) for participation of EMPLOYEE in WORKS_FOR Specify (1, n) for participation of DEPARTMENT in WORKS_FOR Slide 3 - 3

Alternative (min, max) notation relationship constraints (0, 1) (1, N) Slide 3 - 4 Alternative (min, max) notation relationship constraints (0, 1) (1, N) Slide 3 - 4

COMPANY ER Schema Diagram using (min, max) notation Slide 3 - 5 COMPANY ER Schema Diagram using (min, max) notation Slide 3 - 5

ER DIAGRAM FOR A BANK DATABASE © The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, ER DIAGRAM FOR A BANK DATABASE © The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition Slide 3 - 6

Summary of notation for ER diagrams Slide 3 - 7 Summary of notation for ER diagrams Slide 3 - 7

Alternative diagrammatic notation n ER diagrams is one popular example for displaying database schemas Alternative diagrammatic notation n ER diagrams is one popular example for displaying database schemas Many other notations exist in the literature and in various database design and modeling tools Universal Modeling Language (UML) class diagrams is representative of another way of displaying ER concepts that is used in several commercial design tools Slide 3 - 8

UML class diagrams n Represent classes (similar to entity types) as large rounded boxes UML class diagrams n Represent classes (similar to entity types) as large rounded boxes with three sections: n n n Top section includes entity type (class) name Second section includes attributes Third section includes class operations (operations are not in basic ER model) Relationships (called associations) represented as lines connecting the classes Used in database design and object-oriented software design UML has many other types of diagrams for software design (see Chapter 12) Slide 3 - 9

UML class diagram for COMPANY database schema Slide 3 - 10 UML class diagram for COMPANY database schema Slide 3 - 10

Other alternative diagrammatic notations Slide 3 - 11 Other alternative diagrammatic notations Slide 3 - 11

Data Modeling Tools n A number of popular tools that cover conceptual modeling and Data Modeling Tools n A number of popular tools that cover conceptual modeling and mapping into relational schema design. n n POSITIVES: n n Examples: ERWin, S- Designer (Enterprise Application Suite), ER- Studio, etc. Serves as documentation of application requirements, easy user interface - mostly graphics editor support NEGATIVES: Most tools lack a proper distinct notation for relationships with relationship attributes n Mostly represent a relational design in a diagrammatic form rather than a conceptual ER-based design (See Chapter 12 for details) n Slide 3 - 12

Some of the Currently Available Automated Database Design Tools COMPANY TOOL FUNCTIONALITY Embarcader o Some of the Currently Available Automated Database Design Tools COMPANY TOOL FUNCTIONALITY Embarcader o Technologie s ER Studio Database Modeling in ER and IDEF 1 X DB Artisan Database administration, space and security management Oracle Developer 2000/Designer 2000 Database modeling, application development Popkin Software System Architect 2001 Data modeling, object modeling, process modeling, structured analysis/design Platinum (Computer Associates) Enterprise Modeling Suite: Erwin, BPWin, Paradigm Plus Data, process, and business component modeling Persistence Inc. Pwertier Mapping from O-O to relational model Rational (IBM) Rational Rose UML Modeling & application generation in C++/JAVA Resolution Ltd. Xcase Conceptual modeling up to code maintenance Sybase Enterprise Application Slide Data modeling, business logic modeling 3 - 13