Example: bankruptcy

Entity-Relationship (ER) Diagrams - Northeastern University

CS3200 Database Design Spring 2018 Derbinsky Entity-Relationship (ER) Diagrams Lecture 7. Entity-Relationship (ER) Diagrams February 11, 2018 1. CS3200 Database Design Spring 2018 Derbinsky Outline 1. Context Design & Implementation Process 2. Goals of Conceptual Design 3. Entity-Relationship (ER) Model 4. One ER Diagrammatic Notation 5. Requirements Elicitation 6. Approaches to Conceptual Design Entity-Relationship (ER) Diagrams February 11, 2018 2. CS3200 Database Design Spring 2018 Derbinsky Database Design and Implementation Process Entity-Relationship (ER) Diagrams February 11, 2018 3. CS3200 Database Design Spring 2018 Derbinsky Goal of Conceptual Design Description of data requirements that is.

CS3200 –Database Design Spring 2018 Derbinsky Weak Entities Entity types that do not have key attributes of their own are weak; instead identified by relation to specific entity of another type (the identifyingtype) February 11, 2018 Entity-Relationship (ER) Diagrams 35 COURSE SECTION COURSE SEC NAME Number Book DEPT NUM Prof 1 N

Tags:

  Course, 2018, Relationship

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Entity-Relationship (ER) Diagrams - Northeastern University

1 CS3200 Database Design Spring 2018 Derbinsky Entity-Relationship (ER) Diagrams Lecture 7. Entity-Relationship (ER) Diagrams February 11, 2018 1. CS3200 Database Design Spring 2018 Derbinsky Outline 1. Context Design & Implementation Process 2. Goals of Conceptual Design 3. Entity-Relationship (ER) Model 4. One ER Diagrammatic Notation 5. Requirements Elicitation 6. Approaches to Conceptual Design Entity-Relationship (ER) Diagrams February 11, 2018 2. CS3200 Database Design Spring 2018 Derbinsky Database Design and Implementation Process Entity-Relationship (ER) Diagrams February 11, 2018 3. CS3200 Database Design Spring 2018 Derbinsky Goal of Conceptual Design Description of data requirements that is.

2 Comprehensive Entity types, relationships, and constraints Sanity check of data & functional requirements Reference for [unit/integration] testing/analysis Concise/High-level Easy to understand technically Easy to communicate with non-technical users Facilitates focus on data (vs. storage/implementation details). Algorithmically Transformable Improves application development efficiency, reduces errors Entity-Relationship (ER) Diagrams February 11, 2018 4. CS3200 Database Design Spring 2018 Derbinsky Entity-Relationship (ER) Model Entity Thing in the real world Attribute Property of an entity Most of what we store in the database relationship Association between sets of entities Possibly with attribute(s).

3 Entity-Relationship (ER) Diagrams February 11, 2018 5. CS3200 Database Design Spring 2018 Derbinsky ER Diagrams Graphical depiction of an ER model Many notations, this class . All cars have a year, age, make, model, registration (unique), vehicle number (vin; unique), some number of colors . Specialization/Generalization Entity-Relationship (ER) Diagrams February 11, 2018 6. CS3200 Database Design Spring 2018 Derbinsky Entity Sets Set of entities that have Make Year Model the same attributes All cars have a year, CAR. make, and model. Entity-Relationship (ER) Diagrams February 11, 2018 7. CS3200 Database Design Spring 2018 Derbinsky Composite Attributes Can be subdivided into Make Year Model smaller subparts All cars have a year, CAR.

4 Make, model, and registration. Registration State Number Entity-Relationship (ER) Diagrams February 11, 2018 8. CS3200 Database Design Spring 2018 Derbinsky Multivalued Attributes Can take a [possibly Make Year Model specified] number of values. Color CAR. All cars have a year, make, model, Registration registration, and some number of colors. State Number Entity-Relationship (ER) Diagrams February 11, 2018 9. CS3200 Database Design Spring 2018 Derbinsky Key Attributes The value uniquely Make Year Model identifies each entity All cars have a year, Color CAR VIN. make, model, registration (unique), Registration vehicle number (vin;. unique), some number State Number of colors.

