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

DBMS

The document discusses database normalization and relational model concepts. It contains questions about functional dependencies, normal forms, relationships between entities, and other relational database topics. The correct answers are provided along with explanations.

Uploaded by

prakash chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

DBMS

The document discusses database normalization and relational model concepts. It contains questions about functional dependencies, normal forms, relationships between entities, and other relational database topics. The correct answers are provided along with explanations.

Uploaded by

prakash chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

1.

In E-R model, Y is the dominant entity and X is subordinate entity


(a) If X is deleted, then Y is also deleted (b) If Y is deleted, then X is also deleted

(c)If Y is deleted, then X is not deleted (d) None of the above

Explanation : If any changes occur in dominant entity then they are also reflected in subordinate entity but not the vice versa.
So, option (B) is correct

2. For a database relation R(a,b,c,d) where the domains of a, b, c and d include only atomic values, only
the following functional dependencies and those that can be inferred from them hold
a -> c

b -> d

The relation is in
(A) First normal form but not in second normal form

(B) Second normal form but not in third normal form

(C) Third normal form

(D) None of the abov

Immunity of the external schemas (or application programs) to changes in the conceptual schema is
referred to as:
(A) Physical Data Independence (B) Logical Data Independence

(C) Both (a) and (b) (D) None of the above

3. The set of attributes X will be fully functionally dependent on the set of attributes Y if the following
conditions are satisfied.
(A)X is functionally dependent on Y

(B)X is not functionally dependent on any subset of Y

(C)Both (a) and (b)

(D)None of these

4. Which of the following is/are true with reference to ‘view’ in DBMS ? (a) A ‘view’ is a special stored
procedure executed when certain event occurs. (b) A ‘view’ is a virtual table, which occurs after
executing a pre-compiled query. code:
A)Only (a) is true B)Only (b) is true

C)Both (a) and (b) are true D)Neither (a) nor (b) are true
5. Match the following with respect to RDBMS

:
A) (1) B) (2) C) (3) D) (4)

6. In RDBMS, different classes of relations are created using __________ technique to prevent modification
anomalies.
A)Functional Dependencies

B)Data integrity

C)Referential integrity

D) Normal Form

Explanation:
Functional dependency is a constraint that describes the relationship between attributes in a
relation. Data integrity refers to the accuracy and consistency of data stored in a database, data
warehouse, data mart or other construct. Referential integrity is a relational database concept, which
states that table relationships must always be consistent. Normalization is a process of organizing the
data in database to avoid data redundancy, insertion anomaly, update anomaly & deletion anomaly. 1NF,
2NF, 3NF and BCNF are types of normal forms. So, option (D) is correct.
7. If every non-key attribute is functionally dependent on the primary key, then the relation is in
__________ .
A)First normal form

B)Second normal form

C)Third normal form

D)Fourth normal form

Explanation:
Conditions for various normal forms:
1. 1 NF - A relation R is in first normal form (1NF) if and only if all underlying domains contain atomic
values only.
2. 2 NF - A relation R is in second normal form (2NF) if and only if it is in 1NF and every non-key
attribute is fully dependent on the primary key.
3. 3 NF - A relation R is in third normal form (3NF) if and only if it is in 2NF and every non-key attribute
is non-transitively dependent on the primary key.
4. BCNF - A relation R is in Boyce-Codd normal form (BCNF) if and only if every determinant is a
candidate key.
Example: Relation R(XYZ) with functional dependencies {X -> Y, Y -> Z, X -> Z}. This relation is in 2NF
but not in 3NF because of every non-key attribute is transitively dependent on the primary key. Here
{X} will be candidate key. So, option (B) is correct.
8. Consider a relation R (A, B, C, D, E, F, G, H), where each attribute is atomic, and following functional
dependencies exist.
CH → G
A → BC

B → CFH

E→A

F → EG

The relation R is __________ .


A)in 1NF but not in 2NF

B)in 2NF but not in 3NF

C)in 3NF but not in BCNF

D)in BCNF

Explanation:
If we find closure of A: A+ → All atribute except D. Similarly for other keys we can find closure, but D can't
be derived from any key and it must be added to all keys to be derived from. That's why this relation is in
1NF, since there is partial dependency so, this relation is not in 2NF. So, option (A) is correct.
9. An attribute A of datatype varchar (20) has value ‘Ram’ and the attribute B of datatype char (20) has
value ‘Sita’ in oracle. The attribute A has _______ memory spaces and B has _______ memory
spaces.
A)20,20

B)3,20

C)3,4

D)20,4

