BIS4435 Discussion Topic 2 Question By Nawaz Khan

Given the following information, produce an ERD—based on the Crow’s Foot model— that can be implemented. Make sure to include all appropriate entities, relationships, connectivities, and cardinalities.

• EverFail company is in the quick oil and lube business. Although customers bring in their cars for what is described as “quick oil changes,” EverFail also replaces windshield wipers, oil filters, and air filters, subject to customer approval. The invoice contains the charges for the oil used and all parts used, and a standard labor charge. When the invoice is presented, customers pay cash, use a credit card, or write a check. EverFail does not extend credit. EverFail’s database is to be designed to keep track of all components in all transactions.

• Given the high parts usage of the business operations, EverFail must maintain careful control of its parts (oil, wipers, oil filters, air filters) inventory. Therefore, if parts reach their minimum on-hand quantity, the parts in question must be reordered from an appropriate vendor. EverFail maintains a vendor list, which contains both the vendors actually used and potential vendors.

• Periodically, EverFail mails updates to customers, based on the date of the car’s service. EverFail also tracks each customer’s car mileage.

Give feedback and discuss the solution posted by your peer. BIS4435 Discussion Topic 2 Answer by Nida Waseem

An assumption have been made about the business rules while creating an ERD that is:

Company only contains the records of the cars of customers that has been serviced. BIS4435 Discussion Topic 2 Answer by Toyeeb Yusuff Nida I felt that there should be a link between the customer and the payment. Also, you didn’t clearly cater for customers that pays with cash, or credit card. BIS4435 Discussion Topic 2 Answer by Faith Ime Abakada Hi Nida, I noticed that in your diagram you stated that the mode of payment is by check only. But referring you back to the question it was mentioned that "When the invoice is presented, customers pay cash, use a credit card, or write a check’’…this was not provided for in your diagram…and would not be suitable for any EverFail customer who decides to pay for his/her services in cash or by card.

Am also a little bit confused with the link you made between the ‘’parts used and the vendor parts and the vendors’’…Isnt this more of a repetition? Considering the fact that the parts used are provided by the vendors…’’why is vendor parts included’’?

Pls Find Attached a view of my solution to the question BIS4435 Discussion Topic 2 Answer by Joy Ocheja

How important is method of payment to EverFail company. In order to model a very efficient database, we do not need to keep a record of weather the customers pay by cash, credit card or check. Take a minute to imagine how much memory space will be used to keep this record. EverFail company is not a financial institution, therefore this detail is not necessary. All we are interested in is that customers pay for service rendered. This is open for discussion please. Thank you.

BIS4435 Discussion Topic 2 Answer by Chintankumar Patel hi i am discuss the topis How important is method of payment to EverFail company. In order to model a very efficient database, we do not need to keep a record of weather the customers pay by cash, credit card or check. Take a minute to imagine how much memory space will be used to keep this record. EverFail company is not a financial institution, therefore this detail is not necessary. All we are interested in is that customers pay for service rendered. Thanks...... BIS4435 Discussion Topic 2 Answer by Vishal Prajapati hi, i have attached E-R model.just check it.

Customer Car PK CustomerId PK CarNumber ServiceTypeMaster Has PK ServiceTypeId Name CustomerId Address Make ServiceType EMail Model Phone Description LabourCharge

Is Of Gets

Service OptionalService PartUsedInService PK ServiceId Has PK OptionalServiceId PK PartUsedInServiceId Uses CarNumber ServiceId OptionalServiceId Date ServiceTypeId PartId OilCharge QuantityUsed Mileage NextServiceDueOn Has

Gets PartMaster PartVendor PK PartId Invoice PK PartVendorId PK InvoiceId Name Cost PartId StockAvailable ServiceId VendorId Date ActualOrPotential ServiceCharge Tax Total Has

Has Gets Paid Vendor PK VendorId PaymentDetail PaymentModeMaster

PK PaymentDetailId Is Of PK PaymentModeId Name Address InvoiceId Name PaymentModeId Description Comments Discount Balance Date BIS4435 Discussion Topic 2 Answer by Afiff Bahalwan

In my opinion, there should be 6 entities, which are:

1. Customer 2. Car 3. Invoice 4. Transaction Detail 5. Product 6. Vendor

Please find below as an attachment the crow's foot ERD for Everfail company. BIS4435 Discussion Topic 2 Answer by Allen Rajiev Please find attached ERD based on the Crow's Foot Model. Regards,

Customer Car PK CustomerId PK CarNumber ServiceTypeMaster Has PK ServiceTypeId Name CustomerId Address Make ServiceType EMail Model Phone Description LabourCharge

Is Of Gets

Service OptionalService PartUsedInService PK ServiceId Has PK OptionalServiceId PK PartUsedInServiceId Uses CarNumber ServiceId OptionalServiceId Date ServiceTypeId PartId OilCharge QuantityUsed Mileage NextServiceDueOn Has

