0% found this document useful (0 votes)
44 views21 pages

Fund of DB Tutorial Questions

The document consists of a series of questions and answers related to database concepts, including database approaches, relational models, normalization, and SQL. It covers topics such as data integrity, relational algebra, and entity-relationship models. The questions are designed to test knowledge on various aspects of database management systems.

Uploaded by

ABuker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views21 pages

Fund of DB Tutorial Questions

The document consists of a series of questions and answers related to database concepts, including database approaches, relational models, normalization, and SQL. It covers topics such as data integrity, relational algebra, and entity-relationship models. The questions are designed to test knowledge on various aspects of database management systems.

Uploaded by

ABuker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Introduction

1) Which one of the following is not the advantage of Database approach of data handling
compared with file-based approach?
A. Data can be shared
B. Data dependency
C. A higher data integrity
D. None
2) The DBMS acts as an interface between what two components of an enterprise-class
database system?
a) Database application and the database
b) Data and the database
c) The user and the database application
d) Database application and SQL
3) The basic component of a file in a file system is a ___.
(A) Data item B) Field C) Record D) Tuple
4) Which one of the following is not true about characteristics of database approach?

a) Data can be shared


b) Data dependency
c) Data Integrity
d) Reduce duplication of data
5) At ___ level of database abstraction, all the database entities and the relationships among
them are included.
A) Physical B) Conceptual C) External D) Internal
Answer:
6) Which one of the following refers to the "data about data"?
a. Directory
b. Sub Data
c. Warehouse
d. Meta Data
7) Which of the following refers to the level of data abstraction that describes exactly how
the data actually stored?
a. Conceptual Level
b. Physical Level
c. File Level
d. Logical Level
8) Which one of the following refers to the total view of the database content?
a. Conceptual view
b. Physical view
c. Internal view
d. External view
9) What are ACID properties of Transactions?
a. Atomicity, Consistency, Isolation, Database
b. Atomicity, Consistency, Isolation, Durability
c. Atomicity, Consistency, Inconsistent, Durability
d. Automatically, Concurrency, Isolation, Durability

Relational Model

10) Which one of the following is FALSE about Relational Database

A. There should be no duplicate tuple in a relation.


B. A single cell can hold multiple values.
C. All the data in a column should be from the same domain
D. In a database having more than one relation, each relation should have a
relationship with at least one other relation.
Answer:

11) “The foreign Key value of an attribute must match a value of the primary key column in
the related table or otherwise it must be NULL.” This statement implies for
____________________ constraint
A. Entity Integrity Constraints
B. Referential Integrity Constraint
C. Relationship Constraint
D. Domain Constraint
Answer:
12) Which one of the following is a derived attribute

A. Salary C. Birth_date
B. Age D. Address
13) Which of the following keys is generally used to represents the relationships between the
tables?

a. Primary key
b. Foreign key
c. Secondary key
d. None of the above
14) The minimal set of super key is called

a. Candidate key
b. Foreign key
c. Primary key
d. None of the above
15) Which of the following is true regarding Referential Integrity?

a. Every primary-key value must match a primary-key value in an associated table


b. Every primary-key value must match a foreign-key value in an associated table
c. Every foreign-key value must match a primary-key value in an associated table
d. Every foreign-key value must match a foreign-key value in an associated table
16) Rows of a relation are known as----------------.

a) Degree
b) Tuples
c) Entity
d) All of the above
17) Which of the following is not a restriction for a table to be a relation?
a) The cells of the table must contain a single value.
b) All of the entries in any column must be of the same kind.
c) The columns must be ordered.
d) No two rows in a table may be identical.
18) A table in relational model is equivalent to ____________ in file base approach.
A. Record
B. File
C. Field
D. Data
19) Which one of the following is not true?
A. A foreign key value can be NULL
B. In a unary relationship (relationship of a relation with itself), there is no need to use a
foreign key.
C. An attribute can be both a foreign key and a primary key for a given relation at the same
time
D. For a given one-to-many relationship between two relations, Foreign key is added to only
one of the participating relations
20) In a relational model the term ‘Cardinality of a relationship’ refers to
A. Number of tuples from one relation which are linked with a single tuple of the second
relation
B. Number of tuples in a relation
C. Number of columns of a relation
D. Number of Entities participated in the relationship
21) __________ constraint is used to ensure that a column meets a specific condition
A. UNIQUE
B. CHECK
C. NULL CONSTRAINT
D. PRIMARY KEY CONSTRAINT
22) Which database integrity deals about the primary key’s uniqueness and have a not null
feature in the table?
A. Domain Integrity
B. Entity Integrity
C. Referential Integrity
D. Key constraints

