DBMS MCQ Questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

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 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 valued, called the
______________ of that attribute.
a. Domain
b. Relation
c. Set
d. Schema

6. Which one of the following is a set of one or more attributes taken collectively to
uniquely identify a record?
a. Candidate Key
b. Sub Key
c. Super Key
d. Foreign Key

7. Consider attribute ID, CITY and NAME . Which one of this can be considered as a
Primary key?
a. NAME
b. ID
c. CITY
d. CITY, ID
8. A ___________ is a property of the entire relation, rather than of the individual tuples
in which each tuple is unique.
a. Rows
b. Key
c. Attribute
d. Fields

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


a. NAME
b. ID
c. STREET
d. DEPARTMENT

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


a. ID
b. REGISTER NUMBER
c. DEPT_ID
d. STREET

11. A attribute in a relation is a foreign key if the ______________ key form one relation
is used as an attribute in that relation.
a. Candidate
b. Primary
c. Super
d. Sub

12. A ___________________ integrity constraint requires that the values appearing in


specified attributes of any tuple in the referencing relation also appear in specified
attributes of at least one tuple in the referenced relation.
a. Referential
b. Referencing
c. Specific
d. Primary

13. Using which language can a user request information from a database?
a. Query
b. Relational
c. Structural
d. Compiler
14. The most commonly used operation in relational algebra for projection a set of tuple
from a relation is
a. Join
b. Projection
c. Select
d. Union

15. Which one of the following is used to define the structure of the relation , deleting
relations and relating schemas?
a. DML
b. DDL
c. Query
d. Relational Schema

16. Which one of the following provides the ability to query information from the
database and to insert tuples into, delete tuples from and modify tuples in the
database?
a. DML
b. DDL
c. Query
d. Relational Schema

17. Create table employee (NAME VARCHAR, ID INTEGER) What type of statement is
this?
a. DML
b. DDL
c. View
d. Integrity Constraint

18. Select * from employee


What type of statement is this?
a. DML
b. DDL
c. View
d. Integrity Constraint

19. To remove a relation from an SQL database, we use the ____________ command.
a. Delete
b. Purge
c. Remove
d. Drop Table
20. Insert into instructor values(10211, ‘Rupam’ , ‘ Biology’ , 66000);
Which type of the statement is this?
a. Query
b. DML
c. Relation
d. DDL

21. Update that violate __________________ are disallowed.


a. Integrity Constraints
b. Transaction Control
c. Authorization
d. DDL constraints

22. ‘_ _ _ _ ‘matches any string of _______________ three characters.


‘_ _ _ _ %‘matches any string of _______________ three characters.
a. Atleast, Exactly
b. Exactly , Atleast
c. Atleast, All
d. All , Exactly

23. Select name from instructor


where dept name=’Physics’ order by name;
By default, the order by clause lists items in _____________ order.
a. Descending
b. Any
c. Same
d. Ascending

24. To display the salary from greater to smaller and name in ascending order which of
the following options should be used?
a. Ascending, Descending
b. Asc, Desc
c. Desc, Asc
d. Descending, Ascending

25. Select name from instructor


Where salary <= 100000 and salary >= 90000;
This query can be replaced by which of the following?
a. Select name from instructor
Where salary between 90000 and 100000;
b. Select name from instructor
Where salary <= 90000 and salary>=100000;
c. Select name from salary
Where salary between 90000 to 100000;
d. Select name from instructor
Where salary between 100000 and 90000;

26. The number of attributes in relation is called as its


a. Cardinality
b. Degree
c. Tuples
d. Entity

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

28. Select name from instructor where salary is not null;


Selects
a. Tuples with null value
b. Tuples with no null values
c. Tuples with any salary
d. All of the mentioned

29. In a employee table to include the attributes whose value always have some value
which of the following constraint must be used?
a. Null
b. Not Null
c. Unique
d. Distinct

30. CREATE TABLE EMPLOYEE(ID INTEGER, NAME VARCHAR(20), SALARY


NOT NULL);
INSERT INTO EMPLOYEE VALUES (1005, RAJ, 0);
INSERT INTO EMPLOYEE VALUES (1005, RAJ, 365);
INSERT INTO EMPLOYEE VALUES (1005, RAJ,0);
Some of these insert statements will produce an error. Identify the statement.
a. INSERT INTO EMPLOYEE VALUES (1005, RAJ, 365);
b. INSERT INTO EMPLOYEE VALUES (1005, RAJ,0);
c. INSERT INTO EMPLOYEE VALUES (1005, RAJ, 0);
d. Both a and b
31. The Primary key must be
a. Unique
b. Not null
c. Both a and b
d. Either a or b

32. Select ____________ from school


Where dept name=’Comp.sci’;
Which of the following should be used to find the average of the salary?
a. Sum(salary)
b. Avg(salary)
c. Count(salary)
d. Mean(salary)

33. All aggregate functions except _____________ ignore null values in their input
collection.
a. Count (attribute)
b. Count(*)
c. Avg
d. Sum

34. In a relational database a referential integrity constraint can be specified with the help
of :
a. primary key
b. foreign key
c. secondary key
d. none of the above

35. A super key is a set of one or more attributes that, taken collectively, allow us
a. to identify uniquely an entity in the entity set
b. to make the key most powerful for faster retrieval
c. to increase effectiveness of database access
d. none of the above

36. What is the degree of a table with 1000 rows and 10 column ?
a. 10
b. 100
c. 1000
d. None of the above

37. Which of the following commands is used to get all the columns in a table ?
a. #
b. *
c. %
d. @
38. In a relational schema, each tuple is divided into fields is called :
a. Relations
b. Domains
c. Queries
d. None of the above

39. The relational model uses some unfamiliar terminology. A tuple is equivalent to a :
a. record
b. field
c. file
d. database

40. Large collection of files are called :


a. Fields
b. Records
c. Database
d. File system

41. The set of permitted values for each attribute is called its :
a. Attribute set
b. Attribute range
c. Domain
d. Group

42. Pick the odd one out :


a. Primary Key
b. Super Key
c. Candidate Key
d. Degree

43. Relational database management (RDBM) package manages data in more than one
file at once. How does it organize these files .
a. Tables
b. Relations
c. Tuples
d. Both [A] and [B]

44. Key to represent relationship between tables is called :


a. Primary Key
b. Secondary Key
c. Foreign Key
d. None of these
45. Which key provides the basic tuple-level addressing mechanism in a relational
System ?
a. Candidate Key
b. Alternative Key
c. Primary Key
d. None of these

You might also like