Top Banner
1 Basic Symbols
24

1 Basic Symbols. 2 Student Entity type using E-R notation.

Dec 18, 2015

Download

Documents

Luke Marsh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Basic Symbols. 2 Student Entity type using E-R notation.

1

Basic Symbols

Page 2: 1 Basic Symbols. 2 Student Entity type using E-R notation.

2

Student Entity type using E-R notation

Page 3: 1 Basic Symbols. 2 Student Entity type using E-R notation.

3

Multivalued – Employee

Page 4: 1 Basic Symbols. 2 Student Entity type using E-R notation.

4

Weak (attributive) entity

Page 5: 1 Basic Symbols. 2 Student Entity type using E-R notation.

5

Example relationships of different degrees

10.510.5

Page 6: 1 Basic Symbols. 2 Student Entity type using E-R notation.

6

Bill of Materials Unary Relationship

(a) Many-to-Many Relationship

(b) Two Instances

Page 7: 1 Basic Symbols. 2 Student Entity type using E-R notation.

7

CA

Consider the Is_married_to unary relationship 1. Assume we want to know the date on which a marriage

occurred. Augment this ER diagram to include a Date_married attribute.

2. Since sometimes persons remarry after the death of a spouse or divorce, redraw this ERD to show the whole history of marriages for person. Show the Date_married attribute on this diagram.

Page 8: 1 Basic Symbols. 2 Student Entity type using E-R notation.

8

1

PERSON

Is_Married_to

Date_Married

Page 9: 1 Basic Symbols. 2 Student Entity type using E-R notation.

9

2.

PERSON

Married Date_Married

Page 10: 1 Basic Symbols. 2 Student Entity type using E-R notation.

10

Page 11: 1 Basic Symbols. 2 Student Entity type using E-R notation.

11

Optional cardinalities

Page 12: 1 Basic Symbols. 2 Student Entity type using E-R notation.

12

Mandatory Cardinalities

Page 13: 1 Basic Symbols. 2 Student Entity type using E-R notation.

13

One optional, one mandatory cardinality

Page 14: 1 Basic Symbols. 2 Student Entity type using E-R notation.

14

1:M Relationship(ERD)

Page 15: 1 Basic Symbols. 2 Student Entity type using E-R notation.

15

M:M Relationship(tbl)

Page 16: 1 Basic Symbols. 2 Student Entity type using E-R notation.

16

M:M Relationship(ERD)

Page 17: 1 Basic Symbols. 2 Student Entity type using E-R notation.

17

IS-A Relationships(tbl)

Page 18: 1 Basic Symbols. 2 Student Entity type using E-R notation.

18

IS-A Relationships (ERD)

Page 19: 1 Basic Symbols. 2 Student Entity type using E-R notation.

19

CA

In a real state DB, there is an entity called PROPERTY, which is a property for sale by the agency. Each time a potential property buyer makes a purchase offer on a property, the agency records the date, offering price, and name of the person making the offer.a. Represent the PROPERTY entity and its purchase offer attributes

using the notation for multivalued attributes.

b. Represent the PROPERTY entity and its purchase offer attributes using two entity types.

c. Finally, assume the agency decides to also keep data about buyers and potential buyers, including their name, phone number, and address. Augment your answer to part b above to accommodate this new entity type.

Page 20: 1 Basic Symbols. 2 Student Entity type using E-R notation.

20

a.

PROPERTY

Offer_Date, Offer_Price Offer_Name

Property_No

Page 21: 1 Basic Symbols. 2 Student Entity type using E-R notation.

21

b.

OFFER

Property_No

PROPERTY

Offer_No

Offer_Date

Offer_Price

Offer_Name

Page 22: 1 Basic Symbols. 2 Student Entity type using E-R notation.

22

c.

OFFER

Property_No

PROPERTY

Offer_No

Offer_Date

Offer_Price

OFFER

Property_No

PROPERTY

Offer_No

Offer_Date

Offer_Price

POTENTIAL_ BUYER

Buyer_No

Phone_No Address

Name

Page 23: 1 Basic Symbols. 2 Student Entity type using E-R notation.

23

CA - Draw a ER diagram for the following

Page 24: 1 Basic Symbols. 2 Student Entity type using E-R notation.

24

PRODUCT

CUSTOMER

ORDER

Places

Includes

Name

Customer_No

Street_Address City

State

Zip

Order_No

Order_Date

Promise_Date

Quantity

Product_No

Description

Unit_Price

ERD – customer order