Answer:
23) The ___ level is at the highest level of database abstraction where only those portions
of the database of concern to a user or application program are included.
A) External B) Conceptual C) Internal D) Physical
Answer:
24) A ___ is a collection of relations with distinct relation names.
A) Domain B) Instance C) Schema D) Relational database
Answer:

Entity Relationship Model (ER-Model)

25) The E-R data model is based on a perception of the real world that consists of a set of
basic objects called ___.
A) Classes
B) Entities
C) Objects
D) Attributes

Answer :

26) ______________ is an entity which is used to handle many-to-many relationships in


database design.
A. Strong Entity
B. Relationship
C. Multivalued Entity
D. Associative Entity
27) Given the basic ER and relational models, which of the following is incorrect?

A. An attribute of an entity can have more than one value

B. An attribute of an entity can be composite

C. In a row of a relational table, an attribute can have exactly one value or a null

Value

D. None

Relational Algebra

28) The ___ operation removes common tuples from the first relation.
A) Union B) Difference C) Cartesian product D) Projection
Ans:
29) _____________ operator of relational algebra is used to remove or retain all or part of
the columns of a given relational table.
A. Select
B. Union
C. Project
D. Intersection
30) Which relational algebra expression is correct to retrieve the whole male or IT
department students?
A, <Fname, LName, Sex, Department>(STUDENT)
B,  <Sex=”Male”  Department=”IT”>(STUDENT)
C, <Sex=”Male”  Department=”IT”>(STUDENT)
D, <Fname, LName, Sex, Department>( <Sex=”Male” 
Department=”IT”>((STUDENT))
Ans:

Normalization
31) In normalization term, if non-key attribute depends on another non-key attribute the
dependency is called _____________
A. Functional Dependency C. Transitive Dependency
B. Normal Form D. None
32) If a relation doesn’t have partial functional dependence but it contains transitive
dependencies, the relation is in _______ Normal Form.
A. 1NF C. 2NF
B. 3NF D. NF

33) A relation that has no partial dependencies is in which normal form


a. First
b. Second
c. Third
d. BCNF
34) Which one of the following is true?
A. Every relation in 3NF is also in BCNF
B. A relation R is in 3NF if every non-prime attribute of R is fully functionally
dependent on every key of R
C. Every relation in BCNF is also in 3NF
D. No relation can be in both BCNF and 3NF

35) Which one of the following is FALSE to say a relation is in 2NF?


A. There are no duplicate rows
B. All non-key attributes are dependent on the key attribute
C. There is no dependency of non-key attribute on another.
D. Data is in tabular format where each cell has a single value
36) If an attribute which is not a member of the primary key is dependent on some part of
the primary key (if we have composite primary key) then that attribute is
__________________on the primary key.
A, Partially functionally dependent
B, Fully functionally dependent
C, Transitive dependency
D, Optimally functionally dependent
37) Which normalization form involves by removing the transitive dependencies between
attributes?
A, First normalization
B, Second normalization
C, Third normalization
D, Boyce-Codd Normal Form
Answer:
38) Which one of the following is false about Normalization
A. Minimize data redundancy, thereby avoiding anomalies and conserving storage space
B. Simplify the enforcement of referential integrity constraint
C. It is the process of data manipulation with operations like insert, update, and delete)
D. Provide a better design that is an improved representation of the real world and a stronger
basis for future growth

SQL

39) The object definition language (OML) is which of the following?


a. Used to develop logical schemas
b. A data definition language for OODB
c. A method to implement a logical schema
d. All of the above.
40) Which of the following is generally used for performing tasks like creating the
structure of the relations, deleting relation?
a. DML(Data Manipulation Language)
b. Query
c. Relational Schema
d. DDL(Data Definition Language)
41) Which one of the following given statements possibly contains the error?
a. select * from emp where empid = 10003;
b. select empid from emp where empid = 10006;
c. select empid from emp;
d. select empid where empid = 1009 and Lastname = 'ADDIS';

42) Which one of the following is a type of Data Manipulation Command?


a. Create
b. Alter
c. Delete
d. All of the above

43) Which of the following is used in the application programs to request data from the
database management system?
a. Data Manipulation language
b. Data Definition Language
c. Data Control Language
d. All of the above
44) In SQL, which command(s) is (are) used to enable/disable a database trigger?
A) Alter Trigger B) Alter Database C) Alter Table D) Modify Trigger
Answer:
45) Which of the following provides the ability to query information from the database and
insert tuples into, delete tuples from, and modify tuples in the database?
a. DML(Data Manipulation Language)
b. DDL(Data Definition Language)
c. Query
d. Relational Schema
46) The given Query can also be replaced with :

