DB-III Coc Sample Exam

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

1.

A method of data collection in which the situation of interest is watched and the relevant facts,
actions and behaviours are recorded.
A. Interview
B. Observation
C. Survey
D. Questionnaire

2. 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}

3. You run a SELECT statement and multiple duplicates of values are retrieved. What keyword can
you use to retrieve only the non-duplicate value?
A. DUPILCATE
B. INDIVIDUAL
C. DISTINCT
D. SEPARATE
4. In database modeling, a set of objects with the same properties or characteristics is termed as:
A. Entity instance
B. Entity type
C. Relationship type
D. Relationship instance

5. With SQL, Which types of join should you use if you want to return only matched rows?
A. Inner join
B. left outer join
C. right outer join
D. full outer join

6. Dropping a table will remove:


A. Only the table definition, but not the stored values
B. Only the permission specified for that table
C. Only the stored values, but not the table definition
D. The table definition and all stored values

7. Among the following, which one can be considered as composite attribute for EMPLOEE table?
A. Address
B. Salary
C. ID
D. Sex
8. If you have two entities that have a many to many(M:N) relationship between them , how do you
map them to relational tables
A. you create two tables by defining the column as foreign key to the M side of the entity on
relationship
B. you create each 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 the N side of the entity on
relationship
9. How can you change "Bertukan" into "Birtukan" in the "LastName" column in the Student table?
A. UPDATE Student SET LastName='Bertukan' INTO LastName='Birtukan'
B. MODIFY Student SET LastName='Birtukan' WHERE LastName='Bertukan'
C. UPDATE Student SET LastName='Birtukan' WHERE LastName='Bertukan'
D. MODIFY Student SET LastName='Bertukan' INTO LastName='Birtukan'

10. There are certain packages that allow people to define data items, 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 storage system
B. Batch processing system
C. Database management system
D. Data communication package
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 constraint
B. Entity integrity constraint
C. User defined integrity constraint
D. Referential integrity constraint
12. Given the table shown below, which normalization step is missing?
VEHICLE
Serial_No Owner Model Manufacturer Engine_Size

A. 2NF
B. 3NF
C. 1NF
D. Boyce code
13. In the above given table, how to remove a field named “Engine_Size”?
A. modify table EMPLOYEE delete Engine_Size
B. Alter table EMPLOYEE drop Engine_Size
C. modify table EMPLOYEE delete column Engine_Size
D. Alter table EMPLOYEE drop column Engine_Size

14. With SQL, how do you select all the records from a table named "Student" where the value of
the column "FirstName" starts with an "B"?
A. Select * From STUDENT where FirstName Like '%B%'
B. Select * From STUDENT where FirstName=Like 'B%'
C. Select * From STUDENT where FirstName Like '%B'
D. Select * From STUDENT where FirstName='B'
15. Among the following, which activity helps you to determine the entities, attributes, and
relationships of data?
A. Conceptual database modeling
B. Logical database modeling
C. Physical database modeling
D. Database implementation
16. In the relational modes, cardinality is termed as:
A. Number of tuples.
B. Number of attributes.
C. Number of tables.
D. Number of constraints.
17. Where does the DBMS store the definitions of data elements and their relationships?
A. Data file
B. Index
C. Data dictionary
D. Data map
18. An entity set that does not have sufficient attributes to form a primary key can be considered
as:
A. A strong entity set.
B. Weak entity set.
C. Simple entity set.
D. Primary entity set.
19. With SQL, how can you populate ‘TRAINING’ Table with Rows from EMPLOYEE table?
A. insert into FirstName, LastName TRAINING from EMPLOYEE
B. select FirstName, LastName into EMPLOYEE from TRAINING
C. insert into FirstName, LastName EMPLOYEE from TRAINING/
D. select FirstName, LastName into TRAINING from EMPLOYEE
20. An instance of relational schema R (A, B, C) has distinct values for A including NULL values.
Which one of the following is true?
A. A is a candidate key
B. A is non-key attribute
C. A is a primary Key
D. A is a foreign key
21. The database design that consists of multiple tables that are linked together through matching
data stored in each table is termed as:
A. Hierarchical database
B. Network database
C. Relational database
D. Object oriented database
Column A Column B

_____ 1. The process of periodically taking a copy of the A. Pseudocode


database and log file onto offline storage media.
B. Implementation
_____ 2. Sort a result set
C. Relationship
_____ 3. value of one attribute uniquely determines the value of another
attribute D. Union
_____ 4. No primary key value can be null E. Entity Integrity
_____ 5. The number of participating entities in the relationship. F. First Normal Form
_____ 6. A property of an entity or a relationship.
G. Drop
_____ 7. Building a working model of a database system.
H. Data Structure
_____ 8. A collection of normalized tables.
I. Order By
_____ 9. Represents a value for a column that is currently
J. Entity type
unknown or is not applicable for this record.
K. Second Normal Form
_____ 10. The physical realization of the database and
application designs. L. Null

_____ 11. Method used to define an algorithm. M. Degree of relationship

_____ 12. combine the result-set of two or more SELECT statements N. Third Normal Form
O. Attribute
_____ 13. No partial dependencies
P. Relational database
_____ 14. A set of meaningful associations among entities.
Q. Backup
_____ 15. way of storing and organizing data in a computer
R. Prototyping
S. Functional Dependency
T. Backup
1. In Modular programming, which statement is NOT considered as the benefit?
E. Less code has to be written
F. Codes are simple and easy to understand.
G. It does NOT allows many programmers to collaborate on the same application
H. A large program can be break down into smaller independent modules

2. Among the following term, which one can be considered as multi-value attributes?
A. Name
B. BirthDate
C. CollegeDiploma
D. ID

