[go: up one dir, main page]

0% found this document useful (0 votes)
228 views6 pages

MCQ Adb PDF

This document contains 40 multiple choice questions about relational databases and database schemas. The questions cover topics such as the components of a relational database, the definitions of terms like tables, rows, columns and keys, database schemas and relations, the relational algebra operations like select, project, join, and set operations, entity relationship diagrams, and database integrity constraints.

Uploaded by

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

MCQ Adb PDF

This document contains 40 multiple choice questions about relational databases and database schemas. The questions cover topics such as the components of a relational database, the definitions of terms like tables, rows, columns and keys, database schemas and relations, the relational algebra operations like select, project, join, and set operations, entity relationship diagrams, and database integrity constraints.

Uploaded by

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

This set of Database Multiple Choice Questions & Answers

(MCQs) focuses on “Relational Database and Database


Schema”.

1. A relational database consists of a collection of


a) Tables
b) Fields
c) Records
d) Keys

2. A ________ in a table represents a relationship among a set of values.


a) Column
b) Key
c) Row
d) Entry

3. The term _______ is used to refer to a row.


a) Attribute
b) Tuple
c) Field
d) Instance

4. The term attribute refers to a ___________ of a table.


a) Record
b) Column
c) Tuple
d) Key

5. For each attribute of a relation, there is a set of permitted values, called the ________ of that
attribute.
a) Domain
b) Relation
c) Set
d) Schema

6. Database __________ which is the logical design of the database, and the database _______
which is a snapshot of the data in the database at a given instant in time.
a) Instance, Schema
b) Relation, Schema
c) Relation, Domain
d) Schema, Instance

7. Course(course_id,sec_id,semester)
Here the course_id,sec_id and semester are __________ and course is a _________
a) Relations, Attribute
b) Attributes, Relation
c) Tuple, Relation
d) Tuple, Attributes
8. Which one of the following attribute can be taken as a primary key?
a) Name
b) Street
c) Id
d) Department

9. Which one of the following cannot be taken as a primary key?


a) Id
b) Register number
c) Dept_id
d) Street

10. The relation with the attribute which is the primary key is referenced in another relation. The
relation which has the attribute as a primary key is called
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation

11. The ______ is the one in which the primary key of one relation is used as a normal attribute
in another relation.
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation

12. Which one of the following is a procedural language?


a) Domain relational calculus
b) Tuple relational calculus
c) Relational algebra
d) Query language

13. The_____ operation allows the combining of two relations by merging pairs of tuples, one
from each relation, into a single tuple.
a) Select
b) Join
c) Union
d) Product

14. The result which operation contains all pairs of tuples from the two relations, regardless of
whether their attribute values match.
a) Join
b) Cartesian product
c) Intersection
d) Set difference Intersection

15 The _______operation performs a set union of two “similarly structured” tables


a) Union
b) Join
c) Product
d) Intersect

16. The most commonly used operation in relational algebra for projecting a set of tuple from a
relation is
a) Join
b) Projection
c) Select
d) Union

17. The _______ operator takes the results of two queries and returns only rows that appear in
both result sets.
a) Union
b) Intersect
c) Difference
d) Projection

18. A ________ is a pictorial depiction of the schema of a database that shows the relations in the
database, their attributes, and primary keys and foreign keys.
a) Schema diagram
b) Relational algebra
c) Database diagram
d) Schema flow

19. The _________ provides a set of operations that take one or more relations as input and
return a relation as an output.
a) Schematic representation
b) Relational algebra
c) Scheme diagram
d) Relation flow

20. In the given query which of the keyword has to be inserted?


INSERT INTO employee _____ (1002,Joey,2000);
a) Table
b) Values
c) Relation
d) Field

21. A _____ indicates an absent value that may exist but be unknown or that may not exist at all.
a) Empty tuple
b) New value
c) Null value
d) Old value
22.
CREATE TABLE employee (id INTEGER,name VARCHAR(20),salary NOT NULL);
INSERT INTO employee VALUES (1005,Rach,0);
INSERT INTO employee VALUES (1007,Ross, );
INSERT INTO employee VALUES (1002,Joey,335);
Some of these insert statements will produce an error. Identify the statement.
a) Insert into employee values (1005,Rach,0);
b) Insert into employee values (1002,Joey,335);
c) Insert into employee values (1007,Ross, );
d) None of the mentioned

23. The primary key must be


a) Unique
b) Not null
c) Both Unique and Not null
d) Either Unique or Not null

24. Which of the following is used to insert a tuple from another relation?
a)
INSERT INTO course (course id, title, dept name, credits)
VALUES (’CS-437’, ’DATABASE Systems’, ’Comp. Sci.’, 4);
b)
INSERT INTO instructor
SELECT ID, name, dept name, 18000
FROM student
WHERE dept name = ’Music’ AND tot cred > 144;
c)
INSERT INTO course VALUES (’CS-437’, ’DATABASE Systems’, ’Comp. Sci.’, 4);
d) Not possible

25. 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

26. UPDATE instructor


_____ salary= salary * 1.05;
Fill in with correct keyword to update the instructor relation.
a) Where
b) Set
c) In
d) Select

27. In order to maintain transactional integrity and database consistency, what technology does a
DBMS deploy?
a) Triggers
b) Pointers
c) Locks
d) Cursors

28. A lock that allows concurrent transactions to access different rows of the same table is known
as a
a) Database-level lock
b) Table-level lock
c) Page-level lock
d) Row-level lock

30. Which of the following are introduced to reduce the overheads caused by the log-based
recovery?
a) Checkpoints
b) Indices
c) Deadlocks
d) Locks

31. Which refers to a property of computer to run several operation simultaneously and possible
as computers await response of each other
a) Concurrency
b) Deadlock
c) Backup
d) Recovery

32. Which of the following is used call any function in SQL


a) Select function name;
b) Call function name;
c) EXEC function name;
d) All of about;
Ans. a

33. Which of the following is used call any Procedure ' procedure_name' in SQL
a) Select procedure_name ;
b) Call procedure_name;
c) EXEC procedure_name;
d) All of about;
Ans. b

34. Consider money is transferred from (1)account-A to account-B and (2) account-B to
account-A. Which of the following form a transaction?
a) Only 1
b) Only 2
c) Both 1 and 2 individually
d) Either 1 or 2
Ans. C
35. A transaction may not always complete its execution successfully. Such a transaction is
termed
a) Aborted
b) Terminated
c) Closed
d) All of the mentioned
Ans. a

36. If an transaction is performed in a database and committed, the changes are taken
to the previous state of transaction by
a) Flashback
b) Rollback
c) Both Flashback and Rollback
d) Cannot be done
Ans. d

37. Which of the following is an atomic sequence of database actions?


a) Transaction
b) Concurrency
c) Relations
d) All of the mentioned
Ans. a

38. __________ states that only valid data will be written to the database.
a) Consistency
b) Atomicity
c) Durability
d) Isolation
Ans. a

39. If the state of the database no longer reflects a real state of the world that the database is
supposed to capture, then such a state is called-------------------
a) Consistent state
b) Parallel state
c) Atomic state
d) Inconsistent state
Ans. d

40. Key to represent relationship between tables is called----------------


a) Primary key
b) Secondary Key
c) Foreign Key
d) None of the mentioned
Ans. C

*----------------------------------------------------------------------------------- --*

You might also like