SELECT name, course_id FROM instructor, teaches WHERE instructor_ID= teaches_ID;


a. Select name,course_id from teaches,instructor where
instructor_id=course_id;
b. Select name, course_id from instructor natural join teaches;
c. Select name, course_id from instructor;
d. Select course_id from instructor join teaches;

47) Which of the following is generally used for performing tasks like creating the
structure of the relations, deleting relation and so on?

a. DML(Data Manipulation Language)


b. Query
c. Relational Schema
d. DDL(Data Definition Language)
48) Read the Query carefully:

1. SELECT emp_name
2. FROM department
3. WHERE dept_name ______ Science;

In the above-given Query, which of the following can be placed in the Query's blank
portion to select the "dept_name" that also contains Computer Science as its ending string?

a. &
b. _
c. %
d. $
49) Which one of the following is not a type of Data Definition Command?
a) Create
b) Alter
c) Delete
d) All of the above

50) Which one of the following commands is used for removing (or deleting) a relation
forms the SQL database?
a. Delete
b. Drop
c. Remove
d. All of the above
51) Which of the following deletes all tuples in the instructor relation for those instructors
associated with a department located in the Watson building which is in department
relation.
a)

DELETE FROM instructor


WHERE dept_name IN 'Watson';
b)
DELETE FROM department
WHERE building='Watson';
c)

DELETE FROM instructor


WHERE dept_name IN (SELECT dept name
FROM department
WHERE building = ’Watson’);

d) None of the mentioned

52) ______________ is a set of one or more attributes taken collectively to uniquely


identify a record.
a. Primary Key
b. Foreign key
c. Super key
d. Candidate key
53) ____________is the basic mechanisms of removing the unwanted and redundancy as
well as ensuring the consistency of the data in the specified database.
a. Data Integrity
b. Database Integrity
c. Domain Integrity
d. Normalization
Stud_id First_name Last_name Sex CGPA

107 Getachew Yiheyis M 2.82

113 Mesfin Negesse M 3.51

106 Leyla Endris F 3.21

109 Edlawit Amare F 2.37

Table1: Student Relation

1. Given above the relation student, which SQL query is used to select all female students
whose Cummulative_GPA is greater than 3.0.

A. Select sex=’F’ from student where CGPA>3.0

B. Select * from student where sex=’F’ and CGPA>3.0;

C. Select * students from where sex=’F’ AND CGPA>3.0;

D. Select * from student where sex=’F’ & CGPA>3.0;

Given below the relation for EMPLOYEE and DEPARTMENT

EMPLOYEE DEPARTMENT

DeptNo DeptName BlockNo


EmpId EmpName Emp_DeptNo
100 IT 301
555 Chumete 300
200 IS 302
666 Wabela 200
300 CS 303
2. A relational algebra operator applied to tables of EMPLOYEE and DEPARTMENT
produces the table shown below.

EmpId EmpName Emp_DeptNo DeptNo DeptName BlockNo

555 Chumete 300 300 CS 303

666 Wabela 200 200 IS 302

The operator applied to obtain the above table is:

A. Join operator

B. Cross product operator

C. Intersection operator

D. Union operator

Ans:

3. Which one of the following is FALSE about Relational Database

A. There should be no duplicate tuple in a relation.

B. A single cell can hold multiple values.

C. All the data in a column should be from the same domain

D. Every relation should have a Primary Key.

Ans:

4. ______________ defines the tables, the attributes of each table and the relationships
between the tables in the database.

A. Relational instance
B. Relational Schema

C. Database Schema

D. Database Instance

Ans:

5. Which one of the following is correctly matched?

a. Conceptual design-> description of the data, data type, relationship between


data and constraints on the data

b. Logical design -> with selected data model

c. Physical design -> internal storage and file structure will be considered

d. None

Ans:

6. Which of the following is correctly describes the meaning of terminology associated?

a. Network data model – relationship between parent and child is one-to-many

b. Hierarchical data model - relationship between parent and child is one-to-many

c. Relational data model - Stores information or data in the form of tables

d. B and C are correct

Ans:

7. Which of the following is not advantage of normalization in logical design of database

a. Increasing access speed

b. Avoiding duplicate data

c. Minimize insert, update and delete anomalies

d. All are correct

Ans:
8. Which one of the following attribute type can get its value by calculating from other
attributes?

A. Composite B. Derived C. Simple D. Multi-valued

Ans:

9. ______It defines how and where data are organized in physical data storage

a) Internal Schema

b) Conceptual Schema

c) External Schema

