Professional Documents
Culture Documents
2. Do the tables exhibit entity integrity? Answer yes or no and then explain your answer
3. Do the tables exhibit referential integrity? Answer yes or no and then explain your answer. Write NA
(Not Applicable) if the table does not have a foreign key.
4. Describe the type(s) of relationship(s) between STORE and REGION (i.e. 1:1. I:N, or N:M), and explain
why.
Ans:-
TABLES RELATIONSHIP
STORE-TO-REGION 1:1
REGION-TO-STORE 1:M
EXPLANATION:
A) STORE-TO-REGION: As per tables, these tables are in one-to-one relationship (1:1), the reason being
one STORE having a STORE_CODE can be present only at one REGION at a time.
For examples: as per table, STORE_CODE:1 is just present in REGION_CODE:1, similarly same for all
values in the table.
B) REGION-TO-STORE: As per tables, these tables are in one-to-many relationship (1:M), the reason
being multiple stores are present in one REGION.
For examples: as per table, STORE_CODE:1 is present in REGION_CODE:1&2 as well, similarly same for
all values in the table.
5. Describe the type(s) of relationship(s) between EMPLOYEE and STORE, and explain why. (Hint: Each
store employs many employees, one of whom manages the store.)
Ans:-
TABLES RELATIONSHIP
STORE-TO-EMP 1:M
EMP-TO-STORE 1:1
EXPLANATION:
EMPLOYEE TO STORE: as per the table, one STORE having STORE_CODE:4 has six employees and
similarly STORE_CODE:3 is having six employees.
EMPLOYEE TO STORE: as per two tables EMPLOYEE and STORE, one employee works for only one store
at a time.
STORE TO EMPLOYEE: as per the two tables EMPLOYEE and STORE, one store can have multiple
employee working for it. Example: Store associated with STORE_CODE: 4 has 6 employees working for it.
6. Draw the database design to show the relationships among EMPLOYEE, STORE, and REGION, specify
the primary keys and foreign keys.
Ans:-