You are on page 1of 7

DATABASE ADMINSTRATOR LEVEL III

MODEL QUESTIONS BOTH KNOWLEDEGE AND PRACTICAL


I. Choose the best answer and encircle the best one from the alternatives :
1. The database design that consists of multiple tables that are linked together through
matching data stored in each table is known as?

A. hierarchical database B. network database


C. relational database D. object oriented database

2. With sql, how can you populate training table with rows from student table?

A. select First Name, Last Name into training from student

B. insert into first name, last name student from training

C. select first name, last name into student from training

D .insert into first name, last name training from student

3. An entity set that does not have sufficient attributes to from a primary key can be
considered as:

A. primary entity set B. simple entity set

C. weak entity set D. strong entity set

4. Where does DBMS store the definition data elements and their relationship?

A. index B. data map C. data file D. data dictionary

5. In the relational modes, cardinality is termed as?

A. number of tuples B. number of attributes C. number of table’s D. number of


constraints

6. Among the following which activity helps you to determine the entities, attributes, and
relationship of data? A. database implementation B. physical database modeling

C.logical database modeling D. conceptual database modeling

7. With sql how do you select all the records from a table name ‘Employee ‘where the values of
the column ‘first name starts with’ A’

A. select all from student where first name =’A’


B. select * from department where first name like %A

C. select * from employee where first name like %

D. select * from employee where first name like’ A%’

8. Here is the given table shown below which normalization step is missing?

Toshiba laptop

Serial number owner Model Manufacturer RAM size


A.Thired normal form B. first normal form C. second normal form D.all are missed

9. from the above given table how to remove the field named MODEL?

A. modify table Toshiba laptop delete column MODEL

B. alter table Toshiba laptop drop MODEL

C. alter table Toshiba laptop drop column MODEL D.all are the correct answer

10. There are certain packages that allow people to define data iteams, place these items in
particular records, combine the records into designated files and then manipulate and retrieve
the stored data .what are they called

A. data communication package B. batch processing system

C. data management system D. data storage system

11. When the values in one or more attributes being used as a foreign key that must exist in
another set of one or more attributes in another table, you have created:

A. Domain integrity constraints B .Entity integrity constraint

C. user defined integrity constraint D. Referential integrity constraint

12. How can you change “Gera “into “Geradd”in the last column name in the employee table?

A. Update employee set last name =”Gera “into last name =”Geradd”

B. Modify employee set last name =”Geradd “into last name =”Gera”

C. Update employee set last name =”Geradd “into last name =”Gera”

D.none
13. If you have two entities that have a many to many (M:N)relationship between them ,how
do you

A. you create two tables by defining the column as foreign key to the M side of the entity on
relationship

B. you can create individual relation as separate tables and introduce a third(new)table by
taking the primary key of the two tales combined together as primary keys and used as
foreign keys

C. you create three separate tables without defining a foreign key to the table on the M side of
the relationship

D. you create two tables by defining the column as foreign key to N side of the entity on
relationship

14 .Among the following which one can be considered as composite attribute for Employee
table?

A .address B. salary C.id D.sex

15. dropping the table will remove?

A. only the table definition, but not the stored values B. only the permission specified

C. only the stored values, but not the table definition D. the table definition and all stored
values

16. deleting the table will remove?

A. only the table definition, but not the stored values B. only the permission specified

C. only the stored values, but not the table definition D. the table definition and all stored
values E. only the records but not the table structures

17. With the sql which type of join should you use if you want to return only matched rows?

A. inner B .left outer join C. right outer join D. full outer join

18. A method of data collection in which the situation of interest is watched and the relevant
facts actions and behaviors are recorded?

A. interview B. observation C. survey D. questioner


19. In database modeling a set of objects with the same properties or characteristics is termed
as?

A. entity instance B. relationship type

C. entity type D. relationship instance

20. Assume that there is a table named R with attributes A, B, C, and D, and A is the primary
key (determinant) of R, then which of the following is true about fully functional dependency?

A. {A} ----> {B, C, D} B. {A, C} ----> {B, D}

C. {B, C} ----> {A, D} D. {B, C, D} ----> {A}

21. You run SELECT statement and multiple duplicates of values are retrieved .what key word
can you use to retrieve only the non-duplication value?

A. duplicate B. individual C. distinct D. separate

Practical exercise

