wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Database - Intermediate 2 - Practice

Total questions: 85

Worksheet time: 43mins

Name
Class
Date
1.
Database can be used in the following:
a)
Bank
b)
airline
c)
university
d)
all the above
2.
DBMS stands for_______________
a)
DATABASE MANAGEMENT SQL
b)
DATABASE MANAGEMENT SERVER
c)
DATABASE MANAGEMENT SYSTEM
d)
a. DATABASE SERVER2000
3.
A software which is used to manage the database.
a)
file explorer
b)
DBMS
c)
data explorer
d)
data administrator
4.
Purpose of database is________
a)
retricting unauthorized access
b)
backup and recovery
c)
redundancy control
d)
All the above
5.
The __________ is a collection of inter-related data which is used to retrieve, insert and delete the data efficiently.
a)
database
b)
file system
c)
explorer
d)
data
6.
An advantage of the database management approach is
a)
Data is dependent on programs
b)
Data redundancy increases.
c)
Data is integrated and can be accessed by multiple programs.
d)
None of the above
7.
.A ________is raw fact
a)
DATA
b)
INFORMATION
c)
SCHEMA
d)
table
8.
An _______________is the processed data
a)
data
b)
date
c)
information
d)
none of the above
9.
Data about a data
a)
data
b)
metadata
c)
information
d)
none of the above
10.
Course(course_id,sec_id,semester) Here the course_id,sec_id and semester are __________ and course is a _________
a)
relation,attribute
b)
attribute,entity
c)
attribute, attribute
d)
entity, realation
11.
Which of the following can be a multivalued attribute?
a)
phone_number
b)
name
c)
age
d)
none of the above
12.
The feature possessed by each entity is _________
a)
entity
b)
attribute
c)
relation
d)
model
13.
The attribute name could be structured as an attribute consisting of first name, middle initial, and last name. This type of attribute is called
a)
single attribute
b)
composite attribute
c)
multivalued attribute
d)
derived attribute
14.
 The attribute AGE is calculated from DATE_OF_BIRTH. The attribute AGE is
a)
single attribute
b)
composite attribute
c)
multivalued attribute
d)
derived attribute
15.
Basic elements of ER model are
a)
entity
b)
attribute
c)
relationship
d)
all the above
16.
____________ defines define a database as a collection of objects with features and methods
a)
object oriented model
b)
network model
c)
relational model
d)
entity relationshop model
17.
A _________ is the main tool for providing data abstraction
a)
DELETE
b)
DATA MODEL
c)
DROP
d)
KEY
18.
The process of analyzing relation schemas to achieve minimal redundancy and insertion or update anomalies is classified as
a)
normalization
b)
denomination
c)
isolation
d)
de-normalization
19.
Normalisation ___________ data duplication.
a)
eliminates
b)
Equalises
c)
increases
d)
maximizes
20.
Eliminating modification anomalies is an ________ of normalization.
a)
advantage
b)
disadvantage
c)
either an advantage or disadvantage
d)
neither an advantage nor disadvantage
21.
Considering the relational database, the functional dependency between two attributes A and B is denoted by
a)
A → B
b)
B $ A
c)
AB → R
d)
R ← AB
22.
which data type will accept NULL value
a)
date
b)
varchar
c)
int
d)
all the above
23.
SQL stands for_________
a)
Structured Query Language
b)
standard query language
c)
structure question language
d)
second query language
24.
Which of the following is not a valid SQL type?
a)
character
b)
numeric
c)
float
d)
decimal
25.
Which amongst the following is not a category of SQL command.
a)
DDL
b)
DML
c)
DCL
d)
SCL
26.
______________commands manipulates the structure of the objects.
a)
DDL
b)
DML
c)
DCL
d)
TCL
27.
The __________ command Modifies database schema.
a)
delete
b)
alter
c)
update
d)
none of the above
28.
Which of the following statement is true ?
a)
DELETE does not free the space containing the table and TRUNCATE free the space containing the table
b)
Both DELETE and TRUNCATE free the space containing the table
c)
Both DELETE and TRUNCATE does not free the space containing the table
d)
DELETE free the space containing the table and TRUNCATE does not free the space containing the table
29.
 In SQL, which command(s) is(are) used to change a table’s storage characteristics?
