0% found this document useful (0 votes)
20 views

Database mcq ju

The document consists of a series of multiple-choice questions related to database concepts, SQL operations, and database design principles. Topics covered include metadata, relational databases, SQL commands, normalization, and entity-relationship diagrams. Each question presents a specific scenario or definition, asking for the correct terminology or operation associated with databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Database mcq ju

The document consists of a series of multiple-choice questions related to database concepts, SQL operations, and database design principles. Topics covered include metadata, relational databases, SQL commands, normalization, and entity-relationship diagrams. Each question presents a specific scenario or definition, asking for the correct terminology or operation associated with databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 66

The Information about data in a database

is called?
(A) Meta data
(B) Tera data
(A) Meta data
(C) Hyper daya
(D) None of the above

1
It is better to use files than a DBMS When
there are:
(A) Complex relationship among
data
(B) Multiple users wish to access Multiple users wish to access the
the data data
(C) Large amount of data to
process.
(D) All of the above.
2
A relational database consists of a
collection of
a) Tables
b) Fields
a) Tables
c) Records
d) Keys

3
A ________ in a table represents a
relationship among a set of values.
a) Column
b) Key
c) Row
c) Row
d) Entry

4
The statement in sql which allows to
change the definition of a table is:
(A) Alter
(B) Update
(A) Alter
(C) Create
(D) Select

5
In an ER diagram attributes are
represented by:
(A) Rectangle
(B) Square
(C) Ellipse
(C) Ellipse
(D) Triangle

6
The database scheme is written in

(A) HLL
(B) DCL
(C) DDL
(C) DDL
(D) DML

7
Cartesian product in a relational algebra
is:
(A) A unary operator
(B) A Binary operator
(B) A Binary operator
(C) A Ternary operator
(D) Non of the above

8
Cartesian product in relational algebra
defines:
(A) Number of tuples.
(B) Number of attributes.
(A) Number of tuples.
(C) Number of tables.
(D) Number of constraints

9
The term _______ is used to refer to a row.

a) Attribute
b) Tuple
b) Tuple
c) Field
d) Instance

10
The term attribute refers to a ___________
of a table.
a) Record
b) Column
b) Column
c) Tuple
d) Key

11
Course(course_id,sec_id,semester)

Here the course_id,sec_id and semester are


__________ and course is a _________

a) Relations, Attribute b) Attributes, Relation


b) Attributes, Relation
c) Tuple, Relation
d) Tuple, Attributes

12
Student(ID, name, dept name, tot_cred)

In this query which attributes form the primary key?

a) Name
b) Dept
d) ID
c) Tot_cred
d) ID

13
Which one of the following is a procedural
language?
a) Domain relational calculus
b) Tuple relational calculus
c) Relational algebra
c) Relational algebra
d) Query language

14
The most commonly used operation in relational
algebra for projecting a set of tuple from a relation is

a) Join
b) Projection
c) Select
c) Select
d) Union

15
The _______ operator takes the results of two queries
and returns only rows that appear in both result sets.

a) Union
b) Intersect
b) Intersect
c) Difference
d) Projection

16
A ________ is a pictorial depiction of the schema of a
database that shows the relations in the database,
their attributes, and primary keys and foreign
keys.
a) Schema diagram
b) Relational algebra
a) Schema diagram
c) Database diagram
d) Schema flow

17
The _________ provides a set of operations that take
one or more relations as input and return a
relation as an output.

a) Schematic representation
b) Relational algebra
b) Relational algebra
c) Scheme diagram
d) Relation flow

18
CREATE TABLE employee (name VARCHAR, id INTEGER)

What type of statement is this?

a) DML
b) DDL
b) DDL
c) View
d) Integrity constraint

19
SELECT * FROM employee

What type of statement is this?

a) DML
b) DDL
a) DML
c) View
d) Integrity constraint

20
To remove a relation from an SQL
database, we use the ______ command.

a) Delete
b) Purge
d) Drop table
c) Remove
d) Drop table

21
INSERT INTO instructor VALUES (10211, ’Smith’,
’Biology’);

What type of statement is this?

a) Query
b) DML
b) DML
c) Relational
d) DDL

22
In DBMS Updates that violate
__________ are disallowed.

a) Integrity constraints
b) Transaction control
a) Integrity constraints
c) Authorization
d) DDL constraints

23
The ________ clause is used to list the
attributes desired in the result of a
query.
a) Where
b) Select
b) Select
c) From
d) Distinct

24
SELECT * FROM employee WHERE
dept_name="Comp Sci";
In the SQL given above there is an error . Identify
the error.

a) Dept_name
b) Employee
c) “Comp Sci”
c) “Comp Sci”
d) From

25
In SQL the spaces at the end of the
string are removed by _______
function.
a) Upper
b) String
c) Trim
c) Trim
d) Lower

26
In DBMS _____ operator is used for
appending two strings.

a) &
b) %
c) ||
c) ||
d) _

27
The intersection operator is used to
get the _____ tuples.

a) Different
b) Common
b) Common
c) All
d) Repeating

28
In the __________ normal form, a
composite attribute is converted to
individual attributes.
a) First
b) Second
a) First
c) Third
d) Fourth

29
Tables in second normal form (2NF):
a) Eliminate all hidden
dependencies
b) Eliminate the possibility of a
insertion anomalies a) Eliminate all hidden
dependencies
c) Have a composite key
d) Have all non key fields depend
on the whole primary key

30
Functional Dependencies are the
types of constraints that are based
on______
a) Key
b) Key revisited
a) Key
c) Superset key
d) None of the mentioned