STUDENT
STUDID Name Sex Birth Date Section DeptName
001 Kiros Male 20/02/80 Room 1 Computer
science
002 Mulu Female 12/06/78 Room 1 Computer
science
003 Getachew Male 17/01/70 Room 2 Electrical
004 Melkamu Male 10/09/73 Room 1 Computer
science
005 Seble Female 19/01/82 Room 2 Electrical
COURSE
Course_code Course_title Credit
ICT001 Calculs 80
ICt002 Software 140
Elec003 Elecrtical 200
GRADE_REPORT
SID C_Code Grade
R101 ICT001 B
R101 ICT002 C
R102 ICT001 A
R103 Elec003 C
R104 ICT001 B
R104 ICT002 A
R105 Elec003 B
Develop queries

Instruction:-Under this task you are expected to perform the following activities
based on information provided

 Develop SQL query that retrieve the name of all students who score grade
”B” and save it by the name result in D:drive
 Develop SQL query that retrieve StudID and name of all female students
who taken the course title “software” and save it by the name Soft in
desktop
 Write SQL statements that retrieve all students who score grade “A” in
computer science departments and sort them descending by their
deptname and ascending by their name, and then save it by the name
ordered in D:drive
 Write SQL statements that create a backup for ABC_COLLAGE database
save the back up with the backup name Abcback in Local disk (D:).
 Develop SQL statements that changes the section into “Room 4” of all
student who score grade ‘A’ or ‘B’ for the course title “software”
 Assume that ABC_COLLAGE database was dropped accidentally .why query
that recovery dropped database from that backup.

ANSWERS FOR THE ABOVE QUESTION

create database ABC_College


 use ABC_College
 create table student
 (
 studid varchar(10)primary key,
 name char(30)not null,
 sex char(6)default'female'check(sex='male'or sex='female'),
 birthdate datetime not null,
 section char(6),
 deptName char(40)
 )
 create table COURSE
 (
 course_code varchar(8)primary key,
 course_title char(40)not null,
 credit int
 )
 create table grade_report
 (
 studid varchar(10),
 course_code varchar(8),
 grade char(6)check(grade in('A','B','C','D','F')),
 primary key(studid,course_code),
 foreign key(studid)references student(studid),
 foreign key(course_code)references course(course_code)
 )
 alter table student
 add EmailAaaress char(25)
 select*from student
 select*from course
 select*from grade_report
 insert into student
values('R101','Kiros','male','10/02/80','Room1','computer','
Kiros@gmail.com')
 insert into student
values('R102','mulu','female','12/06/78','Room1','computer',
'alemu@yahoo.com')
 insert into student
values('R103','Getachew','male','11/01/70','Room2','Electric
al','gechew@yahoo.com')
 insert into student
values('R104','Melkamu','male','10/09/73','Room1','computer'
,'Mlkamu@gmail.com')
 insert into student
values('R105','seble','femal','10/01/79','Room2','Electrical
','seble@gmail.com')
 insert into course values('ict001','calculus',80)
 insert into course values('ict002','software',140)
 insert into course values('Elec003','Electrical',200)
 insert into grade_report values('R101','ict001','B')
 insert into grade_report values('R101','ict002','C')
 insert into grade_report values('R102','ict001','A')
 insert into grade_report values('R103','Elec003','C')
 insert into grade_report values('R104','ict001','B')
 insert into grade_report values('R104','ict002','A')
 insert into grade_report values('R105','Elec','B')
 1 select student.name from student
 where student.studid in(select grade_report.studid from
grade_report
 where grade_report.grade='B')
 2 select student.studid,student.name from
student,grade_report,course
 where student.studid=grade_report.studid and
 grade_report.course_code=course.course_code and
 course.course_title='software'
 3 select*from student
 where student.deptname='computer' and
 student.studid in(select grade_report.studid from
grade_report
 where grade_report.grade='A')order by student.deptname
desc,student.name asc
 4 backup database ABC_College to
disk='D:\senayt\ABC_College.back'
 5 update student set section='room4'
 where student.studid in(select grade_report.studid from
grade_report,course
 where grade_report.course_code=course.course_code
 and course.course_title='software'
 and grade_report.grade in('A','B'))
 6 drop database ABC_College
 restore database ABC_College from
disk='D:\senayt\ABC_College.back'

You might also like