Professional Documents
Culture Documents
Midterm Exam Academic year 2009/2010 Course name: Introduction to DataBase (SFDV3002) Date: Saturday 7/11/2009 Time: 1 Hour ( 4.00 5.00 pm) College: Ibri College of Applied Science
Student ID:________________
Examiner:
Signature .
1 out of 6
Answers:
10
11
12
13
14
15
2 out of 6
60 Marks ( 4 x15)
1. To define the structure of the database we use: a. DDL b. DML c. DCL d. All of the above.
2. One or more of the DBMS types are: a. Hierarchical. b. Relational. c. Network. d. All of the above.
a. Applications are independent of data. b. No data duplication. c. No standard data model. d. All of the above.
5. Each attribute name must be unique within: a. One database. b. One schema. c. One entity. d. Can't be unique.
6. Metadata is stored in a. sequence b. file c. column d. catalog
7.
The project operator, in algebraic notations: a. Takes one input relation and produces two output relations. b. Takes two input relations and produces one output relation. c. Takes one input relation and produces one output relation. d. Takes two input relations and produces two output relations.
4 out of 6
b. c. d.
= a A = a
9. In databases, integrity rules can apply to: a. One column. b. One relation. c. Whole database. d. All of the above.
10.A column declared as unique must have a. b. c. d. Not null values Non-duplicate values Zero values All the above
11.
The set operators, in algebraic notations: a. Takes compatible source relations. b. Produces output relation that has attributes of source relations. c. Produces output relation that doesn't have any duplicate tuple. d. All of the above.
12.salary > 10000 is a a. b. c. d. Built-in integrity rule User defined Integrity rule Both A and B None of the above
5 out of 6
13.Table constraint is usually written a. b. c. d. At the end of the create table query. After the column Before the column None of the above
14.
The order by clause sorts the column by default in a. b. c. d. Ascending order Descending order No order None of the above
15. A normal field in one relation that is a primary key in another relation is called: a. Composite key. b. Foreign key. c. Surrogate key. d. Alternate key.
40 Marks (4x10)
Employee Emp_ID 12 14 15 18 19 22 Emp_NAME Salem Abdullah Aisha Rahma Eiman Barka Dept_Code
ACCT ACCT COSC FINC
<null>
INFO
6 out of 6
Department Dept_code
ACCT FINC COSC INFO
Dept_Name
Accounting Finance Computer Science Information Science
1. Write an SQL statement to add a column Emp_address of data type variable character of size 50 in the Employee table.
2. Write an SQL statement that will retrieve Employee ID, Employee name and the department name that he/she works in.
3. Write an algebraic notation that will retrieve the same output in the previous question(2).
Possible solution:
7 out of 6
4. Translate the following ER Diagram into relational model. Show different relations that will result in addition to their attributes and PKs and FKs.
Tought Teach
Course # Cs_NUM * Cs_name * Prerequisite to their attributes and PKs and FKs.
Possible solution:
Course
Enrol
= ( Lect_NUM, Cs_NUM )
8 out of 6
9 out of 6