Explanation : varchar will acquire the exact memory of attribute and it varies from tuple to tuple while char will acquire
memory space which is define at the time of table creation it is fixed: varchar(20) 'Ram' will take 3 and 'Sita' will take 20
character space in memory. So, option (B) is correct.

10. Integrity constraints ensure that changes made to the database by authorized users do not result into
loss of data consistency. Which of the following statement(s) is (are) true w.r.t. the examples of integrity
constraints ? (A) An instructor Id. No. cannot be null, provided Intructor Id No. being primary key. (B)
No two citizens have same Adhar-Id. (C) Budget of a company must be zero.
A)(A), (B) and (C) are true.

B)(A) false, (B) and (C) are true.

C)(A) and (B) are true; (C) false.

D)(A), (B) and (C) are false

11. Let M and N be two entities in an E-R diagram with simple single value attributes. R1 and R2 are two
relationship between M and N, where as R1 is one-to-many and R2 is many-to-many. The minimum
number of tables required to represent M, N, R1 and R2 in the relational model are _______.
A)4

B)6

C)7

D)3

Explanation: The answer is B, i.e minimum 3 tables.

Strong entities E1 and E2 are represented as separate tables.


In addition to that many-to-many relationships(R2) must be converted as separate table by having primary keys of E1 and E2
as foreign keys.

One-to-many relaionship (R1) must be transferred to ‘many’ side table(i.e. E2) by having primary key of one side(E1) as foreign
key( this way we need not to make a separate table for R1).

Let relation schema be E1(a1,a2) and E2( b1,b2).

Relation E1( a1 is the key)

a1 a2

-------

13

24

34

Relation E2( b1 is the key, a1 is the foreign key, hence R1(one-many) relationship set satisfy here )

b1 b2 a1

-----------

742

872

973

Relation R2 ( {a1, b1} combined is the key here , representing many-many relationship R2 )

a1 b1

--------

17

18

29

39

Hence we will have minimum of 3 tables

12. ________ refers loosely to the process of semi-automatically analyzing large databases to find useful
patterns.
A)Datamining

B)Data warehousing

C)DBMS

D)Data mirroring

Explanation:
Data-mining refers loosely to the process of semi-automatically analyzing large databases to find useful
patterns. So, option (A) is correct.
13. Which one is correct w.r.t. RDBMS ?
A)primary key ⊆ super key ⊆ candidate key

B)primary key ⊆ candidate key ⊆ super key

C)super key ⊆ candidate key ⊆ primary key

D)super key ⊆ primary key ⊆ candidate key

14. Let pk(R) denotes primary key of relation R. A many-to-one relationship that exists between two
relations R1 and R2 can be expressed as follows :
A)pk(R2) → pk(R1)

B)pk(R1) → pk(R2)

C)pk(R2) → R1 ∩ R2

D)pk(R1) → R1 ∩ R2

15. For a database relation R(A, B, C, D) where the domains of A, B, C and D include only atomic values,
only the following functional dependencies and those that can be inferred from them are : A → C B →
D The relation R is in _______.
A)First normal form but not in second normal form.

B)Both in first normal form as well as in second normal form.

C)Second normal form but not in third normal form.

D)Both in second normal form as well as in third normal form

Explanation:
A relation is in first normal form if every attribute in that relation is single valued attribute. It is in 1NF. {A,B}
are prime attribtes and {C,D} are non-prime attribute. A+ = {A,C} B+ = {B,D} {A,B}+ = {A,B,C,D} so AB is the
key. But A+ = {A,C} B+ = {B,D} makes it partial dependency. So, this relation is not in 2NF. So, option (A) is
correct.
16. DBMS provides the facility of accessing data from a database through
A)DDL

B)DML

C)DBA

D)Schema

Explanation:
1- DML stands for data manipulation language.Examples of DDL commands:CREATE, DROP, ALTER,
TRUNCATE, COMMENT, RENAME. It provides the facility of accessing data from a database. 2- DDL -
Data Definition Language - The SQL commands that deals with the manipulation of data present in
database belong to DML or Data Manipulation Language and this includes most of the SQL
statements.Examples of DML: SELECT, INSERT, UPDATE, DELETE. 3- Functions of a DBA include:
Schema definition, Storage structure and access-method definition, Schema and physical-organization
modification, Granting of authorization for data access, Routine maintenance. 4- Schema: The term
"schema" refers to the organization of data as a blueprint of how the database is constructed (divided into
database tables in the case of relational databases). The formal definition of a database schema is a set of
formulas (sentences) called integrity constraints imposed on a database . So, option (A) is correct.
17. Relational database schema normalization is NOT for:
A)reducing the number of joins required to satisfy a query.

B)eliminating uncontrolled redundancy of data stored in the database.