5 Entity-Relationship (ER) Diagrams February 11, 2018 10. CS3200 Database Design Spring 2018 Derbinsky Potential Pitfall In relational schema, underlining multiple attributes indicates that for all rows, the combination is unique In ERDs, underlining multiple attributes indicates that each individually can uniquely identify an entity Entity-Relationship (ER) Diagrams February 11, 2018 11. CS3200 Database Design Spring 2018 Derbinsky Derived Attributes Age The value can be Make Year Model computed All cars have a year, Color CAR VIN. age, make, model, registration (unique), Registration vehicle number (vin;. unique), some number State Number of colors. Entity-Relationship (ER) Diagrams February 11, 2018 12.

6 CS3200 Database Design Spring 2018 Derbinsky Exercise Draw an ERD for the following description: Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A. department may have several locations. Entity-Relationship (ER) Diagrams February 11, 2018 13. CS3200 Database Design Spring 2018 Derbinsky Answer Name Number Location DEPARTMENT Manager Manager_. Start_Date Entity-Relationship (ER) Diagrams February 11, 2018 14. CS3200 Database Design Spring 2018 Derbinsky Exercise Draw an ERD for the following description: A department controls a number of projects, each of which has a unique name, a unique number, and a single location.

7 Entity-Relationship (ER) Diagrams February 11, 2018 15. CS3200 Database Design Spring 2018 Derbinsky Answer Name Number Location PROJECT. Controlling_. Department Entity-Relationship (ER) Diagrams February 11, 2018 16. CS3200 Database Design Spring 2018 Derbinsky Exercise Draw an ERD for the following description: We store each employee's name (first, last, MI), Social Security number (SSN), street address, salary, sex (gender), and birth date. An employee is assigned to one department, but may work on several projects, which are not necessarily controlled by the same department. We keep track of the current number of hours per week that an employee works on each project.

8 We also keep track of the direct supervisor of each employee (who is another employee). Entity-Relationship (ER) Diagrams February 11, 2018 17. CS3200 Database Design Spring 2018 Derbinsky Answer Salary SSN Sex Department Birthdate EMPLOYEE. Supervisor Address FName Name Works_On Project MI LName Hours Entity-Relationship (ER) Diagrams February 11, 2018 18. CS3200 Database Design Spring 2018 Derbinsky Exercise Draw an ERD for the following description: We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent's first name, sex, birth date, and relationship to the employee. Entity-Relationship (ER) Diagrams February 11, 2018 19.

9 CS3200 Database Design Spring 2018 Derbinsky Answer Sex Employee DEPENDENT DBirthdate relationship DName Entity-Relationship (ER) Diagrams February 11, 2018 20. CS3200 Database Design Spring 2018 Derbinsky Relationships Associates one or more sets of entities One = recursive (role is important). STUDENT DEPT. CHAIR_F. All departments have a faculty member who serves as the chair. A. faculty member can only chair one FACULTY. department. Entity-Relationship (ER) Diagrams February 11, 2018 21. CS3200 Database Design Spring 2018 Derbinsky Relationships Associates one or more sets of entities One = recursive (role is important). MAJOR_D. STUDENT DEPT. CHAIR_F.

10 All students must have a department in which they major. FACULTY. Entity-Relationship (ER) Diagrams February 11, 2018 22. CS3200 Database Design Spring 2018 Derbinsky Relationships Associates one or more sets of entities One = recursive (role is important). MAJOR_D. STUDENT DEPT. MINOR_D. CHAIR_F. Students may have any number of departments in which they minor. FACULTY. Entity-Relationship (ER) Diagrams February 11, 2018 23. CS3200 Database Design Spring 2018 Derbinsky Relationships Associates one or more sets of entities One = recursive (role is important). MAJOR_D. STUDENT DEPT. MINOR_D. Tutor Tutee TUTORS CHAIR_F. Students can tutor other student(s).


Related search queries