Sie sind auf Seite 1von 8

Al Akhawayn University

School of Science and Engineering


CSC 3326 Database Systems, Fall 2003
Individual Homework assignment 1
Question 1
Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.
1) When designing a new database, it is a good idea to
a.
b.
c.
d.

Avoid data redundancy.


Include redundant fields.
Include a common field in all tables.
Use composite keys.

2) Of the database system environment, which of the following is not considered part of the people
component?
a.
b.
c.
d.

Salesmen
Administrators
Designers
End Users

3) DBMSs are important because


a.
b.
c.
d.
e.

We need good ways of managing such data.


They contain a query language that makes it possible to produce ad hoc queries.
They help create an environment for end users to have access to more data.
All of the above
None of the above

4) IBM bought another database company in 2001. The DBMS that they got as part of the acquisition is
a) DB2 b) UDB c) SQL Anywhere

d) Informix

e) Teradata

5) A primary key
a.
b.
c.

Consists of only one field.


Has the same value for all records.
Must contain a unique value for each record within the table.

d.

Is defined automatically

6) The most important advantages of the hierarchical database model are


a.
b.
c.
d.

Conceptual simplicity, security, integrity, diversity, and security.


Security, efficiency, diversity, simplicity, and integrity.
Integrity, efficiency, diversity, independence, and simplicity.
Conceptual simplicity, security, independence, integrity, and efficiency.

7) The network database models have


a.
b.
c.
d.
e.

A navigational system that yields simple design.


A simple system that promotes efficiency.
An owner/member relationship that promotes database integrity.
a and b
b and c

8) The entity relationship model


a.
b.
c.
d.

Has unlimited constraint representation.


Has unlimited relationship representation.
Has data manipulation language.
Has visual representation that makes it an effective communications tool.

9) The entity integrity rule requires that


a.
b.
c.
d.

All entries are unique.


A part of the key may be null.
Foreign key values do not reference primary key values.
Duplicate object values are allowed.

10) In the context of a database table, the statement "A determines B" indicates that
a.
b.
c.
d.

Knowing the value of attribute A you can not look up the value of attribute B.
You do not need to know the value of attribute A in order to look up the value of attribute B.
Knowing the value of attribute B you can look up the value of attribute A.
Knowing the value of attribute A you can look up the value of attribute B.

Question 2
1. What are the main objectives of data management?
Providing data definition and manipulation functions, and
facilities for recovery, concurrency, consistency, and security.

2. What are the main components of database environment?


DBMS, data, applications, supporting hardware, DBAs,
programmers, and users.
3. Explain the concepts of logical and physical data independence? Give examples of both.
Logical data independence implies that the conceptual model can
be
changed without impacting on existing external schemas.
Logical data
independence protects the application from logical
changes in the
model, e.g. a new table or column. Physical data
independence implies
that the physical storage structures can
be changed without impacting on the conceptual model. Physical
data independence protects logical model against physical
changes, e.g. dropping an index.
4. Briefly discuss the main characteristics of the hierarchical, network, relational and object data models.
What are the advantages and disadvantages of each approach?

The four models reflect the historical development of database


technology.
Hierarchical model: stores data in the form of hierarchies.
Not all systems fit into a hierarchy and this leads to
redundancy.
Main problem - inflexibility.
Network (Codasyl) model: stores data as a network of interlinked sets. Main problem complexity and inflexibility.
Relational model: data represented as a set of tables.
Advanced theoretical support, simplicity and elegance.
Limitation: only suitable for relatively simple data structures.
Object model: treats data as objects with methods, etc.
Benefits with complex data structures.
5. Describe the properties of relations. Which integrity rules apply to the relational model?
Orderofattributes(columns)andtuples(rows)hasnosignificance;allattributevaluesare
atomic; there are no duplicate tuples. Domain integrity, entity integrity, and referential
integrity.

6.

