Database Management System Subject Code: Dipit07: Time: 2:00 Max - Marks: 100
Database Management System Subject Code: Dipit07: Time: 2:00 Max - Marks: 100
1. Which one of the following provides the ability to query information from the database and to
insert rows into, delete rows from, and modify rows in the database?
a) DML(Data Manipulation Language)
b) DDL(Data Definition Language)
c) Query
d) Relational Schema
2. CREATE TABLE employee (name VARCHAR, id INTEGER)
What type of statement is this?
a) DML
b) DDL
c) View
d) Integrity constraint
3. The basic data type char(n) is a _____ length character string and varchar(n) is _____ length
character.
a) Fixed, equal
b) Equal, variable
c) Fixed, variable
d) Variable, equal
4. Which one of the following attribute can be taken as a primary key?
a) Name
b) Street
c) Id
d) Department
5. The most commonly used operation in relational algebra for projecting a set of row from a table is
a) Join
b) Projection
c) Select
d) Union
6. Here which of the following displays the unique values of the column?
SELECT ________ dept_name
FROM instructor;
a) All
b) From
c) Distinct
d) Name
7. The query given below will not give an error. Which one of the following has to be replaced to get
the desired output?
SELECT ID, name, dept name, salary * 1.1
WHERE instructor;
a) Salary*1.1
b) ID
c) Where
d) Instructor
8. Which one of the following has to be added into the blank to select the dept_name which has
Computer Science as its ending string?
SELECT emp_name
FROM department
WHERE dept_name LIKE’ _____ Computer Science’;
a) %
b) _
c) ||
d) $
9. This query does which of the following operation?
SELECT instructor.*
FROM instructor, teaches
WHERE instructor.ID= teaches.ID;
a) All attributes of instructor and teaches are selected
b) All attributes of instructor are selected on the given condition
c) All attributes of teaches are selected on given condition
d) Only the some attributes from instructed and teaches are selected
10. The primary key must be
a) Unique
b) Not null
c) Both Unique and Not null
d) Either Unique or Not null
SECTION-B
SECTION-C
1. Identify the errors in the following queries and write the correct queries. (5 marks)
CREATE TABLE department
(dept_id VARCHAR (20),
building (15),
budget Integer,
PRIMARY KEY (dept_name));
---END OF PAPER---