Sei sulla pagina 1di 8

EDB1 mock exam

MODULE
DAY
DATE
TIME

Module
Lecturer
Supervisor
Room

: EDB1
:
:
:

EDB1
FRN

Distribution of points: See exercises.


Number of pages: 7 (including exam appendices)
Additional aids:
NONE.

EDB1 mock exam

Exercise 1

[20 points]

Below you will find an example of a form of a car rental company, with rental details of one the many rental
cars from a certain period.

Car Rental Company KORPERSHOEK, Rotterdam


Overview rental cars
License plate
BN-12-GJ
Make
Mercedes
Garage
Mercedes dealer "De Waard"
Type
mini van
Rental price p/day
67,=
Customer
Witgoed NV
Witgoed NV
Jansen J.
Beheer BV
Etc.

Postcode
4883 KP
4883 KP
1234 AB
3772 BH

Number
6353728
6353728
FD76373
6378282

start
12-02-98
23-02-99
01-04-99
02-05-99

end
31-01-99
31-03-99
01-04-99
10-06-99

days
347
37
1
40

Damage
N
N
N
N

Furthermore:
- "Number" is a passport number or drivers license number.
- the rental price depends on the make of the car, age of the car and state of the car.
- Every make is serviced by one specialized garage.
a)

Bring the details in the third normal form.

b)

Make the strip diagram.

No sloppy work, no crossed out words, no mess, etcetera: first finish this exercise on a draft
paper!

EDB1 mock exam

Exercise 2

[20 points]

Choose the one alternative that best completes the statement or answers the question.
1) A database designed to implement requirements for a reporting application needed by
the Sales department is a database being designed ________.
A) as a new systems development project
B) as a redesign of an existing database
C) from existing non-database data
D) A and B
E) A, B, and C

1) ______

2) A database designed to combine two databases used by the Sales department is a


database being designed ________.
A) as a redesign of an existing database
B) as a new systems development project
C) from existing data
D) A and B
E) A, B, and C

2) ______

3) Business organizations have resisted adopting object-oriented database management


systems because ________.
A) the cost of purchasing OODBMS packages is prohibitively high
B) object-oriented programming uses simplified data structures that fit easily into
relational databases
C) the cost of converting data from relational databases to OODBMSs is too high
D) most large organizations have older applications that are not based on object
oriented programming
E) C and D

3) ______

4) A database records:
A) facts.
B) figures.
C) information.
D) A and B
E) A, B and C

4) ______

5) In an SQL query, which SQL keyword actually creates the query?


A) SET
B) FROM
C) SELECT
D) WHERE

5) ______
E) EXISTS

6) In an SQL query, the built-in function COUNT works with columns containing data of
which of the following data types?
A) Integer
B) Char
C) Numeric
D) A and B
E) A, B and C

6) ______

EDB1 mock exam

7) A determinant that determines all the other columns in a relation is a(n) ________.
A) record
B) candidate key
C) field
D) surrogate key
E) foreign key

7) ______

8) Normalization is a process used to deal with which of the following modification


anomalies?
A) Insertion anomaly
B) Deletion anomaly
C) Update anomaly
D) A and B
E) A, B and C

8) ______

9) The industry standard supported by all major DBMSs that allows tables to be joined
together is called ________.
A) Structured Query Language (SQL)
B) Sequential Query Language (SQL)
C) Relational Question Language (RQL)
D) Relational Query Language (RQL)
E) Structured Question Language (SQL)

9) ______

10) In an SQL query, which built-in function is used to obtain the largest value of numeric
columns?
A) SUM
B) COUNT
C) MIN
D) AVG
E) MAX

10) _____

11) A combination of two or more columns used to identify particular rows in a relation is
a(n) ________.
A) foreign key
B) surrogate key
C) field
D) record
E) composite key

11) _____

12) An online drugstore such as Drugstore.com is an example of a(n) ________.


A) multiuser database application
B) e-commerce database application
C) single-user database application
D) A or B
E) Any of A, B or C

12) _____

EDB1 mock exam

TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false.
13) Database design is important, but fortunately it is simple to do.

13) _____

14) In a database processing system, indexes are held by the database management
system (DBMS).

14) _____

15) XML Web services allow database processing to be shared across the Internet.

15) _____