Discuss the concept of data dictionary. What is its purpose and how is it implemented? Can
users update the data dictionary?
Data dictionary records all database elements (ie tables, indexes, etc.). Data dictionary is a
collection of system tables; users can read the data dictionary but may not update directly .

7. How relationships are represented in relational and object databases?


Relational: 1:1 and 1:m relationships are represented as primary/foreign keys pair; m:n
relationships are represented as a new relation with it composite primary key as foreign
keys of the participants of the relationships. OO: all relationships are represented as OIDs
(with the help of collection type if necessary)
8. What is the difference between OODBMS and Object-Relational DBMS?
ORDBMS are basically relational DBMS with some object-oriented features (complex, abstract
data types, ability to handle unstructured data to some extent etc.)

9. Explain the difference between transactional and decision support databases.


A transactional database is primarily designed to support immediate response transactions such as
product or service sales, payments, and supply purchases.
In contrast a decision support database focuses primarily on the production of information required to make
tactical or strategic decisions at middle and high management levels.

Question 3
4 PT
Problem 1
1. Using the table below, what data redundancies do you detect, and how could these
redundancies lead to anomalies? (be specific in your discussion dont just list the types of
anomalies)

What data redundancies do you detect, and how could these redundancies lead to anomalies?
Note that the manager named Holly B. Parker occurs three times, indicating that she manages three projects
coded 21-5Z,25-9T, and 29-2D, respectively. (The occurrences indicate that there is a 1:M relationship
between PROJECT and MANAGER: each project is managed by only one manager but, apparently, a
manager may manage more than one project.) Ms. Parker's phone number and address also occur three
times. If Ms. Parker moves and/or changes her phone number, these changes must be made more than once
and they must all be made correctly... without missing asingle occurrence. If any occurrence is missed
during the change, the data are "different" for the same person. After some time, it may become difficult to
determine what the correct data are. In addition, multiple occurrences invitemisspellings and digit
transpositions, thus producing the same anomalies. The same problems exist for the multiple occurrences of
George F. Dorts.

Problem 2
2. Given the table structure shown below, what problem(s) might you encounter if you deleted all
records with building_code KOM?

If the foreign key of the corresponding building_code KOM is in another table, we can not
delete those records without deleting there matching entries found in the other table. So
as a sequence, we should delete the records of building_code Kom from both tables.

Question 4
7 PT
Problems 1 to 7 of chapter 2 of your textbook (The relational database model) page 9596

Problem solutions from1 up to 6


For each table in the database, identify the primary key and the foreign key(s). If a
table does not have a foreign key, write NONE in the assigned space.
Table

Primary key

Foreign Key(s)

EMPLOYEE EMP_CODE
Prob.
BENEFIT
1

JOB_CODE

EMP_CODE + PLAN_CODE
EMP_CODE,
PLAN_CODE

JOB

JOB_CODE

PLAN

PLAN_CODE

NONE
NONE

Prob.
2

Prob.
3
Relational Schema

Table

Entity Integrity?

EMPLOYEE
BENEFIT

Yes

Each EMP_CODE value is


unique and there are no nulls

Yes

Each
EMP_CODE
values
are
are no nulls

Prob.
4
JOB
PLAN

Yes

EMPLOYEE
Prob.
5

Prob.
6

combination
of
and
PLAN_CODE
unique
and
there

Each JOB_CODE value is


unique and there are no nulls

Yes

Table

Explanation

Each
PLAN_CODE
unique and there are no nulls
Referential
Integrity

value

is

Explanation
Each JOB_CODE value in EMPLOYEE points to an
existing
JOB_CODE
value
in JOB.

Yes

BENEFIT

Yes

JOB

NA

PLAN

NA

Each EMP_CODE value in BENEFIT points to an


existing EMP_CODE value in EMPLOYEE and
each PLAN_CODE value in BENEFIT points to an
existing
PLAN_CODE value in PLAN.

Das könnte Ihnen auch gefallen