31
Which is a bottom-up approach to
database design that design by
examining the relationship between
attributes:
a) Functional dependency
b) Database modeling
c) Normalization
c) Normalization
d) Decomposition

32
Which forms are based on the
concept of functional dependency:

a) 1NF
b) 2NF
c) 3NF
c) 3NF
d) 4NF

33
A relation is in ____________ if an
attribute of a composite key is
dependent on an attribute of other
composite key.
a) 2NF
b) 3NF
b) 3NF
c) BCNF
d) 1NF

34
What are the desirable properties of a
decomposition

a) Partition constraint
b) Dependency preservation
b) Dependency preservation
c) Redundancy
d) Security

35
The intersection operator is used to
get the _____ tuples.

a) Different
b) Common
b) Common
c) All
d) Repeating

36
Key to represent relationship between
tables is called

a) Primary key
b) Secondary Key
c) Foreign Key
c) Foreign Key
d) None of the mentioned

37
In E-R diagram generalization is
represented by

a) Ellipse
b) Dashed ellipse
d) Triangle
c) Rectangle
d) Triangle

38
The total participation by entities is
represented in E-R diagram as

a) Dashed line
b) Double line
b) Double line
c) Double rectangle
d) Circle

39
An entity in A is associated with at
most one entity in B, and an entity in
B is associated with at most one
entity in A.This is called as
a) One-to-many
b) One-to-one
b) One-to-one
c) Many-to-many
d) Many-to-one

40
_____________ express the number of
entities to which another entity can
be associated via a relationship set.
a) Mapping Cardinality
b) Relational Cardinality
a) Mapping Cardinality
c) Participation Constraints
d) None of the mentioned

41
Which of the following is a single
valued attribute

a) Register_number
b) Address
a) Register_number
c) SUBJECT_TAKEN
d) Reference

42
Entity is a _________

a) Object of relation
b) Present working model
c) Thing in real world
c) Thing in real world
d) Model of relation

43
Which of the following is NOT an
Oracle-supported trigger?

a) BEFORE
b) DURING
b) DURING
c) AFTER
d) INSTEAD OF

44
The variables in the triggers are
declared using

a) –
b) @
b) @
c) /
d) /@

45
A __________ is a special kind of a store
procedure that executes in response to
certain action on the table like insertion,
deletion or updation of data.
a) Procedures
b) Triggers
b) Triggers
c) Functions
d) None of the mentioned

46
In contemporary databases, the top level of
the hierarchy consists of ______ each of which
can contain _____

a) Catalogs, schemas
b) Schemas, catalogs
a) Catalogs, schemas
c) Environment, schemas
d) Schemas, Environment

47
Dates must be specified in the format

a) mm/dd/yy
b) yyyy/mm/dd
b) yyyy/mm/dd
c) dd/mm/yy
d) yy/dd/mm

48
To include integrity constraint in an
existing relation use :

a) Create table
b) Modify table
c) Alter table
c) Alter table
d) Drop table

49
Which of the following is used to get
back all the transactions back after
rollback?
a) Commit
b) Rollback
c) Flashback
c) Flashback
d) Redo

50
Transaction processing is associated
with everything below except

a) Conforming an action or
triggering a response
b) Producing detail summary or a) Conforming an action or
exception report triggering a response
c) Recording a business activity
d) Maintaining a data

51
In order to maintain the consistency
during transactions, database
provides
a) Commit
b) Atomic
b) Atomic
c) Flashback
d) Retain

52
In order to undo the work of
transaction after last commit which
one should be used?
a) View
b) Commit
c) Rollback
c) Rollback
d) Flashback

53
A _________ consists of a sequence of
query and/or update statements.

a) Transaction
b) Commit
a) Transaction
c) Rollback
d) Flashback

54
Which sql keyword is used to sort the
result?

a) ORDER
b) SORT-ORDER
d) ORDER BY
c) SORT
d) ORDER BY

55
Updating the value of the view

a) Will affect the relation from


which it is defined
b) Will not change the view a) Will affect the relation from
definition which it is defined
c) Will not affect the relation from
which it is defined
d) Cannot determine
56
Which of the following creates a
virtual relation for storing the query?

a) Function
b) View
b) View
c) Procedure
d) None of the mentioned

57
What type of join is needed when you
wish to include rows that do not have
matching values?
a) Inner Join
b) Natural join
c) Outer join
c) Outer join
d) All of the mentioned

58
Which one of the following deletes all
the entries but keeps the structure of
the relation.
a) Delete from r where P;
b) Delete from instructor where
dept name= ’Finance’; d) Delete from instructor;
c) Delete from instructor where
salary between 13000 and 15000;
d) Delete from instructor;

59
Delete from r where P;

The above command

a) Deletes a particular tuple from


the relation
b) Deletes the relation a) Deletes a particular tuple from
the relation
c) Clears all entries from the
relation
d) All of the mentioned

60
A Boolean data type that can take
values true, false, and________

a) 1
b) 0
d) Unknown
c) Null
d) Unknown

61
Which of the following should be used
to find the mean of the salary ?

a) Mean(salary)
b) Avg(salary)
c) Sum(salary)
c) Sum(salary)
d) Count(salary)

62
Aggregate functions are functions
that take a ___________ as input and
return a single value.
a) Collection of values
b) Single value
a) Collection of values
c) Aggregate value
d) Both Collection of values &
Single value

63
________ joins are SQL server default

a) Outer
b) Inner
b) Inner
c) Equi
d) None of the mentioned

64
The number of attributes in relation is
called as its

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

65
The union operation automatically
__________ unlike the select clause.

a) Adds tuples
b) Eliminates unique tuples
d) Eliminates duplicate
c) Adds common tuples
d) Eliminates duplicate

66

You might also like