Interview Questions on Database
1.
Mysql is developed.marketed and supported by ______________
a.
Mysql AB
b.
Mysql BC
c.
Mysql DC
d.
none
Ans:
a
It
is a swedish company.
2. A
____________ is a separate application that stores a collection of
data.
a.
database
b.
metabase
c.
deltabase
d.none
Ans:
a
3.A
________________ is a software that enables you to implement a
database with tables, columns and indexes.
a.
RDBMS ( Relational database management system)
b.
DBMS
c.
CDMS
d.none
Ans:
a
4. A
_____________ is a matrix with data.
a.
table
b.
cable
c.
network
d.none
Ans:
a
5. A
___________ is a group of related data.
a.
row
b.
function
c.
data
d.none
Ans:
a
6. A
_________ key value cannot occur twice in one table.
a.
primary
b.
secondary
c.
teritary
d.none
Ans:
a
7. A
_________ is the linking pin between two tables
a.
Foriegn
b.
primary
c.
secondary
d.none
Ans:
a
8. A
_________key is a key that consists of multiple columns, because one
column is not sufficiently unique.
a.
compound
b.
terabound
c.
setbound
d.none
Ans:
a
9.
An ____________ in a database resembles an index at the back of a
book.
a.
Index
b.
data
c
.functions
d.none
Ans:
a
10.
_________________ makes sure that a foreign key value always points
to an existing row.
a.
Referential Integrity
b.
Integrity
c.
data
d.none
11.
______________ is the benchmark and performance testing tools for the
mysql database server.
a.
MySQL-bench
b.
Mysql-data
c.
Mysql-graph
d.none
Ans:
a
12.
if you want to run the Mysql server at boot time, then make sure you
have the following entry
in
the /etc/_________
a.
rc.local
b.
dc.local
c.
bc.local
d.none
Ans:
a
/etc/init.d/mysqld
start
13.
How to verify whether mysql is running or not ?
a.
ps -ef | grep mysqld
b.
ps -ef | grep mysql
c.
ps -ef
d.none
Ans:
a
14.
_____________ will be used to select a database in the MYSQL
workarea.
a.
USE databasename
b.
USE
c.
MUSE
d
.none
Ans:
a
15.
____________ lists out the databases that are accessible by the MYSQL
DBMS.
a.
SHOW DATABASES
b.
SHOW
c.
DATABASES
d.
none
Ans:
a
16.
____________ shows the tables in the database once a database has
been selected with the use
command.
a.
SHOW TABLES
b.
DSHOW
c.
TABLES
d.none
Ans:
a
17.
_________________ presents the details of all indexes on the table.
a.
SHOW INDEX FROM tablename
b.
SHOW INDEX
c.
SHOW
d.
none
Ans:
a
18.
PHP provides various _______________ to access the mysql database and
to manipulate the data records inside the MYSQL database.
a.
functions
b.
memory
c.
data
d.none
Ans:
a
19.
PHP provides _____________ function to open a database connection.
a.
mysql_connect ()
b.
mysql
c.
connect
d.none
Ans:
a
20.
PHP uses _____________ function to create or delete a MYSQL database.
a.
mysql_query
b.
query
c.
mysql
d.none
Ans:
a
21.
Mysql uses _________ data types:
a.
Three
b.
Four
c.
Five
d.none
Ans:
a
1.
Numeric
2.
Date and Time
3.
String Types
22.
What is the syntax to create the table in Mysql ?
a.
CREATE TABLE TABLE_NAME (column_name column_type);
b.
Create table
c.
table
d.
none
Ans:
a
23.
What is the syntax to drop the table in the mysql ?
a.
DROP table table-name ;
b.
DROP
c.
Drop table-name
d.
none
Ans:
a
24.
______________ is the php function which can be used to fetch all the
selected data.
a.
mysql_fetch_array()
b.
data()
c.
function()
d.
none
Ans:
a
25.
SQL _________ command is used to update the data in the mysql table.
a.
update
b.
modified
c.
updated
d.none
Ans:
a
26.
If you want to delete a record from any Mysql table, then you can use
the SQL command ________.
a.
delete from
b.
delete
c.
from
d.
none
Ans:
a
27.
We can sort a result set by adding an ___________ clause that names
the column or columns
which
you want to sort.
a.
ORDER BY
b.
DATA BY
c.
FUNCTION BY
d.
none
Ans:
a
28.
We can use ___________ in the select , update and delete statements
to join the MYSQL tables.
a.
joins
b.
joint
c.
joi
d.none
Ans:
a
29.
MYSQL provides ____________ operators to handle null values.
a.
three
b.
four
c.
five
d.none
Ans:a
1.
IS NULL
2.
IS NOT NULL
3.
<=>
30.
_____________ is the operator returns true, if the column value is
NULL.
a.
IS NULL
b.
NULL
c.
NULLED
d.none
Ans:
a
31.
_____________ is the operator returns true, if the column value is
not NULL.
a.
IS NULL
b.
IS NOT NULL
c.
NULLED
d.none
Ans:
b
32.
____________ compares values ,which is true even for two null values.
a.
<=>
b. =
c. <
d.none
Ans:
a
33.
A ____________ is a sequential group of database manipulation
operations, which is performed as if it were one single work unit.
a.
Transaction
b.
section
c.
data
d.none
Ans:
a
34.
Transaction have the _______ standard properties are :
a.
four
b.
three
c.
data
d.none
Ans:
a
1.
Atomicity
2.
Consistency
3.
Isolation
4.
Durability
35.
There are ________ keywords are mainly used for MYSQL transactions.
a.
Two
b.
Three
c.
Four
d.
none
Ans:
a
1.
Commit
2.
Rollback
36 .
When a successful transaction is completed the ____________ command
should be issued so that the changes to all involved tables will take
effect.
a.
commit
b.
rollback
c.
submit
d.none
Ans:
a
37.
If a failure occurs, a ______________ command should be issued to
return every table
referenced
in the transactions to its previous state.
a.
Rollback
b.
commit
c.
submit
d.
none
Ans:
a
38.
____________ ensures that all operations within the work unit are
completed successfully.
a.
atomicity
b.
consistency
c.
isolation
d.none
Ans:
a
39.
____________ ensures that the database properly changes states upon a
successfully committed
transaction.
a.
atomicity
b.
consistency
c.
isolation
d.none
Ans:
b
40.
______________ enables transactions to operate independently on and
transparent to each other.
a.
atomicity
b.
consistency
c.
isolation
d.none
Ans:
c
41.
______________ ensures that the result or effect of a command
transaction persists in case of a
system
failure.
a.
Durability
b.
consistency
c.
isolation
d.none
Ans:
a
42.
____________ is the popular table which support transactions
a.
innodb
b.
inno
c.
db
d.none
Ans:
a
43.
The _________ command is very useful when you want to change a name
of your table, any
table
field or if you want to add or delete an existing column in a table.
a.
ALTER
b.
Delta
c.
Inno
d.none
Ans:
a
44.
A _________ clause will not work if the column is the only one left
in the table.
a.
drop
b.
down
c.
pure
d.none
Ans:
a
45.
To change a column definition use __________ clause along with the
alter command.
a.
modify or change
b.
changed
c.
mod
d.none
Ans:
a
46.
To rename a table, use the __________ option of the ALTER TABLE
statement
a.
rename
b.
data
c.
value
d.none
Ans:
a
47.
A database __________ is a data structure that improves the speed of
operations in a table.
a.
index
b
speed
c.
functions
d.
none
Ans:
a
48.
A _________ index means that two rows cannot have the same index
value.
a.
unique
b.
speed
c.
functions
d.
none
Ans:
a
49.
We can use the _____________ command to list out all the indexes
associated with a table.
a.
SHOW INDEX
b.
show
c.
index
d.none
Ans:
a
50.
The _______________ could be very useful in some cases to keep
temporary data.
a.
temporary tables
b.
rows
c.
columns
d.none
Ans:
a

Comments
Post a Comment