You are on page 1of 2

Zagazig University Subject: Database Lab Exam

Collage of Computers and Model: 1 Time allowed: 30 minutes


Informatics
---------------------------------------------------------------------------------------------------------------------------------------
Name : -…………………………………………………………………… Section:-…………………...
Questions 1:
1.Which SQL statement is used to extract data from a database?

A. get
B. open
C. select
D. display
2. With SQL, how do you select a column named "First Name" from a table named "Persons"?

A. select first_Name from Persons;


B. select Persons.FirstName;
C. extract First Name from Persons;
3. With SQL, how do you select all the records from a table named "Persons" where the value of the column
"FirstName" is "Peter"?
A. select [all] from Persons where FirstName like 'Peter';

B. select [all] from Persons where FirstName='Peter';

C. select * from Persons where FirstName='Peter';

D. select * from Persons where FirstName <> 'Peter';

4. Which SQL keyword is used to sort the result-set?


A. ORDER
B. SORT
C. ORDER BY
D. SORT BY

5. What is the most common type of join?


A. Inner Join
B. Inside Join
C. Outer Join
D. Cross Join

Questions 2:
Write a sql statement to display full name and department name for all employees who work on department's
number is 100.
Questions 3:
1. A table joined with itself is called
(A) Join (B) Self Join
(C) Outer Join (D) Equi Join

2. A primary key if combined with a foreign key creates


(A) Parent-Child relationship between the tables that connect them.
(B) Many to many relationship between the tables that connect them.
(C) Network model between the tables that connect them.
(D) None of the above.
3. In E-R Diagram relationship type is represented by
(A) Ellipse (B) Dashed ellipse
(C) Rectangle (D) Diamond

4. NULL is
(A) The same as 0 for integer (B) the same as blank for character
(C) The same as 0 for integer and blank for character (D) not a value

5. Architecture of the database can be viewed as


(A) two levels. (B) four levels.
(C) three levels. (D) one level.

You might also like