In: Computer Science
Normalize the following data by:
a) identifying the functional dependencies,
b) stating your assumptions, \
c) creating relations, and
d) identifying primary and foreign keys.
Customer Number| First Name |Last Name |Phone | Invoice Number| Date |Item Type |Quantity Item Price
As the given data is
Customer Number| First Name |Last Name |Phone | Invoice Number| Date |Item Type |Quantity Item Price.
now the solutions are:
a) identifying the functional dependencies :
ans: a functional dependency is defined as the realtionship between the two attirbutes in a data, so generally this functional dependency will be created between the primary key and the non-key attribute.
so from the above given data then functional dependency will be
the customer first name.
becuase here the primary key is the Customer Number and by using
Customer number it is easy to find the customer first name. so
customer first name is the functional dependency.
b) stating your assumptions
the assumptions are defined as the events which appears during a project start to end cyle process and they will throughly analysed. the assumption condition will always be true in the starting and it plays a key role in completing a project with less disturbances.
so from the given data the assumption will helps in creating the analysing the data perfectly.
c) creating relations,
generally the relations are defined as representing a parituclar data with a specific character. now in sql tables relations are defined as the tables where a table is considered as single tuple and the values in each attribute will be considered as a column.
so from the given above data the whole table will be considered as single tuple.
d) identiying the primary key and foriegn key
primary key is defined as the key where it is used as a unique
identifer to retrieve the data.
the features of primary key are:
1. it has a unique value
2. it should not contain null values.
3. there should be only one primary key in a table.
so from the above given table the primary key is Customer Number
foreign key is defined as the key which is used as a link between the tables. the foriegn key in one table is used to match the primary key in another table.
so from the above given data the foriegn key is Invoice number.