16) All database applications get and put database data by sending SQL statements to the
DBMS.

16) _____

17) A WHERE clause can contain only one condition.

17) _____

18) SQL commands can be embedded in application programs.

18) _____

19) The condition in WHERE clauses can refer to a set of values by using the IN operator.

19) _____

20) A relation is a three-dimensional table.

20) _____

21) Functional dependencies can involve groups of attributes.

21) _____

22) A database is called "self-describing" because it reduces data duplication.

22) _____

23) The SQL keyword FROM is used to specify the table to be used.

23) _____

24) All relations are tables, but not all tables are relations.

24) _____

25) Data is recorded facts and figures; information is knowledge derived from data.

25) _____

Exercise 3

[30 points]

Write down the following questions in SQL. Use the table descriptions from appendix 1.
a)

Give the details of all teachers who have a salary number smaller than 45.

b)

Give all course names and prices of those courses, of which the course name starts with an
x and the course names and prices have to be shown of those courses that do not start with an x
but do have a price greater than 1100 euro.

c)

Give the teacher# of teachers that have taught the course LOTUS-NOTES.

d)

Give the names of the teachers and their monthly salary of those teachers that were planned (for a
course) after 31-Jan-2003.

f)

Give an overview, ordered by course date, of the teacher#s, with the last course date, for which the
teachers are planned. The last (youngest) date must be the first in the overview.

g)

On which dates did we have more than 5 teachers working?

h)

Give teacher#, teacher name, the average course price and the number of courses for which he/she
is planned, for those teachers from Valkenswaard or Veldhoven and for which the course price is
greater than 300 euro.

i)

Give the average salary of the teachers per place, but not from Eindhoven and only if there are
more than 3 teachers that live in that place.

Exercise 4

[20 points]

The student sports center in Eindhoven has a brochure with information about the activities for this
school year. Below you will find part of an overview of the sports activities.
Activity

Hall

Karate

Size
(m2)
150

Yoga

75

Judo

200

Teacher

Description

Day

Start

End

Duration

K. Mitsubishi
Y. Toyota
K. Mitsubishi
S. Ittight
H. Eadstand
B. Belt

beginners
advanced level
expert level
hata yoga
beginners
Competition
group
beginners

Tue
Mon
Wed
Mon
Wed
Mon

21.00
17.00
19.00
20.00
16.45
20.00

22.00
18.30
20.00
21.30
18.00
21.30

60
90
60
90
75
90

Mon

19.00

20.00

60

G. Belt

a) Is there a repeating group? If so, write down all attributes from this group.
b) Are there process details? If so, write them down.
c) Describe three different dependencies in the schedule above, in the following notation:
A B

Appendix 1
Table description for exercise 2:
CREATE TABLE Salary
{salary details }
(sal#
NUMBER(2)
NOT NULL,
{salary number}
amount
NUMBER(5,2)
NOT NULL,
{monthly salary}
PRIMARY KEY (sal#)
);
CREATE TABLE Teacher
{teacher details}
(teacher#
NUMBER(3)
NOT NULL,
{unique code of the teacher}
name
VARCHAR(20) NOT NULL,
{name of the teacher}
address
VARCHAR(25) NOT NULL,
{address of the teacher}
place
VARCHAR(25) ,
{place of the teacher}
sal#
NUMBER (2)
,
{salary number of the teacher}
PRIMARY KEY (teacher#)
,
FOREIGN KEY (sal#) REFERENCES Salary(sal#)
ON DELETE NULLIFY
);
CREATE TABLE Planning
{planned courses}
(teacher#
NUMBER(3)
NOT NULL,
{teacher number}
date
DATE
NOT NULL,
{planned course date}
c_name
VARCHAR(11) ,
{name of the course}
PRIMARY KEY (teacher#, date)
,
FOREIGN KEY (teacher#) REFERENCES Teacher(teacher#)
FOREIGN KEY (c_name) REFERENCES Course(c_name)
);
CREATE TABLE Course
{course details}
(c_name
VARCHAR(15) NOT NULL,
{name of the course}
descr
VARCHAR(35) NOT NULL,
{description of the course}
price
NUMBER(5,2)
,
{price of the course}
PRIMARY KEY (c_name)
);

Potrebbero piacerti anche