Normalisation & ER Diagrams

Post on 12-Nov-2014

1,134 views 0 download

description

System And Database Design Assignment 1

transcript

Title PageI. Institute Name: Australian College Of Business And Technology

II. Degree Program: Diploma In IT

III. Semester: Semester 1, 2008

IV. Unit Code: CSG 1207 / CSI 4341

V. Unit Name: Systems And Database Design

VI. Lecture Name: Mr. R. Ratnayake

VII. Assignment No: 01

VIII. Assignment Title: Normalization And E-R Modelling

IX. Assignment Due Date: 10th April 2008

X. Date Of Submission: 9th April 2008

XI. Word Count:

My DetailsI. ID No: VISRI73

II. Name: Vignarasa SrigananIII. Mobile No: 0773431866

Answers For Q1

Assumptions

Only one sales report will be issued in a particular day which would be only for one staff

member.

Services ID’s are not repeated; therefore no customer would receive a service ID which was

issued in a previous occasion.

Normalization

UNF

R1 = (Staff#, Salesperson, Level, Mobile#, Date, {Cust#, Cust_name, Cust_add, Service#,

Product_ID, Unit_price, Qty, Date/time})

1NF

R1 = (Staff#, Salesperson, Level, Mobile#, Date, {Cust#, Cust_name, Cust_add, Service#,

Product_ID, Unit_price, Qty, Date/time})

R11 = (Staff#, Mobile#, Salesperson, Level, Date)

R12 = (Staff#, Cust#, Cust_name, Cust_add, Service#, Product_ID, Unit_price, Qty,

Date/time)

2NF

R12 = (Staff#, Cust#, Cust_name, Cust_add, Service#, Product_ID, Unit_price, Qty,

Date/time)

R121 = (Cust#, Cust_name, Cust_add)

R122 = (Staff#, Cust#, Service#, Product_ID, Unit_price, Qty, Date/time)

R11 = (Staff#, Mobile#, Salesperson, Level, Date)

3NF

R11 = (Staff#, Mobile#, Salesperson, Level, Date)

R111 = (Mobile#, Salesperson)

R112 = (Staff#, Mobile#, Level, Date)

R121 = (Cust#, Cust_name, Cust_add)

R1211 = (Cust_name, Cust_add)

R1212 = (Cust#, Cust_name)

R122 = (Staff#, Cust#, Service#, Product_ID, Unit_price, Qty, Date/time)

R1221 = (Service#, Product_ID, Unit_price, Qty, Date/time)

R1222 = (Staff#, Cust#, Service#)

R12211 = (Product_ID, Unit_price)

R12212 = (Service#, Product_ID, Qty, Date/time)

Entities

R111 = (Mobile#, Salesperson) Salesperson

R112 = (Staff#, Mobile#, Level, Date) Staff

R1211 = (Cust_name, Cust_add) Customer detail

R1212 = (Cust#, Cust_name) Customer

R1222 = (Staff#, Cust#, Service#) Service

R12211 = (Product_ID, Unit_price) Product

R12212 = (Service#, Product_ID, Qty, Date/time) Sales

Physical E-R Diagram

Staff#, Mobile#, Level, Date

Staff#, Cust#, Service#

Cust#, Cust_name

Cust_name, Cust_add

Product_ID, Unit_price

Mobile#, Salesperson

Customer detailCustomer

Staff

Service Sales

Salesperson

Product

Service#, Product_ID, Qty, Date/time

Answers For Q2

Assumptions

1) Delivery Entity represent the free delivery2) One customer can have many delivery3) One delivery is for one customer only

Answers For Q3

Entity Attributes

1. KWEA NameAddressTP NoE-Mail

2. Staff Staff #NameAddressContact NoExperience

3. Service Service #Service NameService Type

4. Property Type Of PropertyAddressAdditional CommentsOwnership

5. Land Block Lot #StreetCity / TownPost CodeAreaOwnershipStrata Information

6. Property Status Service StatusWeekly RentRent PeriodService FeeMonthly Property Inspection History

7. Customer Customer #NameAddressDate Of BirthGenderCatergory Of TenantNo. Of People LivingCurrent StatusContact NoAdditional Comments

8. Waiting List Waiting #Customer RequestAnticipated Start DateType Of PropertyMaximum Rent Offered

9. Placement Folder Opening #Candidate #Actual Start DateTotal BondsWeekly Rent AmountEnd Date

The underlined attributes are the primary key for the representing entity.

Super Types And Sub Types

Super Type: StaffSub Type: Property Manager

Property / Land SalesAuctioneer

Super Type: PropertySub Type: Currently Tenanted

Ready To Be TenantedReady For Sale

Super Type: CustomerSub Type: Buyer

OwnerTenantWaiting Tenant

Super Type: Waiting ListSub Type: Tenant

Buyer