WorksheetsDBMS Recap
Total questions: 39
Worksheet time: 20mins
A field of one table which is also a the primary key of another table
Primary Key
Relational database
Data normalisation
Foreign Key
The attribute refers to a _____ of a table
Record
Foreign key
Primary key
Field
Consider attributes ID, CITY and NAME. which one of these can be considered as a primary key?
NAME
ID
CITY
ID, NAME
Which one of these cannot be taken as a primary key?
ID
registration no
Department ID
Street
This is an example of ________________
Data inconsistency
Data redundancy
Data security
Data consistency
A Database Management System (DBMS) is
Collection of interrelated data
Collection of programs to access data
Collection of data describing one particular enterprise
All of the above
Which of the following is not a level of data abstraction?
Physical Level
Critical Level
Logical Level
View Level
Disadvantages of File systems to store data is:
Data redundancy and inconsistency
Difficulty in accessing data
Data isolation
All of the above
Which of the following is not a Storage Manager Component?
Transaction Manager
Logical Manager
Buffer Manager
File Manager
Data Manipulation Language enables users to
Retrieval of information stored in database
Insertion of new information into the database
Deletion of information from the database
All of the above
Which of the following is a Data Model?
Entity-Relationship model
Relational data model
Object-Based data model
All of the above
Which of the following is not involved in DBMS?
End Users
Data
Application Request
HTML
Select the DBMS software
Which of the following query would display all the students whose first name starts with the character ‘A’?
select first_name from students where first_name like ‘A%’;
select first_name from students where first_name like ‘%A’;
select first_name from students where first_name like ‘%A%’;
select first_name from students where first_name like ‘A’;
Which of the following is not true about the ALTER TABLE statement?
It can add a new row.
It can add a new column
It can modify existing columns
It can define a default value for the new column
Here which of the following displays the unique values of the column?
SELECT ________ dept_name FROM instructor;
All
From
Distinct
Name
SELECT * FROM employee WHERE salary>10000 AND dept_id=101;
Which of the following fields are displayed as output?
Salary, dept_id
Employee
Salary
All the field of employee relation
In the __________ normal form, a composite attribute is converted to individual attributes
First Normal Form
Second Normal Form
Third Normal Form
Fourth Normal Form
Drop table statement
deletes the table structure only
deletes the table structure along with the table data
works whether or not referential integrity constraints would be violated
is not an SQL statement
What SQL clause is used to restrict the rows returned by a query ?
WHEN
HAVING
FROM
WHERE
To remove duplicate rows from the result set of a select use the following keyword(s).
NO DUPLICATES
DISTINCT
UNIQUE
None of the above
MySQL runs on which operating systems ?
Linux and Mac OS-X only
Any operating system at all
Unix , Linux , Windows and others
Unix and Linux only
Which of the following can add a row to a table ?
Add
Insert
Update
Alter
Which SQL statement is used to insert new data in database ?
INSERT INTO
UPDATE
ADD
INSERT NEW
In a LIKE clause , you can could ask for any value ending in "qpt" by writing.
LIKE"%qpt"
LIKE"*ton"
LIKE"ton$"
LIKE^"ton$"
A NULL value is treated as a blank or 0.
True
False
None of the above
MySQL is
A Programming language
A Markup language
A technique for writing reliable programs
A Relational Database Management System
In a LIKE clause , you can ask for any 6 letter value by writing
LIKE ??????
LIKE .{6}
LIKE ...... (that's six dots)
LIKE ______ (that's six underscore characters)
The result of a SELECT statement can contain duplicate rows .
False
True
None of the above
Which of the following is not a valid aggregate function ?
COUNT
MIN
MAX
COMPUTE
What SQL clause is used to restrict the rows returned by a query depending on validity of two conditions simultaneously ?
AND
WHERE
HAVING
FROM
Primary key does allow the Null Values, whereas in Unique key doesn't accept the Null values . True or False ?
True
False
Which of the following commands should be used to create a database named "student" ?
CREATE?I student
CREATE DATABASE student
DATABASE /student
DATABASE student
Which one will delete the table data as well as table structure?
DELETE
DROP
The USE command ?
Is used to load code from another file
Has been deprecated and should be avoided for security reasons.
Is a pseudo name for the SELECT command
Should be used to choose the database you want to use once you've connected to MySQL.
A SELECT command without a WHERE clause returns ?
All records from a table that match the previous WHERE clause
All the records from a table , or information about all the records.
SELECT is invalid without a Where clause
Nothing
The table columns are also known as.....
Attributes
Fields
Records
Index
Key
The NULL keyword is used to :
Represent unknown value
represent a missing value
represent a positive infinity
represent 0 value
represent empty string
What is a foreign key ?
A foreign key is a key field in table , which relates the table to another table where the key is a primary key or unique key.
Constraint (reference integrity)
The foreign key is a column that can have NULL value
The foreign key is a column that can not have NULL values
