Professional Documents
Culture Documents
Review Questions
Lesson 2
Answer each of the following questions labeling your answers clearly. Save your
work in the Desire2Learn Drop box for Lesson 02 – Review Questions.
The purpose of business rules set the stage for the proper identification of
entities, attributes, relationships, and constraints.
The business rules allow us to discern the different entities in the model and the
relation to each other. It is for this reason that the type of relationship can be
determined, whether bidirectional or not, ensuring that the relationships
established between the entities comply with the business rules. As a rule a
nouns translate into entities, the verbs translate into relationships betwen entities,
those relationships are bidirectional.
For example, the business rules “a Teacher may teach many classes” contains
two nouns (teacher and classes) and a verb (“teach”) that associates those
entities.
3. Explain how the entity relationship (ER) model helped produce a more
structured relational
1
to model database components are easier to use and have a series of well-
defined steps to generate all the required database structures
A condition in which the internal model can be changed without affecting the
conceptual model. (The internal model is hardware- independent because it is
unaffected by the computer on which the software is installed Therefore, a
change in storage devices or operating systems will not affect the internal
model.)
Each REGION can have many stores (1: M) and each STORE can be
only in one REGION (1: 1).
Each EMPLOYEE can have only one JOB (1:1) and each JOB
can have many EMPLOYEES (1: M).
2
8. What is the difference between a database and a table?
PROFESSOR
STU_CODE ESTUDENT PROF_CODE DEPT_CODE
PROF_CODE
100278 1 2
100278 2 6
100278 3 6
100278 4 4
128569 2 1 2
128569 2 2 6
128569 2 3 6
128569 2 4 4
3
512272 4 1 2
512272 4 2 6
512272 4 3 6
512272 4 4 4
531235 2 1 2
531235 2 2 6
531235 2 3 6
531235 2 4 4
531268 1 2
531268 2 6
531268 3 6
531268 4 4
533427 1 1 2
533427 1 2 6
533427 1 3 6
533427 1 4 4
PROFESSOR
STU_CODE ESTUDENT PROF_CODE DEPT_CODE
PROF_CODE
128569 2 2 6
512272 4 4 4
531235 2 2 6
553427 1 1 2
4
10. Using the STUDENT and PROFESSOR tables in the figure above,
illustrate a right outer join between the STUDENT and PROFESSOR
tables.
100278
531268
553427 1 2
128569 2 6
531235 2 6
512272 4 4
11. What does it mean to say that a database displays both entity integrity
and referential integrity?
Entity integrity is the condition in which each row (entity instance) goes; the table
has its own unique identity. To ensure entity integrity, the primary key has two
requirements: (1) all of the values in the primary key must be unique and (2) no
key attribute in the primary key can contain a null. The Referential integrity, the
condition in which every reference to an entity instance by another entity instance
is valid. In other words, each foreign key entry must either be null or a valid value
in the primary key of the related table. The requirements on values that are not
null make it impossible to have an invalid value.
12. What are the requirements that two relations must satisfy in order to be
considered union-compatible?
The tables must have the same attribute characteristics; in other words, the
columns and domains must be compatible. When two or more tables share the
same numbers of columns, and their corresponding columns share the same or
compatible domains.
5
13. Using the above diagram, identify the business rules depicted.
A logical model describes data as much possible, this include entities, attributes
relationships, constraints, primary keys for each entity and foreign keys. Basically
determine if the requirements of the business rules are completed. Logical
design is used to translate the conceptual design into the internal model
independent of the actual software that will be used.
It is model in which physical characteristics such as location, path and format are
described for the data. describing the data requires the definition of both the
physical storage devices and the (physical) access methods required to reach
the data within those storage devices, making it both software and hardware
dependent
6
16. Use the tables shown in the figure above; create the table that results
from applying a UNION relational operator to the tables.
BOOTH_PROD BOOTH_PRICE
UCT
chips 1.5
Cola 1.25
Energy Drink 2
Chips 1.25
Chocolate Bar 1
17. Use the tables shown in the figure above; create the table that results
from the MACHINE table DIFFERENCE the BOOTH table.
MACHINE_PRODUCT MACHINE_PRICE
Chips 1.25
Chocolate Bar 1
7
18. Using the figure above, identify the primary key and the foreign key(s).
If a table does not have a foreign key, write none in the space provided.
19. Using the figure above, identify if the tables exhibit entity integrity.
Answer yes or no, and explain your answer.
8
JOB Yes Each value in JOB_CODE is unique and
there are no nulls.
PLAN Yes Each value in PLAN_CODE is unique and
it does not contain null values.
20. Using the figure above, identify if the tables exhibit referential integrity.
Answer yes or no, and explain your answer. Write NA (Not Applicable) if
the table does not have a foreign key.
JOB NA --
PLAN NA --