Normalization HELP! - Simple Question (1 Viewer)

Broad

New member
Local time
Today, 07:16
Joined
Dec 30, 2009
Messages
9
Please help is needed in this topic: I would be very very thankful.

It is about a pizza shop: (Questions are at the bottom)

Read this first:

[
Customers will need to be registereed , with their name, adddress and phone number. Once registered, customers can phone up and order the food they require by quoting their customer number (or name/ address if they can't rember it). Customers select which pizza (s) they require and how many they want. The order is then assembled and delivered to the customer.
When an order is taken, a note needs to be made of the time and date when it was made, and the member of staff who has taken it. The order value has to be more than $10 otherwise a $2 delivery charge is applied.]

Question:
Identify for me all entities.
List the attributes of the entities,
Ensure attributes can't be broken down into further attributes (atomic).


Thanks again in advance:)

This is my WORK:

[[

[FONT=&quot]Entities[/FONT]


  • Customer


  • Order


  • Pizza


  • Member of Staff

[FONT=&quot]Attributes[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Customer:[/FONT]

  • [FONT=&quot] CustomerNo[/FONT]
  • [FONT=&quot] Customer Name[/FONT]
  • [FONT=&quot] Surname[/FONT]
  • [FONT=&quot] Address[/FONT]
  • [FONT=&quot] Phone Number[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Pizza:[/FONT]

  • [FONT=&quot]Pizza Type[/FONT]
  • [FONT=&quot]Quantity[/FONT]
  • [FONT=&quot]Pizza Price[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Order:[/FONT]

  • [FONT=&quot]Order Date[/FONT]
  • [FONT=&quot]Order Time[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Member of Staff:[/FONT]

  • [FONT=&quot]Employee ID[/FONT]
  • [FONT=&quot]Employee Name[/FONT]
  • [FONT=&quot]Employee Surname[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]First normal form (1NF)[/FONT]

1st Normal Form
CUSTOMER(CustomerNo, CustomerName, CustomerSurname,
ADDRESS, PhoneNumber,)

PIZZA(PizzaID, PizzaType,)

MEMBEROFSTAFF(StaffID, StaffForename, Staff Surname)

ORDER(OrderID, OrderTime, Orderdate, DeliveryCharge, PizzaQuantity , TotalCost)


]]
 
Last edited:

Adam Caramon

Registered User
Local time
Today, 10:16
Joined
Jan 23, 2008
Messages
822
Gotta be honest with you, this sounds like a school assignment. If that's the case, you should be doing it on your own.
 

dbDamo

Registered User.
Local time
Today, 15:16
Joined
May 15, 2009
Messages
395
Pretty sure you're meant to be learning this for yourself - you're not going to get any help here unless you can convince us that this is not the case.

Take the time to learn, you'll benefit from it in the end.
 

boblarson

Smeghead
Local time
Today, 07:16
Joined
Jan 12, 2001
Messages
32,059
And for heaven's sake, don't post the same question to more than one category. It is considered very bad manners in forums to do so.
 

Broad

New member
Local time
Today, 07:16
Joined
Dec 30, 2009
Messages
9
Sorry, this is my first time using forums.
 

Broad

New member
Local time
Today, 07:16
Joined
Dec 30, 2009
Messages
9
Bro, I have done my one but I want to make sure that it is correct. If you don't believe, no problem I will post my work.
 

dbDamo

Registered User.
Local time
Today, 15:16
Joined
May 15, 2009
Messages
395
Post your work then and we will have a look at it for you
 

dbDamo

Registered User.
Local time
Today, 15:16
Joined
May 15, 2009
Messages
395
To start with, how about a please? Good manners cost nothing.

1. Your Pizza table should not contain the Pizza Quantity field - that should be held in the Order table

2. You should have a Pizza Price field in your Pizza table

3. Order Cost should not be stored in any table - it should be calculated in a query

Now give it another go - and spend some time thinking. You need to think about all data that will need to be stored then follow normalisation from 0NF to 3NF. Let normalisation decide which fields belong in which table rather than deciding randomly.
 

Broad

New member
Local time
Today, 07:16
Joined
Dec 30, 2009
Messages
9
Thanks for the help friend.

You said I need to think about all data that will need to be stored. You mean I should think of possible attributes for the entities.

Thanks again.
 

dbDamo

Registered User.
Local time
Today, 15:16
Joined
May 15, 2009
Messages
395
You shouldn't even think about the entities until you have listed all of your attributes. When you're sure you have all of your attributes, create a table with some dummy data and then you can begin normalisation, which will decide your entities.
 

dbDamo

Registered User.
Local time
Today, 15:16
Joined
May 15, 2009
Messages
395
No problem - any problems/questions don't hesitate to ask - but I'm off to the pub now so will have to wait until the New Year!!! Have a good one.
 

Broad

New member
Local time
Today, 07:16
Joined
Dec 30, 2009
Messages
9
[FONT=&quot]Can you check this please.
[/FONT]

[FONT=&quot]
[/FONT]

[FONT=&quot]Entities[/FONT]


  • Customer


  • Order


  • Pizza


  • Member of Staff

[FONT=&quot]Attributes[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Customer:[/FONT]

  • [FONT=&quot] CustomerNo[/FONT]
  • [FONT=&quot] Customer Name[/FONT]
  • [FONT=&quot] Surname[/FONT]
  • [FONT=&quot] Address[/FONT]
  • [FONT=&quot] Phone Number[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Pizza:[/FONT]

  • [FONT=&quot]Pizza Type[/FONT]
  • [FONT=&quot]Quantity[/FONT]
  • [FONT=&quot]Pizza Price[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Order:[/FONT]

  • [FONT=&quot]Order Date[/FONT]
  • [FONT=&quot]Order Time[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Member of Staff:[/FONT]

  • [FONT=&quot]Employee ID[/FONT]
  • [FONT=&quot]Employee Name[/FONT]
  • [FONT=&quot]Employee Surname[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]First normal form (1NF)[/FONT]

1st Normal Form
CUSTOMER(CustomerNo, CustomerName, CustomerSurname,
ADDRESS, PhoneNumber,)

PIZZA(PizzaID, PizzaType,)

MEMBEROFSTAFF(StaffID, StaffForename, Staff Surname)

ORDER(OrderID, OrderTime, Orderdate, DeliveryCharge, PizzaQuantity , TotalCost)
 
Last edited:

dbDamo

Registered User.
Local time
Today, 15:16
Joined
May 15, 2009
Messages
395
How about different pizza sizes?

What about pizza prices - how do you plan to calculate an order total without any prices?

DeliveryCharge - usually free if you spend a certain amount so would need to be calculated, therefore this should be calculated in a query, not stored in a table?

TotalCost - as i've already said should not be stored in a table, it should be calculated in a query

What if a customer wants more than one kind of pizza - how do you plan to deal with this?


Lots of questions to answer - like I said, you need to list every attribute that you will need to store before you even think about entities - start with that
 

Users who are viewing this thread

Top Bottom