NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


Table Design
The initial table design of our system is:
Table : food_menu{food_id, menu_id, food_price, menu_name, food_name, description, food_description, food_type}


Composite Primary keys with justification
We made composite primary key composed of two key attributes. i.e food_id and menu_id.

Partial Dependency
In our entity set we see that menu_name and description is partially dependent on menu_id.
And food_name , food_price, food_description, food_type is partially dependent on food_id.


Functional Dependency¬¬¬
Table: menu{menu_id, food_id, menu_name, description }
{menu_id}{ menu_name }

Table: food { food_id, food_name, food_type, food_description, food_price}
{food_id}{food_name}
{food_id}{price}

Normalization

1NF test
For 1NF test there should not be any multiple values in the single column.
Table : food_menu{food_id, menu_id, food_price, menu_name, food_name, description, food_description, food_type}
This table initially satisfies 1NF condition. As there are no multiple values in single column.


2NF test
For 2NF test non key attribute should be totally dependent on composite primary key considering there exists composite primary key. In our entity set we see that menu_name and description is partially dependent on menu_id. food_name , food_price, food_description, food_type is partially dependent on food_id.
Now we use 2NF rule to create two table ie food and menu as food_id and menu_id as their primary key respectively.

Table: menu{menu_id, food_id, menu_name, description }
Table: food { food_id, food_name, food_type, food_description, food_price}

3NF test
For 3NF test there should not exist any transitive dependency in the table. The table after 2NF test is given below:
Table: menu{menu_id, menu_name, description }
Table: food { food_id, food_name, food_type, food_description, food_price}
menu_name is dependent on menu_id and no other attribute is dependent on menu_name. So the table for menu remains same.
food_name is dependent on food_id. And food_price is also dependent on food_id. So there is no transitive dependency in our table. Also the table of the food remains same as the 2NF.


Primary Key¬¬
After the normalization process we created two tables food and menu with food_id and menu_id as their primary keys respectively.The underlined attributes in each entity are the primary keys of the corresponding entities because it uniquely identifies each entity.
1. menu (menu_id, food_id, menu_name, description)
menu_id is selected as the primary key because it can have a distinct value unlike other attributes in the table employee. i.e food_id, menu_name, price, description. There are several menus in our system. menu_id can uniquely identify the menus among various menus.
2. food (food_id, food_name, food_type, food_description, food_price)
There are several food among the food table. For a example Mo:Mo cannont uniquely identify the the food item. There are other variety of the similar food. We used food_id as the single attribute key for our primary key.
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.