Gets PartMaster

PartVendor PK PartId Invoice PK PartVendorId PK InvoiceId Name Cost PartId StockAvailable ServiceId VendorId Date ActualOrPotential ServiceCharge Tax Total Has

Has Gets Paid Vendor

PK VendorId PaymentDetail PaymentModeMaster

PK PaymentDetailId Is Of PK PaymentModeId Name Address InvoiceId Name PaymentModeId Description Comments Discount Balance Date BIS4435 Discussion Topic 2 Answer by Khuram Shahzad

Ever Fail provides the services for oil change and parts replacement subject to customer approval . Ever Fail present the invoice to customer to make the payment by cheque , cash or credit card.

The following are the entities I have identified in the Ever Fail ER modelling

1. Customer 2. Car 3. Payment 4. Invoice 5. Vendor 6. Oil Change 7. Car Parts

Ever fail ER-Diagram attached BIS4435 Discussion Topic 2 Answer by Joy Ocheja

Find attached the Entity Relationship Diagram for EverFail Company based on the Crow's Foot model. The entities are: CUSTOMER CAR INVOICE INV_LINE PART ORD_LINE ORDER VENDOR

Note that the use of INV_LINE and ORD_LINE became necessary to break the many-to-many relationship that exists between INVOICE and PART & PART and ORDER BIS4435 Discussion Topic 2 Answer by Althea Walters BIS4435 Discussion Topic 2 Answer by Gilgith Karthika Vilasan

Please find the Crows' Foot solution to the EverFail company business model.

The Crow’s Foot ERD for the EverFail Company CUSTOMER CAR PK Customer ID PK Car Number First Name owns Last Name Car Manufacturer Address Car Name Phone Year Cust_ID (FK)

INVOICE Service

Is of PK Invoice Number PK Service ID maintenance generates Date Is shown in Car_Num(FK) Amount Date Tax Oil Change MAILING LIST Total Mileage Cust_ID(FK) NextServiceDueOn PK List ID Service_ID(FK)

Customer_ID(FK) Payment Payment Modes Email id transaction PK Invoice_Num Is of PK PaymentMode ID

Payment ID Name Date PaymentMode_ID INVOICE LINE contains TotalAmount PK INVOICE LINE ID

Inv_Num (FK) PART Description Units shows PK Part Code Price Amount Description Part_Code (FK) Quantity on hand Min Quantity Min Order Quantity Price

VENDOR references PK Vendor Code

Name Address ORDER LINE Email PK OrderLine Number

Order_Num (FK) Units includes Unit Cost Total Part_Code ORDER

PK Order Number

ships Date Total Amount Vendor_Code (FK) BIS4435 DISCUSSION TOPIC 2 READING MATERIAL

Crow's Foot

Crow's Foot notation is used in Barker's Notation, SSADM and Information Engineering. Crow's Foot diagrams represent entities as boxes, and relationships as lines between the boxes. The ends of these lines are shaped to represent the cardinality of the relationship.

Usage of Chen notation is more prevalent in the United States, while usage of Crow's Foot notation was used primarily in the UK. Crow's Foot notation was used in the 1980s by the consultancy practice CACI. Many of the consultants at CACI (including Barker) subsequently moved to Oracle UK, where they developed the early versions of Oracle's CASE tools, introducing the notation to a wider audience. Crow's Foot notation is used by these tools: ARIS, System Architect, Visio, PowerDesigner, Toad Data Modeler, DeZign for Databases, Devgems Data Modeler, OmniGraffle, MySQL Workbench and Dia.

Cardinality (data modeling)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In data modeling, the cardinality of one data table with respect to another data table is a critical aspect of database design. Relationships between data tables define cardinality when explaining how each table links to another.

In the relational model, tables can be related as any of: many-to-many, many-to-one (rev. one-to-many), or one-to-one. This is said to be the cardinality of a given table in relation to another.

For example, considering a database designed to keep track of hospital records. Such a database could have many tables like:

 a Doctor table full of doctor information  a Patient table with patient information  and a Department table with an entry for each department of the hospital.

In that model:

 There is a many-to-many relationship between the records in the doctor table and records in the patient table (Doctors have many patients, and a patient could have several doctors);  a one-to-many relation between the department table and the doctor table (each doctor works for one department, but one department could have many doctors).

one-to-one relationship is mostly used to split a table in two in order to optimize access or limit the visibility of some information. In the hospital example, such a relationship could be used to keep apart doctor's personal or administrative information.

A crow's foot shows a one-to-many relationship, single line is a one-to-one relationship.

UML Modeling

UML class diagram may be used for data modeling. In that case, relationship are modeled using UML associations, and multiplicity is used on those associations to denote cardinality. Here are some examples: left right

1 1 one-to-one 0..1 1 optional on one side one-to-one

0..* or * 0..* or * optional on both sides many-to-many

1 1..* one-to-many