EMPLOYEE
EmpId FirstName Gender Salary DeptNumber

DEPARTEMENT
DeptNumber DeptName

3. Use the above Employee and Department tables that are related with the DeptNumber column. What can be
the SQL code to provide answer to the following question?
 Find FirstName and salary of all female employees who are working in accounting department
E. Select Gender from EMPLOYEE where DeptName =’accounting’
F. Select FirstName, Salary from EMPLOYEE where Gender = ‘Female’ and DeptNumber in(select
DeptNumber from DEPARTEMENT where DeptName =’accounting’)
G. Select Gender, FirstName, Salary from EMPLOYEE where Gender =‘Female’ and DeptName
=’accounting ‘
H. Select FirstName, Salary from EMPLOYEE, DEPARTEMENT where Gender = ‘Female’
4. The requirement(s) for using Identity Property can be specified as:
A. It can be defined with character data types.
B. Only one identity column is allowed per table
C. It can be updated
D. It does allow null values

5. In DBMS, Which of the following is an advantage?

A. Requires Expertise And Resources To Administer

B. Initial Training Required For All Users

C. Facilitated Development Of New Applications Program

D. Cost Of Hardware And Software

6. In SQL server, which one of the following is a wrong statement?

A. Each entity name should be unique in the same database


B. Two attributes of an entity type can have the same name
C. Count function does not return a NULL if no rows satisfy the WHERE clause.
D. IN operator allows you to specify multiple values in a WHERE clause

7. With SQL, how can you insert new record into FirstName and LastName columns in the "EMPLOYEE" table?
E. Insert into EMPLOYEE (FirstName, LastName) values ('Haimanot', 'Aster')

F. Insert into EMPLOYEE ('Haimanot', ' Aster ')

G. Insert values into EMPLOYEE ('Haimanot', ' Aster ')

H. Insert into (firstName, lastName) values ('Haimanot', 'Aster ')

8. The presence of partial dependencies will be removed during:


A. Second Normal Form
B. First Normal Form
C. ER to relational mapping
D. Insertion of data

9. With SQL, how can you return all the records from a table named "EMPLOYEE" sorted descending by
"FirstName"?
A. Select * from EMPLOYEE ORDER FirstName Descend
B. select * from EMPLOYEE ORDER BY FirstName Desc
C. select * from EMPLOYEE ORDER BY FirstName Asc
D. select * from EMPLOYEE ORDER BY FirstName Ascend

10. With SQL, how can you return the number of all records in the "DEPARTEMENT" table?

A. select count * from DEPARTEMENT

B. select count from DEPARTEMENT

C. select count() from DEPARTEMENT

D. select count(*) from DEPARTEMENT

11. Which one of the following could NOT be considered as an entity type?
A. Book
B. Sex
C. Customer
D. Material

12. In flow chart, which one of the following shows the decisions that must be made?
A. Rectangle
B. Elongated circle
C. Diamond
D. Arrow

13. All of the following are SQL servers system database components except.
A. Master database

B. Conventional Database
C. Model database

D. Tempdb database

14. Assume that there are two given tables, PEPOLE table and LANGUAGE table under the same database name.
What will be the possible relationship between those tables?
A. One - to - Many
B. One - to - One
C. Many - to - Many
D. Has no relationship

15. Which one of the following is NOT a data type in SQL server?
A. ID
B. Date/time
C. Double
D. Money

16. In defining primary keys, which of the following is wrong statement?


A. They cannot be NULL
B. Only unique values can be assigned to them
C. They cannot be character data types
D. They can be used as reference for other columns in a related table

17. To fix the database after a failure such as a hard disk malfunction, the

appropriate keyword is:


A. Backup
B. Recovery
C. Security
D. Access control

18. With DBMS, Which of the following is NOT the Data Definition Language (DDL) command?

A. Alter
B. Update
C. Create
D. Drop
19. In SQL, Which of the following is a correct syntax to modify a table:
A. Alter table <TableName <ColumnName> <data type> <field size> <constraints>

B. ALTER TABLE ADD <columnName> <data type> <field size> <constraint>

C. ALTER TABLE <TableName> ADD <columnName> <data type> <field size> <constraint>

D. ALTER TABLE <TableName> DROP <columnNname><data type> <field size>

20. Which of the following referential integrity constraints should be enforced to specify automatic deletion of a
foreign key record when a record in the base table is deleted
A. On Drop cascade
B. On Delete cascade
C. On Update Cascade
D. On drop set null

21. All of the followings can be considered as Entity integrity constraint Except:
A. Unique
B. Foreign key
C. Identity
D. Primary key
Column A Column B
_____ 1. Algorithm U. Shadow paging
V. Data type
_____ 2. Set of all possible values for an entity
W. Second normal form
_____ 3.Used to Remove database, and its objects X. Query

_____ 4. Relationship type Y. Union


Z. Select
_____ 5. Request for information from a database
AA. Entities
_____ 6. Remove transitive dependency BB. Create table
CC. Drop
_____ 7. Combine the results set
DD. Diamond
_____ 8. Used to Specify tables
EE. Entity type
_____ 9. A named column of a relation FF. Domain

_____ 10. You need to use when you create a conventional GG. Sequence of steps taken to solve a problem

database HH. Attribute


II. Master
_____ 11. Specify search conditions
JJ. Physical data model
_____ 12. The set of allowable/possible values for an attribute KK. Where
LL. Third normal form
_____ 13. Constraint that specify the possible value for each
MM. From
field in the table
NN. Inheritance
_____ 14. A copy-on-write technique

_____ 15. Remove partial dependency

You might also like