a)
ALTER TABLE
b)
change table
c)
modify table
d)
None of the above
30.
Which of the following is not a DDL command
a)
update
b)
truncate
c)
delete
d)
none of the above
31.
Which of the following is/are the DDL statements?
a)
create
b)
drop
c)
alter
d)
all the above
32.
 Which SQL sub language is used for creating and destroying table structure?
a)
ddl
b)
dml
c)
dcl
d)
tcl
33.
The __________command is used for creating database and table
a)
alter
b)
create
c)
Alter
d)
update
34.
The ____________clause is used for specifying the condition
a)
where
b)
group by
c)
order by
d)
from
35.
The ____________command is used for inserting values into the table
a)
select
b)
update
c)
delete
d)
insert
36.
The _________commands to manipulate the information stored in the database.
a)
DDL
b)
DML
c)
DCL
d)
TCL
37.
The database language that allows us to access data in a database is called
a)
dml
b)
ddl
c)
dcl
d)
tcl
38.
DCL provides commands to perform actions like
a)
Change the structure of Tables
b)
insert,update or delete the records
c)
Authorizing Access and other control over Database
d)
none of the above
39.
DCL stands for
a)
Data Condition Language
b)
Data Control Language
c)
Direct Control Language
d)
Direct Calling Language
40.
Which includes commands for controlling data and access to the database
a)
TCL
b)
DDL
c)
DML
d)
DCL
41.
Which of the following are TCL commands ?
a)
 UPDATE and TRUNCATE
b)
SELECT and INSERT
c)
GRANT and REVOKE
d)
ROLLBACK and SAVEPOINT
42.
_________ command is used to create roles,permission
a)
ddl
b)
dml
c)
dcl
d)
tcl
43.
TCL stands for
a)
Transaction Common Language
b)
Transactional Control Language
c)
Transact Calling Line
d)
Tree Control Language
44.
Each modification done in database transaction is first recorded into the
a)
Pendrive
b)
Log
c)
Disk
d)
Datamart
45.
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
46.
The _______ means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
a)
Serializability
b)
Atomicity
c)
Isolation
d)
Time stamping
47.
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
48.
TDS stands for
a)
Transit Data Stream
b)
T-SQL Data Stream
c)
Transparent Data Stream
d)
Tabular Data Stream
49.
Which of these is not a major component of SQL Server Architecture
a)
Storage Engine
b)
Database Engine
c)
Relational Engine
d)
SQL Server Network Interface - SNI
50.
Optimizer's role is to find the
a)
Choosing existing Plan Cache
b)
Minimal Query Run Time
c)
Binding Query Plan
d)
Normalized Query Plan
51.
.ndf file is a _____
a)
Secondary File
b)
Log File
c)
Primary File
d)
None of these
52.
Which component in Transaction manager is used for keeping track of Transaction Committed and Transaction Rollback
a)
Lock Manager
b)
Log Manager
c)
Lazy Writer
d)
None of these
53.
A __________ is a data type that derived from an existing data type.
a)
User-defined datatypes
b)
System Databases
c)
User Tables
d)
System Tables
54.
Mention the name of user-defined datatype in the following query : CREATE TYPE CountryCode FROM VARCHAR(3) NOT NULL;
a)
CREATE
b)
CountryCode
c)
VARCHAR
d)
NOT NULL
55.
The sql where clause
a)
limits the column data that are returned.
b)
limits the row data are returned
c)
Retrieves all rows in the table without any condition
d)
None of the above
56.
The__________ operator selects values within a given range
a)
Between
b)
not between
c)
like
d)
not like
57.
The ______operator is used in a WHERE clause to search for a specified pattern in a column
a)
List
b)
range
c)
string
d)
logical
58.
The__________ operator returns true or false
a)
List
b)
range
c)
string
d)
logical
59.
The pattern 'a%' is used to ________
a)
Finds any values that start with "a" and are at least 2 characters in length
b)
Finds any values that have "or" in any position
c)
Finds any values that ends with “a”
d)
Finds any values that starts with “a”
60.
The pattern 'a_ _%' is used to ________
a)
Finds any values that start with "a" and are at least 2 characters in length
b)
Finds any values that have "or" in any position
c)
Finds any values that ends with “a”
d)
Finds any values that starts with “a”
61.
The pattern '%or%' is used to ________
a)
Finds any values that start with "a" and are at least 2 characters in length
b)
Finds any values that have "or" in any position
c)
Finds any values that ends with “a”
d)
Finds any values that starts with “a”
62.
The pattern 'a%o' is used to ________
a)
Finds any values that start with "a" and are at least 2 characters in length
b)
Finds any values that start with "a" and ends with "o"
c)
Finds any values that ends with “a”
d)
Finds any values that starts with “a”
63.
The pattern '%a' is used to ________
a)
Finds any values that start with "a" and are at least 2 characters in length
b)
Finds any values that have "or" in any position
c)
Finds any values that ends with “a”
d)
Finds any values that starts with “a”
64.
Which clause is used sort the data in ascending or descending order?
a)
group clause
b)
where clause
c)
order by
d)
none of the above
65.
If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default
a)
asc
b)
desc
c)
there is no default value
d)
Random
66.
The _________ clause was added to SQL because the WHERE keyword cannot be used with aggregate functions.
a)
GROUP BY
b)
ORDER BY
c)
HAVING
d)
NONE OF THE ABOVE
67.
A ______________statement returns different value from specified column
a)
top
b)
DISTINCT
c)
both a &b
d)
none of the above
68.
SQL Select statement to retrieve unique record from a table is
a)
select distinct
b)
select union
c)
select unionall
d)
none of the above
69.
which function returns the number of items in a group, including NULL values and duplicates
a)
COUNT (ALL expression)
b)
COUNT (DISTINCT expression)
c)
COUNT (*)
d)
COUNT (column1,column2)
70.
________returns the minimum value from the specified column
a)
minimum()
b)
min()
c)
max()
d)
maximum()
71.
Which select rows from the table 'myTable' that have NULL in column column1?
a)
Select * from myTable where column1 is NULL
b)
Select * from myTable where column1=NOT NULL
c)
select * from myTable where coulmn1 NOT NULL
d)
Select * from myTable where column1 equals NULL
72.
You need to calculate the total of all salaries in the accounting department. Which group function should you use?
a)
MIN
b)
MAX
c)
SUM
d)
COUNT
73.
FOREIGN key must be linked to the _______in another table.
a)
Default constraint
b)
Check constraint
c)
NOT NULL constraint
d)
Primary key constraint
74.
How many unique constraints can be defined in a single table?
a)
1
b)
0
c)
exactly 3
d)
More than one
75.
 How many types of constraints are present in SQL Server ?
