Download Database Management Systems

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

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

Document related concepts

Microsoft Access wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Serializability wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Oracle Database wikipedia , lookup

IMDb wikipedia , lookup

Ingres (database) wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Relational algebra wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Versant Object Database wikipedia , lookup

ContactPoint wikipedia , lookup

Database model wikipedia , lookup

Relational model wikipedia , lookup

Transcript
CS 370/IT 376 Fall 2004 Exam 1
Page 1
Database Management Systems
10/1/04
Name__________________________
1. List three advantages of a database system and give an example of each.
[9 pts]
a.
b.
c.
2. Describe for each of these database users their type of interaction with the database.
[9 pts]
DBA:
Naïve user:
Applications programmer:
3. Definitions.
[9 pts]
Data dictionary:
Integrity constraint:
Entity set:
4. True/false on the 3 schema architecture.
[6 pts]
______ There can be multiple conceptual schemas per database.
______ There may be many different external schemas mapped to each/the conceptual schema.
______ The internal/physical schema is concerned about such things as data layout on disk,
data types, indexes.
______ The end user typically views the conceptual schema(s) of the database.
______ The database administrator oversees all schema layers.
______ Data independence says that changes to the internal schema should not affect
applications built on the conceptual schema(s).
CS 370/IT 376 Fall 2004 Exam 1
5.
Page 2
True/false on normalization theory.
[10 pts]
______ Normalization attempts to eliminate redundant facts stored in a database.
______ Redundancy is at the root of insertion and deletion anomalies in a relational database.
______ Formal definitions of relational databases call for all values to be non-null.
______ Functional dependencies can be ascertained by analysis of the relation.
______ Transitivity of functional dependencies means that if a →b and a→c then c→b.
______ Decomposition of FDs mean that if a→bc then a→b and a→c
______ 2NF relations are by definition 1NF
______ 3NF relations do not contain any transitive dependencies
______ 3NF relations do not contain FDs between non-key and a subkey
______ All 3NF relations can be decomposed to BCNF
For the remaining questions, use the following bookstore database schema. Keys are underlined. ISBN
is the unique book ID number. The rest of the attributes should be self-evident. If not, please
ask for clarification.
CUSTOMER (CID, Name, Street, City, State, Zip, CreditLimit)
BOOK(ISBN, Title, Author, CopiesOnHand, Price, PBID)
PURCHASED(ISBN,CID, DatePurchase, Copies)
BACKORDER(ISBN, CID, Copies, HomePhone)
PUBLISHER(PBID, Name, Street, City, State, Zip)
7. Describe as precisely as you can, and in any notation or language syntax you want, an
appropriate domain for attribute CopiesOnHand. Also do the same for attribute Zip.
[6 pts]
8.
CS 370/IT 376 Fall 2004 Exam 1
Page 3
Give Relational Algebra statements for the following queries on the Bookstore database
schema.
[20 pts]
Syntax for Relational Algebra expressions:
condition(relation)
attribute-list(relation)
relation1 OP relation2, where OP is , , - , , , and ||cond
new-rel(attr)  R.A. expression
a) List all customers by name, street and city from the state of Maryland (coded as ‘MD’).
b) List the zip codes on record in which there are no customers from. (Hint use set difference)
c) List all book titles of which there are more than 3 on hand.
d) List publishers who have backordered books on order.
9. There are two attributes in three relations that have functional dependencies on either a non-key or
sub-key. They are Zip and HomePhone. Decompose the offending relations so that the resulting
relations are in 3NF.
[10 pts]
CS 370/IT 376 Fall 2004 Exam 1
Page 4
10. Draw an E-R diagram for your normalized schema. Be sure to identify potential multivalued
attributes, the cardinality of each relationship (1:n, m:n). Be sure to consider table(s) that represent
relationships.
[20 pts]