Download presentation
Presentation is loading. Please wait.
Published byCaroline Bethanie Barber Modified over 9 years ago
1
Chapter Two ( Database Design) Objectives Learn how to design a DBMS Introduction to Data Models Entity-Relationship Data Models
2
Design a DBMS Entity Relationship (ER) Model
3
3 Entity-Relationship Model (ER-Model) Purpose of ER Model is to allow the description of an enterprise to be written without the attention to the efficiency or the physical design.
4
4 Entity-Relationship Model (ER-Model) A set of basic objects called Entity, and a set of Relationships among objects (Entities)
5
5 Entity and Entity Set: Entity: An object that exists and is distinguishable from other objects Car ? VW? Entity Set: A set of entities of the same type Entity set needs not be disjoint (Faculty vs Student)
6
6 Entity and Entity Set: (Continued) An entity is represented by a set of attributes Student(Name, Id, Gpa) Each attribute has a set of permitted values called Domain (value set) Id: positive integer
7
7 Entity and Entity Set: (Continued) Examples: (Name, Mary), (ID,23), … Entity Set: Students Faculty Courses
8
8 Practice: Identify entity sets in your video store.
9
9 Relationship and Relationship Sets: Relationship is an association among two or more entities Faculty and Course Relationship Set: is a set of similar relationships
10
10 Practice: Identify the relationships among the entities in your video store project.
11
11 Functionality (Type of relationships) Association among several entities 1. One_To_One Relationship Each entity in either set has at most one association with the member of the other set Example: Chairand Person Students and Address AB a1b1 a2b2 a3b3 a4
12
12 Functionality (Continued) 2. One_To_Many Relationship One entity in set one is associated with zero or more entities in set two, but each entity in set two is associated with at most one entity in set one Example: StudentsAddress John84 Main St. Frostburg 12 1 st Street Washington Lori
13
13 Functionality (Continued) 3. Many_To_Many Relationship No restriction on the either sets of pair of entities Example: Mark21 1 st Washington 84 Main St. Frostburg Lori62 3 rd Ave Cumberland
14
14 Practice: Identify the types of relationships in your video store project.
15
15 Entity Relationship Diagram Rectangular: Entity sets Circles: Attributes Diamonds: Relationship sets Lines: Attribute to entity set and Entity set to relationship
16
16 Entity Relationship Diagram Courses Student Student Course Id GPA Name Course Number Title Cr
17
17 Steps in designing a database using ER Model 1. Identify a. Entity sets b. Relationship sets 2. Identify semantic Info. In the relationship sets (functionality among entities) 3. Define the value sets of attributes (Domain) 4. Organize data into Entity/Relationships Diagram
18
18 Practice: Design your Database for the video store using ER Model.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.