a)
5
b)
6
c)
7
d)
8
76.
A ____________ constraint is used in conjunction with the REFERENCES clause.
a)
Primary key
b)
Unique
c)
Not null
d)
Foreign key
77.
What is true about Unique and primary key?
a)
Unique can have multiple NULL values but Primary can have one.
b)
Unique can have NULL value but Primary can’t have.
c)
Both can have duplicate values
d)
None of the Mentioned
78.
Which of the constraint can be enforced one per table ?
a)
 Primary key constraint
b)
Not Null constraint
c)
Foreign Key constraint
d)
Check constraint
79.
.A_______ key it will accept NULL values
a)
Primary key
b)
Not Null
c)
Foreign key
d)
None of the above
80.
A_________key is used to join the child table with parent table.
a)
Primary key
b)
Foreign key
c)
Composite key
d)
All the above
81.
._______keyword is used to test that a condition is true for one or more of the values returned by a subquery.
a)
ALL
b)
ANY
c)
IN
d)
EXISTS
82.
What is a subquery?
a)
A subquery is a select-from-where expression that is nested within another query
b)
A subquery is any query that is executed after another query
c)
A subquery is a condition that excludes all the invalid tuples from the database
d)
NONE OF THE ABOVE
83.
Which of the following clause is mandatorily used in a sub-query?
a)
SELECT
b)
sum
c)
ORDER BY
d)
GROUP BY
84.
Query within a query is called as________
a)
Correlated subquery
b)
Nested subquery
c)
Inline query
d)
None of the above
85.
A subquery can be used to _________.
a)
create groups of data
b)
sort data in a specific order
c)
convert data to a different format
d)
retrieve data based on an unknown condition