207
81k
Chapter:

1200+ more mcqs Solved MCQs

in DataBase Management System (DBMS)

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Bachelor of Science in Computer Science FY (BSc CS) , Bachelor of Science in Computer Science SY (BSc CS) , Bachelor of Science in Information Technology SY (BSc IT) , Bachelor of Computer Applications (BCA) .

Chapters

More MCQs
151.

The term                is used to refer to a row.

A. attribute
B. tuple
C. field
D. instance
Answer» B. tuple
152.

For each attribute of a relation, there is a set of permitted values, called the                   of that attribute.

A. domain
B. relation
C. set
D. schema
Answer» A. domain
153.

A domain is atomic if elements of the domain are considered to be                           units.

A. different
B. indivisbile
C. constant
D. divisible
Answer» B. indivisbile
154.

Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?

A. candidate key
B. sub key
C. super key
D. foreign key
Answer» C. super key
155.

Consider attributes ID, CITY and NAME. Which one of this can be considered as a super key?

A. name
B. id
C. city
D. city, id
Answer» B. id
156.

The subset of a super key is a candidate key under what condition?

A. no proper subset is a super key
B. all subsets are super keys
C. subset is a super key
D. each subset is a super key
Answer» A. no proper subset is a super key
157.

A            is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.

A. rows
B. key
C. attribute
D. fields
Answer» B. key
158.

Which one of the following attribute can be taken as a primary key?

A. name
B. street
C. id
D. department
Answer» C. id
159.

Which one of the following cannot be taken as a primary key?

A. id
B. register number
C. dept_id
D. street
Answer» D. street
160.

An attribute in a relation is a foreign key if the                key from one relation is used as an attribute in that relation.

A. candidate
B. primary
C. super
D. sub
Answer» B. primary
161.

The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as a primary key is called                              

A. referential relation
B. referencing relation
C. referenced relation
D. referred relation
Answer» C. referenced relation
162.

The              is the one in which the primary key of one relation is used as a normal attribute in another relation.

A. referential relation
B. referencing relation
C. referenced relation
D. referred relation
Answer» C. referenced relation
163.

A                    integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation.

A. referential
B. referencing
C. specific
D. primary
Answer» A. referential
164.

The           operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.

A. select
B. join
C. union
D. intersection
Answer» B. join
165.

The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match.

A. join
B. cartesian product
C. intersection
D. set difference
Answer» B. cartesian product
166.

The               operation performs a set union of two “similarly structured” tables

A. union
B. join
C. product
D. intersect
Answer» A. union
167.

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

A. join
B. projection
C. select
D. union
Answer» C. select
168.

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

A. union
B. intersect
C. difference
D. projection
Answer» B. intersect
169.

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
C. database diagram
D. schema flow
Answer» A. schema diagram
170.

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
C. scheme diagram
D. relation flow
Answer» B. relational algebra
171.

Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database?

A. dml(data manipulation langauge)
B. ddl(data definition langauge)
C. query
D. relational schema
Answer» A. dml(data manipulation langauge)
172.

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

A. delete
B. purge
C. remove
D. drop table
Answer» D. drop table
173.

Updates that violate                      are disallowed.

A. integrity constraints
B. transaction control
C. authorization
D. ddl constraints
Answer» A. integrity constraints
174.

The              clause allows us to select only those rows in the result relation of the           clause that satisfy a specified predicate.

A. where, from
B. from, select
C. select, from
D. from, where
Answer» A. where, from
175.

The                  clause is used to list the attributes desired in the result of a query.

A. where
B. select
C. from
D. distinct
Answer» B. select
176.

Which of the following statements contains an error?

A. select * from emp where empid = 10003;
B. select empid from emp where empid = 10006;
C. select empid from emp;
D. select empid where empid = 1009 and lastname = ‘geller’;
Answer» D. select empid where empid = 1009 and lastname = ‘geller’;
177.

In SQL the spaces at the end of the string are removed by                function.

A. upper
B. string
C. trim
D. lower
Answer» C. trim
178.

The union operation is represented by

A.
B. u
C.
D. *
Answer» B. u
179.

The intersection operator is used to get the            tuples.

A. different
B. common
C. all
D. repeating
Answer» B. common
180.

If we want to retain all duplicates, we must write                  in place of union.

A. union all
B. union some
C. intersect all
D. intersect some
Answer» A. union all
181.

The number of attributes in relation is called as its

A. cardinality
B. degree
C. tuples
D. entity
Answer» B. degree
182.

           clause is an additional filter that is applied to the result.

A. select
B. group-by
C. having
D. order by
Answer» C. having
183.

                   joins are SQL server default

A. outer
B. inner
C. equi
D. none of the mentioned
Answer» B. inner
184.

The                            is essentially used to search for patterns in target string.

A. like predicate
B. null predicate
C. in predicate
D. out predicate
Answer» A. like predicate
185.

A            indicates an absent value that may exist but be unknown or that may not exist at all.

A. empty tuple
B. new value
C. null value
D. old value
Answer» C. null value
186.

If the attribute phone number is included in the relation all the values need not be entered into the phone number column. This type of entry is given as

A. 0
B.
C. null
D. empty space
Answer» C. null
187.

The predicate in a where clause can involve Boolean operations such as and. The result of true and unknown is               false and unknown is            while unknown and unknown is            

A. unknown, unknown, false
B. true, false, unknown
C. true, unknown, unknown
D. unknown, false, unknown
Answer» D. unknown, false, unknown
188.

Using the              clause retains only one copy of such identical tuples.

A. null
B. unique
C. not null
D. distinct
Answer» D. distinct
189.

The primary key must be

A. unique
B. not null
C. both unique and not null
D. either unique or not null
Answer» C. both unique and not null
190.

The result of           unknown is unknown.

A. xor
B. or
C. and
D. not
Answer» D. not
191.

Aggregate functions are functions that take a                        as input and return a single value.

A. collection of values
B. single value
C. aggregate value
D. both collection of values & single value
Answer» A. collection of values
192.

A Boolean data type that can take values true, false, and                 

A. 1
B. 0
C. null
D. unknown
Answer» D. unknown
193.

The          connective tests for set membership, where the set is a collection of values produced by a select clause. The           connective tests for the absence of set membership.

A. or, in
B. not in, in
C. in, not in
D. in, or
Answer» C. in, not in
194.

The phrase “greater than at least one” is represented in SQL by            

A. < all
B. < some
C. > all
D. > some
Answer» D. > some
195.

SQL applies predicates in the                 clause after groups have been formed, so aggregate functions may be used.

A. group by
B. with
C. where
D. having
Answer» B. with
196.

The                  keyword is used to access attributes of preceding tables or subqueries in the from clause.

A. in
B. lateral
C. having
D. with
Answer» B. lateral
197.

Which of the following creates a temporary relation for the query on which it is defined?

A. with
B. from
C. where
D. select
Answer» A. with
198.

Subqueries cannot:

A. use group by or group functions
B. retrieve data from a table different from the one in the outer query
C. join tables
D. appear in select, update, delete, insert statements.
Answer» C. join tables
199.

Which of the following is not an aggregate function?

A. avg
B. sum
C. with
D. min
Answer» C. with
200.

The EXISTS keyword will be true if:

A. any row in the subquery meets the condition only
B. all rows in the subquery fail the condition only
C. both of these two conditions are met
D. neither of these two conditions is met
Answer» A. any row in the subquery meets the condition only

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.