d) External and Conceptual Schema

10. During modeling your data, Entity Relationship is applied at

a) Applications and security

b) Physical refinement

c) Conceptual database

d) Schema refinement

11. Criteria that should not be considered when evaluating or assessing requirement analysis?

a) Correctness

b) Need assessment

c) Consistency

d) Speed

12. The SQL command that you use to define the primary key for an existing table called
'Employee' with the primary column to be 'empid'?

a. ADD TABLE Employee ADD PRIMARY KEY (empid)

b. ATTACH TABLE Employee ADD PRIMARY KEY (empid)


c. ADD TABLE Employee ATTACH PRIMARY KEY (empid)

d. ALTER TABLE Employee ADD PRIMARY KEY (empid)

13. While checking normalization process, the problem that doesn’t exist on transitive
dependency is

a. Modification Anomaly

b. Revoke Anomaly

c. Insertion Anomaly

d. Deletion Anomaly

14. You need to produce a report for mailing labels for customers. The mailing label must
have only the customer name and address. The CUSTOMERS table has these columns,
ID ,NAME,ADDRESS,PHONE ,the SELECT statement to accomplishes this task?

a. SELECT name, address FROM customers;

b. SELECT*FROM customers;

c. SELECT id, name, address, phone FROM customers;

d. SELECT cust_name, cust_address FROM customers;

15. If the maximum cardinality is equal to 1 in both directions of a relationship, then it is


classified as:

a. Optional

b. Many-to-many

c. One-to-one

d. One-to-many

16. How do change the PRICE of BOOK whose id =B001 to value of 600

a. CHANGE BOOK SET PRICE =600 Where ID =’B001’;

b. UPDATE TO CHANGE BOOK SET PRICE =600 Where ID =’B001’;


c. UPDATE BOOK SET PRICE =600 Where ID =’B001’;

d. GRANT BOOK SET PRICE =600 Where ID =’B001’;

17. While listing limitation of File Processing System identify the wrong statement?

a. Difficult in accessing data

b. Data isolation and integrity.

c. Data redundancy & inconsistency available.

d. Concurrent access is possible.

18. The Entity Relationship (E-R) Model

a. Entities are represented by circle

b. Attributes are represented by rectangle

c. It represents conceptual view

d. It corresponds to row

19. Removal of transitivity property should be full filled in

a. First Normal form

b. Fourth Normal form

c. Third Normal form

d. Second Normal form

20. How do you prevent system privileges deletion and updating authority on PRICE and
YEAR column of the CATALOGUE table from user Mohammed

a. GRANT DELETE, UPDATE (price,year) ON catalogue From Mohammed

b. ALLOW DELETE, UPDATE (price,year) ON catalogue From Mohammed

c. REVOKE DELETE, UPDATE (price,year) ON catalogue From Mohammed

d. DENY DELETE, UPDATE (price,year) ON catalogue From Mohammed


21. The language associated with a database management system that is employed by end
users and programmers to alter data values in the database is the:

a. Data translation language.

b. Data definition language.

c. Data manipulation language.

d. Data presentation language.

22. ________________ is a database schema that depicts key dependencies between the
primary key and foreign key
a. Relation Schema
b. Database Diagram
c. ER Diagram
d. Schema Diagram

Ans:

23. Assume the relation Staff(eid: integer, ename•. string, age: integer, salary. real)
Write SQL statement that increase employee salary by 5%?
a. UPDATE staff SET salary = salary*1.05
b. ALTER Staff SET salary 0.05
c. MODIFY Staff SET salary salary*.05
d. CHANGE Staff SET salary = salary + 0.05

Ans:

24. In ER diagrammatic notation, _________ attributes are underlined.


a. Key attribute
b. Derived attribute
c. Complex attribute
d. Multivalued Attribute

25. A collection of tables to represent data and relationship among data is represented
through ___________ model
A. ER data model
B. Semi-structure data model
C. Relational data model
D. Object oriented data model

26. A combination of Cartesian product followed by a selection process is called


A. Join algorithm
B. Merge-join algorithm
C. Split-join algorithm
D. Union-join algorithm

27. The data model that develops a database as a collection of tables, where each table can be
stored as a separate file is __________

a. Relational data model

b. Object-relational model

c. Object data model

d. Hierarchical model

28. Among the following which activity helps to determine the entities, attributes and
relationship of data in database design?

a. Physical database modeling

b. Conceptual database modeling

c. Logical Database Modeling

d. Database Implementation

29. If every non-key attribute is functionally dependent on the primary key, then the normal
form will be in ___________

a. 1NF

b. 3NF
c. 4NF

d. 2NF

You might also like