C)eliminating number of anomalies that could otherwise occur with inserts and deletes.
D)ensuring that functional dependencies are enforced

Explanation:
 Relational database schema normalization is NOT for reducing the number of joins required to satisfy
a query.
 Relational database schema normalization is for eliminating uncontrolled redundancy of data stored
in the database.
 Relational database schema normalization is for eliminating number of anomalies that could
otherwise occur with inserts and deletes.
 Relational database schema normalization is for ensuring that functional dependencies are enforced.
So, option (A) is correct.
18. Consider the following statements regarding relational database model: (a) NULL values can be used
to opt a tuple out of enforcement of a foreign key. (b) Suppose that table T has only one candidate key.
If Q is in 3NF, then it is also in BCNF. (c) The difference between the project operator (Π) in relational
algebra and the SELECT keyword in SQL is that if the resulting table/set has more than one
occurrences of the same tuple, then Π will return only one of them, while SQL SELECT will return all.
One can determine that:
A)(a) and (b) are true.

B)(a) and (c) are true.

C)(b) and (c) are true.

D)(a), (b) and (c) are true

Explanation:
IN relational database model: (a) NULL values can be used to opt a tuple out of enforcement of a foreign
key.Correct (b) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in
BCNF.Correct (c) The difference between the project operator (Π) in relational algebra and the SELECT
keyword in SQL is that if the resulting table/set has more than one occurrences of the same tuple, then Π
will return only one of them, while SQL SELECT will return all.Correct So, option (D) is correct
19. Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ?
A)SELECT A FROM R;

B)SELECT A, COUNT(*) FROM R;

C)SELECT A, COUNT(*) FROM R GROUP BY A;

D)SELECT A, B, COUNT(*) FROM R GROUP BY A, B


20. Which one of the following pairs is correctly matched in the context of database

design?
A)(1)

B)(2)

C)(3)

D)(4)

Explanation:
 Result of taking a subset of a higher-level entity set to form a lower-level entity set is Specialization
 Result of taking the union of two or more disjoint(lower-level) entity sets to produce a higher-level
entity set is Generalization
 An abstraction in which relationship sets (along with their associated entity sets) are treated as
higher-level entity sets, and can participate in relationships.Aggregation
 Express the number of entities to which another entity can be associated via a relationship
set Mapping cardinalities
So, option (D) is correct.
21. In RDBMS, the constraint that no key attribute (column) may be NULL is referred to as:
A)Referential integrity

B)Multi-valued dependency

C)Entity Integrity

D)Functional dependency

Explanation:
 In RDBMS, the constraint that no key attribute (column) may be NULL is referred to as Entity Interity
 Referential integrity states that table relationships must always be consistent.
 Multi-valued dependencyis a full constraint between two sets of attributes in a relation
 Functional dependency is a relationship that exists when one attribute uniquely determines another
attribute.
So, option (C) is correct.
22. Which of the following statement(s) is/are FALSE in the context of Relational DBMS ? I. Views in a
database system are important because they help with access control by allowing users to see only a
particular subset of the data in the database. II. E-R diagrams are useful to logically model concepts.
III. An update anomaly is when it is not possible to store information unless some other, unrelated
information is stored as well. IV. SQL is a procedural language.
A)I and IV only

B)III and IV only

C)I, II and III only

D)II, III and IV only

Explanation:
 Views in a database system are important because they help with access control by allowing users to
see only a particular subset of the data in the database.Correct
 E-R diagrams are useful to logically model concepts.Inorrect
 An update anomaly is when it is not possible to store information unless some other, unrelated
information is stored as well.Inorrect
 SQL is a procedural language.Inorrect
So, option (D) is correct.
23. a relational database model, NULL values can be used for all but which one of the following ?
A)To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

B)To avoid confusion with actual legitimate data values like 0 (zero) for integer columns and ’’ (the empty string) for string
columns.

C)To leave columns in a tuple marked as ’’unknown’’ when the actual value is unknown.

D)To fill a column in a tuple when that column does not really ”exist” for that particular tuple.

24. Consider the following two commands C1 and C2 on the relation R from an SQL database: C1 : drop
table R; C2 : delete from R; Which of the following statements is TRUE ? I. Both C1 and C2 delete the
schema for R. II. C2 retains relation R, but deletes all tuples in R. III. C1 deletes not only all tuples of R,
but also the schema for R.
A)I only

B)I and II only

C)II and III only

D)I, II and III

25. Which of the following statements is correct?


A)Aggregation is a strong type of association between two classes with full ownership.

B)Aggregation is a strong type of association between two classes with partial ownership.

C)Aggregation is a weak type of association between two classes with partial ownership.

