Download Assignment 1 - Al Akhawayn University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Concurrency control wikipedia, lookup

Microsoft Jet Database Engine wikipedia, lookup

Database wikipedia, lookup

Relational algebra wikipedia, lookup

Entity–attribute–value model wikipedia, lookup

Clusterpoint wikipedia, lookup

Functional Database Model wikipedia, lookup

Extensible Storage Engine wikipedia, lookup

Object-relational impedance mismatch wikipedia, lookup

Relational model wikipedia, lookup

Database model wikipedia, lookup

Transcript
Al Akhawayn University
School of Science and Engineering
CSC 3326 Database Systems
Individual Homework assignment 1
(Deadline 4th Feb, 12:30)
Question 1 (5pt/20)
a. Suppose that you have an application area to model: When and why will apply the file system
or database system?
b. Define the following terms: relation, schema, attribute, relational algebra, data independence
c. When is it meaningful to create many indexes on DB?
d. The following Entities: company, Boss, employee, external consultant.
Give here the
relationships
e. Give your own examples for the following relationships: 1-1, 1-M, and M-N
Question 2 (3/20)
Given the file structure shown in the following figure, answer
a. How many records does the table contain, and how many fields are there per record?
b. What could be the primary key of this table? How would you solve this problem by altering
the file structure?
c. Is possible to make a listing of the table by city, zip code? If not how would you alter the
table structure?
Question 3 (2pt/20)
Suppose that you are using the following database composed of the two tables:
Table name: Customer
Table name: SALES REP
Identify the primary keys.
a. Identify the foreign key.
b. Suppose you wanted quick retrieval to get a listing of all customers directed by a given
representative. What table would be the basis for the index table, and what would be the
index key?
Question 4 (10/20)
Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.
1. A relational database data is organized as
a.
b.
c.
d.
a collection of records.
a collection of common fields.
elements.
tables.
2. A foreign key must
a.
b.
c.
d.
be numeric.
be unique.
be defined in all tables within the database.
match the field value of a primary key in a related table.
3. A database model is a collection of logical constructs used to represent the data structure and
relationship. Database models are
a.
b.
c.
d.
conceptual.
conceptual and Relationship.
conceptual and Implementation.
implementation and relationship.
4. The hierarchical database model depicts a set of _______________relationship.
a.
b.
many to one
one to one
c.
d.
one to many
many to many
5. An ad hoc query is
a.
b.
c.
d.
a pre-scheduled question.
a spur of the moment question.
a pre-planned question.
none of the above
6. Nulls, if used improperly, can create problems because they can represent:
a.
b.
c.
d.
e.
An unknown attribute value.
A known, but missing, attribute value.
A "not applicable" condition.
All of the above
None of the above
7. 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.
8. The referential integrity rule requires that
a.
every null foreign key value must reference an existing primary key value.
b.
it makes it possible for an attribute to have a corresponding value.
c.
every non-null foreign key value must reference an existing primary key value.
d.
it makes it possible to delete a row in one table whose primary key does not have a matching
foreign key value in another table.
9. A table can be logically connected to another table by defining a
a.
b.
c.
d.
hyperlink.
common field.
primary key.
foreign key.
10. Each table must have
a.
b.
c.
d.
a primary key.
a secondary key.
a foreign key.
a logical key.