DB Sample Exam Intake30
DB Sample Exam Intake30
DB Sample Exam Intake30
Alexandria Branch
Question #1(True or False & MCQs)
Part1: State whether true or false and correct the wrong statement:
1. The normal forms 1NF and 2NF are intermediate steps to 3NF.
2. A relation R is in the second normal form if and only if it is in 1NF and every nonkey attribute
is fully dependent on the foreign key.
3. Database management system is a layer of software between the physical database itself
and the users of the system.
4. SQL language has data definition statements such as INSERT, UPDATE, DELETE and data
manipulation statements such as CREATE.
5. The relationship between Employee and Project is always one to many (1:M)
6. Two distinct tuples cannot have identical values in all fields that comprise a primary key
7. We can use this statement: SELECT ENAME FROM EMP WHERE ENAME='K%'
To get all employee names that start with letter 'K' in table EMP.
8. If a base table is dropped, all the related views will be automatically dropped.
9. There are physical records corresponding to user created views.
10. Relational data base relation may accept multi-valued data items (attributes).
11. Deleting all tuples of a relation is equivalent to dropping it.
12. Part of the primary key may accept null value.
13. In a relation the tuples are ordered top to bottom.
Part2: Please read the following statement carefully and then make your choice by selecting A, B,
C, D, or E where exists.
1|Page
Information Technology Institute Database Sample Exam Intake30
Alexandria Branch
4. Given a relation country (name, continent, population) which of the following is a valid SQL
statement?
5. An attribute that can be broken down into smaller parts is called a(n) ___ attribute.
A) associative.
B) simple.
C) composite.
D) complex.
E) none of the above.
6. To get all the rows from the students table, which of the following SQL
Statements should be used?
A) Select * from Students where name= none group by name.
B) Select * from Students.
C) Select * from Students where name= A or B Group by name.
D) None of the above.
Donation (DonorID#, Date, Name, Member, Phone, Address, City, State, Zip, Location, Description,
Age, Price, Quantity, Value, TotalValue)
And assuming that;
All the data from the application form belongs to one big table with DonorID# and Date
primary key.
Donor Information is specified by (DonorID#, Name, Member, Phone, Address, City, State,
Zip, Location, Age)
Donated item is specified by (DonorID#, Date, and Description, Quantity)
Donor's Location is specified by (Address, city, state, Zip)
Note: A donor can donate more than one item in a given donation.
Draw the Functional dependency diagram and put the table in the 3NF.
2|Page
Information Technology Institute Database Sample Exam Intake30
Alexandria Branch
Question #2(Database Modeling Drawing ERD):
Part1:
A database for a banking system is used to control withdrawal, deposit and loan transactions with
customers, banks which use this database has many branches and use this database system in all of
branches.
The database stores information about customers as cust_id (unique), name, address, and phone.
And about credits the database stores credit_no (unique), amount and last_transaction_date.
And about each branch the database stores branch_name, address (unique), phone.
And about each transaction a database stores trns_no (unique for each customer), trans_type,
trans_date, trans_amount
Assume:
- Each customer can deal with any branch.
- All of branches are permitted to make withdrawal and deposit transactions but only essential
branches can make loan transaction.
- Customer can make any transaction.
- Each customer must have one credit no (not more than one credit for each customer).
4|Page
Information Technology Institute Database Sample Exam Intake30
Alexandria Branch
Part3:
Consider the following:
A database is designed for a medium sized company dealing with industrial applications of
computers has these relations:
5|Page
Information Technology Institute Database Sample Exam Intake30
Alexandria Branch
Part4 (SQL MCQs):
6|Page
Information Technology Institute Database Sample Exam Intake30
Alexandria Branch
4- Which select statement displays the number of items whose price is greater than
5.00?
a- Select sum (*)
from inventory
where price > 5.00
6- Ifyou are writing a select statement to join three tables using join conditions, what
is the number of join conditions needed?
a. 0
b. 1
c. 2
d. 3
7|Page
Information Technology Institute Database Sample Exam Intake30
Alexandria Branch
Question #4(Mapping):
For the given ER diagram, find tables required to represent it , show the primary key and the
foreign key in each table.
Part1:
Part2:
8|Page