D)Aggregation is a weak type of association between two classes with full ownership.
26. match the following datbas terms to their

function:
A)(1)

B)(2)

C)(3)

D)(4)

Explanation:
 Normalization reduces data redundancy in a database
 Data Dictionary contains metadata describing database structuredefines view(s) of the database for
particular user(s)
 Referential Integrity enforces match of primary key to foreign key
 External Schema defines view(s) of the database for particular user(s)
So, option (B) is correct.
27. data which improves the performance and accessibility of the database are called:
A)Indexes

B)User Data

C)Application Metadata

D)Data Dictionary

28. A relation R = {A, B, C, D, E, F,G} is given with following set of functional dependencies: F = {AD → E,
BE → F, B → C, AF → G} Which of the following is a candidate key ?
A)A

B)AB

C)ABC

D)ABD

AD]+ = ADE. [BE]+ = BCEF. [B]+ = BC. [AF]+ = AFG. Nothing drives all the attributes, but if We add B in first key i.e.
[ADB] then it will give all the attribute [ADB]+ = ABCDEFG. So, option (D) is correct.

29. Consider the following three SQL queries (Assume the data in the people table): (a)Select Name from
people where Age > 21; (b)Select Name from people where Height > 180; (c)Select Name from people
where (Age > 21) or (Height > 180); If the SQL queries (a) and (b) above, return 10 rows and 7 rows in
the result set respectively, then what is one possible number of rows returned by the SQL query (c) ?
A)3
B)7

C)10

D)21

According to question: Select Name from people where Age > 21; will return 10 rows. Select Name from people
where Height > 180; will return 7 rows. Then Select Name from people where (Age > 21) or (Height > 180); will
return 10 rows. Since there is or between the condition. That's why it will return 10 rows. So, option (C) is correct

30. In E-R model, Y is the dominant entity and X is subordinate entity


A)If X is deleted, then Y is also deleted

B)If Y is deleted, then X is also deleted

C)If Y is deleted, then X is not deleted

D)None of the above

31. Given relations R(w,x) and S(y,z), the result of


SELECT DISTINCT w, x

FROM R, S

Is guaranteed to be same as R, if
A)R has no duplicates and S is non-empty

B)R and S have no duplicates

C)S has no duplicates and R is non-empty

D)R and S have the same number of tuples

Explanation:
The query selects all attributes of r. Since we have distinct in query, result can be equal to r only if r
doesn’t have duplicates. If we do not give any attribute on which we want to join two tables, then the
queries like above become equivalent to Cartesian product. Cartesian product of two sets will be empty if
any of the two sets is empty. So, s should have atleast one record to get all rows of r. So, option (A) is
correct.
32. Immunity of the external schemas (or application programs) to changes in the conceptual schema is
referred to as:
A)Physical Data Independence

B)Logical Data Independence

C)Both (a) and (b)

D)None of the above

Explanation:
Immunity is when data at one layer is changed, it does not affect the data at another level. Physical data
independence:- if changes are made in the physical storage of schema then it will not affect the logical
schema of the database. Logical data independence:- if any changes are made in the conceptual schema
then it will not affect external schema or the view level of the database. So, option (B) is correct.
33. The set of attributes X will be fully functionally dependent on the set of attributes Y if the following
conditions are satisfied.
A)X is functionally dependent on Y

B)X is not functionally dependent on any subset of Y

C)Both (a) and (b)


D)None of these

34. Which symbol denote derived attributes in ER Model?


A)Double ellipse

B)Dashed ellipse

C)Squared ellipse

D)Ellipse with attribute name underlined

35. Cardinality ratio ' strong entity set : weak entity set' in their binary identifying relationship is :

1) one to one

2) One to many

3) Many to one

4) Many to many

36. In ER model when subgroups of a given entity type are defined, this is known as :

1) Aggregation

2) Inheritance

3) Specialization

4) Generalization

37. If relation R1 has P atrributes and m tuples and relation R2 has q attributes and n tuples, then relation R1 X R2 has
.........attributes and .........tubles.
1) (p*q), (m+n)
2) (p+q), (m+n)
3) (p*q), (m*n)
4) (p+q), (m*n)
38. Intersection operation on two relations R1 and R2 of data base is :

1) Associative but not commutative

2) Commutative but not Associative

3) Both Associative and Commutative

4) Neither Associative nor commutative

39. Which of the following operation requires two tables as input and the two table must have one common column?

1) Division

2) Join

3) Projection

4) Cartesian product

40. A relation in which every non key attribute is fully functionally dependant on primary key and has no transitive
dependency, is in :

1) BNCF
2) 2NF

3) 3NF

4) 4NF

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy