Learning Normalisation (1 Viewer)

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
im trying to understand "Normalisation" up to 4NF. i have attached here my test diagram of what i have understood. any comments or corrections in it?
thank you.
 

Attachments

  • orderDiagram.PNG
    orderDiagram.PNG
    48.3 KB · Views: 248

NauticalGent

Ignore List Poster Boy
Local time
Today, 01:03
Joined
Apr 27, 2015
Messages
6,357
Looks good for the most part. However you may want to double check your DeliveryID in your Delivaries and DelivaryDeatails tables. I suspect your one-to-many relationship is reversed. Also, your relationship in Customers and Orders is not quite right I don’t think...
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
thank you NauticalGent!
how about this?
 

Attachments

  • orderDiagram v1.PNG
    orderDiagram v1.PNG
    47.3 KB · Views: 236

NauticalGent

Ignore List Poster Boy
Local time
Today, 01:03
Joined
Apr 27, 2015
Messages
6,357
Half way there, check your Customers and Orders relationship...
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
oh yeah! :)

seen it. all good now?
 

Attachments

  • orderDiagram v2.PNG
    orderDiagram v2.PNG
    47.8 KB · Views: 209

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
i will now proceed in access. then i hope you can follow along. just to guide my confused mind. :D

i'll first create the table and it's relationships then i'll post it again.

thank you! :)
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 01:03
Joined
Apr 27, 2015
Messages
6,357
Always happy to help. One question, is your project for your use or is this a course you are taking?
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
just for my learning (refreshing).. i've not coded for a very long time.. getting dull i think.:banghead:
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
here is the tables and relationships in access

all good?

if yes, i'll populate it with data. then create a form..

then i'll post it again here.


the problem i see here is in linking the details. order and delivery to their appropriate tables.
 

Attachments

  • Order DB.accdb
    724 KB · Views: 169

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
how do handle this delivery table?

the customer should of course buy first a product before he can have a delivery. how do you do that in user form?

Thank you.
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
should i use insert or can we just properly create a reference/relationship between orderDetails and Deliveries?
 

plog

Banishment Pending
Local time
Today, 00:03
Joined
May 11, 2011
Messages
11,653
I'm looking at the last image file you posted and it's not correct. You've created a circular relationship among Customers, Deliveries, DeliveryDetails, Orders and OrderDetails. There should only be one way to trace a path between tables, but your circular path allows 2.

To fix this more questions have to be asked about your data.

1 why do orders and deliveries both need details?

2 can part of an order be delivered?

3 can a delivery contain more than 1 order?

4 isn't cost more associated with an order than a delivery?
 

jdraw

Super Moderator
Staff member
Local time
Today, 01:03
Joined
Jan 23, 2006
Messages
15,380
?? How do you change a Product's price?
Is there a requirement to report Price history?

You may find this info helpful.

Also, there are a number of youtube videos by Dr. Jennifer Widom on various aspects of Relational database. Here is one. She is very quick, but if you're a fast learner or want a quick reference....
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
@ plog

i know very little about this stuff. so please bear with me..:p

with question
  1. i think i need the details in delivery because if i don't have a details then what will answer the question "what to deliver?"
  2. yes. i may order 5 items, 2 of which i decide to be delivered and 3 i'll just carry up
  3. yes. a delivery can have many orders and orders could have many items
  4. cost association? order has a cost and also delivery. like delivery charge? freight charge?
end with

would that answers make it clearer now?

i have attached a new version of my diagram. is it ok now?
 

Attachments

  • orderDiagram v3.PNG
    orderDiagram v3.PNG
    50.6 KB · Views: 166

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
is it proper to put a cost in delivery details? why order details has no cost?
 

jmq

Registered User.
Local time
Yesterday, 22:03
Joined
Oct 4, 2017
Messages
87
to clarify the [type] in Table Orders
 

Attachments

  • orderDiagram comment @ [type].PNG
    orderDiagram comment @ [type].PNG
    45.1 KB · Views: 173

isladogs

MVP / VIP
Local time
Today, 06:03
Joined
Jan 14, 2017
Messages
18,246
Hi jmq

I've been reading this from the sidelines whilst others are assisting you very well

One question - are you using OneNote to create your relationship diagrams?
Whatever it is, they are very clear and helpful.
 

Users who are viewing this thread

Top Bottom