Вы находитесь на странице: 1из 32

ACADEMY OF TECHNOLOGY

Question bank
Database management system(Ec705c)

Group-A
Multiple Choice Questions:
Module-I: Introduction to DBMS
1. What is the name of the system database that contains descriptions of the data in the
database?
a) Metadata b) Data dictionary c) Table d) None of the above
2. What represent a correspondence between the various data elements?
a) Data b) Relationships c) Constraints d) Schema
3. The collection of data stored in a database at a particular moment is called the
a) relation b) schema c) instance d) none of these
4. What is refined data?
a) Knowledge b) Information c) Statistics d) None of the above
5. According to the levels of abstraction, the schema at the intermediate level is called
a) Logical schema. b) Physical schema. c) Subschema. d) Super schema.
6. Which database level is the one closest to the users?
a) Physical c) External d) Conceptual
7. Which database level is the one closest to the physical storage?
a) Physical c) External d) Conceptual
8. Data structure of the data stored in a database is dealt by
a) external schema b) conceptual schema c) internal schema d) varies with differ-
ent databases
9. The ability to change the conceptual schema without having to change external
schema is
a) logical data independence b) physical data independence
c) three schema architecture d) sub-schema
10. View is a
a) virtual relation b) temporary relation c) dynamic relation d) all of these
11. Which of the following is a characteristic of the data in a database?
a) Shared b) Secure c) Independent d) All of the above
12. Which of the following is a database element?
a) Data b) Relationships c) Constraints and schema d) All of the
above
13. What are binary computer representations of stored logical entities?
a) Data b) Relationships c) Constraints d) Schema
14. One of the shortcomings of the system is
a) data availability b) fixed records c) sequential records d) lack of security
15. Blocking factor is
a) blocks fetched per sector b) blocks fit into sectors
c) tuples fit per block d) blocks for storing a relation
16. What is data integrity?
a) It is the data contained in database that is non redundant.
b) It is the data contained in database that is accurate and consistent.
c) It is the data contained in database that is secured.
d) It is the data contained in database that is shared
17. IMS stands for ___________.
a) Information Management System b) Internal Mechanical Security
c) International Managers Society d) None of the above
18. Which of the following is a hierarchical database?

Question Bank_EC705C
Page 1
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

a) IDMS b) IMS c) DB2 d) Oracle


19. Tree structures are used to store data in
a) Network model. b) Relational model. c) Hierarchical model. d) File
based system.
20. Which of the following is the oldest database model?
a) Hierarchical b) Network c) Relational d) Deductive
21. Which data model is independent of both the DBMS software and the hardware'!
a) Conceptual b) External c) Internal d) All of the above

Module-II: Entity-Relationship Model


1. What was the main drawback of the hierarchical model?
a) Lack of standardization b) Poor performance c) High cost d) None of the
above
2. Who developed the E-R model?
a) Codd b) Date c) Chen d) Bachman
3. Overall logical structure of a database can be graphically represented by
a) ER diagram b) records c) relation d) hierarchy
4. ER diagram is a tool for designing the database at
a) physical level b) conceptual level c) view level d) physical, logical & view
level
5. What are the components of an E-R model?
a) Entities b) Attributes c) Relationships d) All of the above
6. Which is an attribute composed of a single component with an independent exis-
tence'
a) Simple b) Composite c) Derived d) Single-valued
7. Which is an attribute composed of multiple components, each with an independent
existence?
a) Atomic b) Composite c) Derived d) Single-valued
8. Which of the following is an attribute that holds a single value for a single entity?
a) Simple b) Composite c) Derived d) Single-valued
9. In an ER diagram an entity set is represented by a
a) rectangle b) ellipse c) diamond box d) circle
10. In relational model degree of a relation is
a) no. of attributes b) no. of rows c) no. of prime attributes d) schema
11. Which of the following is an attribute that represents a value that is derivable from
the value of a related attribute or set of attributes not necessarily in the same entity?
a) Single-valued b) Multi-valued c) Atomic d) Derived
12. Which of the following is an attribute that holds multiple values for a single entity?
a) Simple b) Composite c) Derived d) Multi-valued
13. What is a relationship called when an association is maintained within a single en-
tity?
a) Unary b) Binary c) Ternary d) Quaternary
14. What is a relationship called when an association is maintained between two enti-
ties?
a) Unary b) Binary c) Ternary d) Quaternary
15. What is a relationship called when an association is maintained between three enti-
ties?
a) Unary b) Binary c) Ternary d) Quaternary

Question Bank_EC705C
Page 2
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

16. What is a relationship called when an association is maintained between four enti -
ties?
a) Unary b) Binary c) Ternary d) Quaternary
17. Which of the following indicates the maximum number of entities that can be
involved in a relationship?
a) Minimum cardinality b) Maximum cardinality c) ERD d) Greater Entity
Count
18. In the relational model, cardinality is termed as
a) number of tuples b) number of attributes c) number of tables d) number of
constraints
19. Cardinality ratio means
a) number of attributes associated with an entity
b) number of entity related with other entity via a relationship
c) both (a) and (b)
d) none of these
20. Which type of entity cannot exist in the database unless another type of entity also
exists in the database, but does not require that the identifier of that other entity be
included as part of its own identifier?
a) Weak entity b) Strong entity c) ID-dependent entity d) ID-
independent entity
21. In a one-to-many relationship, the entity that is on the one side of the relationship is
called a(n) ________ entity.
a) parent b) child c) instance d) subtype
22. Which type of entity represents an actual occurrence of an associated generalized
entity?
a) Super type entity b) Subtype entity c) Archetype entity d)
Instance entity
23. A recursive relationship is a relationship between an entity and ________.
a) itself b) a subtype entity c) an archetype entity d) an instance
entity
24. Which of the following refers to something that can be identified in the users' work
environment, something that the users want to track?
a) Entity b) Attribute c) Identifier d) Relationship
25. In which of the following is a single-entity instance of one type related to many entity
instances of another type?
a) One-to-One Relationship b) One-to-Many Relationship
c) Many-to-Many Relationship d) Composite Relationship
26. Which of the following refers to an entity in which the identifier of one entity includes
the identifier of another entity?
a) Weak entity b) Strong entity c) ID-dependent entity d) ID-independent
entity
27. Which type of entity is related to two or more associated entities that each contain
specialized attributes that apply to some but not all of the instances of the entity?
a) Super type entity b) Subtype entity c) Archetype entity d) Instance
entity
28. An attribute that names or identifies entity instances is a(n)
a) entity. b) attribute. c) identifier. d) relationship.
29. The set of permitted values of an attribute is called its
a) tuple b) domain c) relation d) none of these
30. Properties that describe the characteristics of entities are called:
a) entities. b) attributes. c) identifiers. d) relationships.
Question Bank_EC705C
Page 3
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

31. In which of the following can many entity instances of one type be related to many
entity instances of another type?
a) One-to-One Relationship b) One-to-Many Relationship
c) Many-to-Many Relationship d) Composite Relationship

Module-III: Relational Model


1. Who is called the father of relational database systems?
a) E. F. Codd b) Donald Chamberlain c) C. J. Date d) H. F. Korth
2. The first large scale implementation of Codd's relational model was IBM s_.
a) DB2 b) System R c) DMS d) None of the above
3. DML stands for
a) Data Mining Language b) Dependency Maintenance Link
c) Data Manipulation Language d) none of these.
4. What is the full form of DDL?
a) Dynamic Data Language b) Detailed Data language
c) Data Definition Language d) none of the above
5. Entity type in ER diagram is equivalent to …………… in relational model.
a) intension of a relation b) extension of a relation c) tuple d) at-
tribute
6. In a relational model, relations are termed as
a) tuples b) attributes c) tables d) rows
7. Which of the following statements is correct in relational model for a relation?
a) rows are ordered b) columns are unordered c) both (a) and (b) d) neither (a)
nor (b)
8. What is the degree of a table with 5000 rows and 50 columns?
a) 50 b) 500 c) 5000 d) None of these
9. What is the degree of a table with 5000 rows and 50 columns?
a) 50 b) 500 c) 5000 d) None of these
10. What is the degree of a table with 1000 rows and 10 columns?
a) 10 b) 100 c) 1000 d) None of these
11. Which of the following is not a relational database management system?
a) Ingress b) IMS c) OB2 d) Sybase
12. What is the RDBMS terminology for a row?
a) Tuple b) Relation c) Attribute d) Domain
13. What is the RDBMS terminology for column or field?
a) Tuple b) Relation c) Attribute d) Domain
14. What is the RDBMS terminology for a table?
a) Tuple b) Relation c) Attribute d) Domain
15. What is the RDBMS terminology for a set of legal values that an attribute can have?
a) Tuple b) Relation c) Attribute d) Domain
16. What is the RDBMS terminology for the number of tuples in a relation?
a) Cardinality b) Relation c) Attribute d) Degree
17. What is the RDBMS terminology for the number of attributes in a relation?
a) Cardinality b) Relation c) Attribute d) Degree
18. Which of the following aspect of data is the concern of a relational database model?
a) Data structure b) Data integrity c) Data manipulation d) All of the
above
19. What is the smallest unit of data in the relational model?
a) Field b) Data value c) Data type d) None of the above
20. What is the cardinality of a table with 1000 rows and 10 columns?

Question Bank_EC705C
Page 4
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

a) 10 b) 100 c) 1000 d) None of the above


21. What is the cardinality of a table with 5000 rows and 50 columns?
a) 10 b) 50 c) 500 d) 5000
22. Which of the following constitutes a basic set of operations for manipulating rela-
tional data?
a) Predicate calculus b) Relational algebra c) Relational calculus d) None of
the above
23. Relational algebra is
a) procedural b) non-procedural c) object oriented d) none of these
24. Which of the following is not a relational algebraic operation that is not from the set
theory?
a) UNION b) INTERSECTION c) CARTESIAN PRODUCT d) SELECT
25. Which is not a set operator
a) UNION b) INTERSECT c) MINUS d) LIKE
26. Which of the following is not a relational algebraic operation that is developed
specifically for the relatiol1al databases?
a) SELECT b) UNION c) JOIN d) PROJECT
27. Which is the symbol used to denote the SELECT operation?
a) Sigma b) Rho c) Pi d) None of the above
28. Which is the symbol used to denote the PROJECT operation?
a) Sigma b) Rho c) Pi d) None of the above
29. Which is the symbol used to denote the RENAME operation?
a) Sigma b) Rho c) Pi d) None of the above
30. The rename operation used in relation algebra is
a) unary operation b) binary operation c) ternary operation d) none of these
31. Which of the following operations need the participating relations to be union com-
patible?
a) UNION b) INTERSECTION c) DIFFERENCE d) All of the above
32. What will be the number of columns of CARTESIAN PRODUCT if the participating rela-
tions have 5 and 7 columns respectively?
a) 5 b) 12 c) 35 d) None of the above
33. What will be the number of rows of CARTESIAN PRODUCT if the participating relations
have 5 and 20 rows respectively?
a) 5 b) 20 c) 25 d) 100
34. Cartesian product in relational algebra is
a) a unary operator b) a binary operator c) a ternary operator d) not defined
35. Which of the following is the operation that is used if we are interested only certain
attributes or columns of a table?
a) SELECT b) PROJECT c) UNION d) JOIN
36. Relational Algebra does not have
a) Selection operator b) Projection operator c) Aggregation operators d)
Division operator
37. Which of the following operations is used if we are interested in only certain columns
of a table?
a) PROJECTION b) SEECTION c) UNION d) JOIN
38. Which of the following relational algebra operations do not require the participating
tables to be union-compatible?
a) Intersection b) Difference c) Join
39. Join and natural join of two relations generate
a) same tuples in the output relation
b) output relation of same schema
Question Bank_EC705C
Page 5
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

c) both (a) and (b)


d) neither (a) nor (b)
40. Consider the join of relation R with a relation S. If R has m tuples and S has n tuples,
then the maximum and minimum size of the join respectively are
a) m+n and 0 b) m+n and |m-n| c) mn and 0 d) mn and m+n
41. If two relations R and S are joined, then the non matching tuples of both R and S are
ignored in
a) left outer join b) right outer join c) full outer join d) inner join
42. Which of the following aggregate functions does not ignore nulls in its results?
a) COUNT b) COUNT (*) c) MAX d) MIN
43. Which one is not an aggregate function?
a) sum b) count c) select d) max
44. The division operator divides a dividend A of degree m+n by a divisor relation B of
degree n and produces a result of degree
a) m – 1 b) m + 1 c) m * m d) m
45. Union operator is a :
a) Unary Operator b) Ternary Operator c) Binary Operator d) Not an
operator
46. What will be the number of columns and rows respectively obtained for the
operation, A-B, if A B are Base union compatible and all the rows of a are common to
B? Assume A has 4 columns and 10 rows; and B has 4 columns and 15 rows
a) 4,0 b) 0,0 c) 4,5 d) 8,5
47. From a relation ‘ σ ’ operator selects
a) rows (b) attributes (c) domain of attribute (d) name of relation.
48. Which of the following statements is correct?
a) Output of a relational algebra operation is a relation
b) Relational algebra operator acts on one or more relations
c) Both (a) and (b)
d) Neither (a) and (b)
∏¿
49. The symbol not belongs to relational algebra: a) ¿ b) σ c) ¿
d) Ψ
50. Using relational algebra the query that finds customers, who have a balance over
1000 is
a) ∏customer _name (σbalance > 1000 (Deposit))
b) σcustomer _name (∏balance > 1000 (Deposit))
c) ∏customer _name (σbalance > 1000 (Borrow))
d) σcustomer _name (∏balance > 1000 (Borrow))

51. Which of the following is not a procedural language?


a) Relational algebra b) SQL c) Relational calculus d) None of the
above
52. Relational calculus is a
a) procedural language b) non-procedural language c) query language d) none of
these
53. Which of the following is a logical operator?
a) AND b) OR c) NOT d) All of the above
54. What is the expansion of QBE?
a) Query by Example b) Query by Experiment c) Question before Evaluation d)
None of the above

Question Bank_EC705C
Page 6
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

Module-IV: SQL & Integrity Constraints


1. Which of the following can generate SQL statements?
a) CASE Tools b) SQL Generators c) PowerBuilder's Data Window d) All of
the above
2. Who developed the Structured English Query Language?
a) E. F. Codd b) D. Chamberlain c) Chris Date d) None of the above
3. System R was based on which product?
a) SQL b) SEQUEL c) SQL-XRM d) SEQUEU2
4. Which of the following is the first commercial RDBMS?
a) DB2 b) INGRESS c) ORACLE d) None of the above
5. Which of the following is IBM's first RDBMS?
a) DB2 b) IMS c) SQUDS d) None of the above
6. Which of the following is the company now know as the Oracle Corporation?
a) Slepware Inc. b) Relational Software Inc. c) Rational Inc. d) Oracle Soft -
ware Inc.
7. Which of the following is the latest SQL standard?
a) SQL-82 b) SQL-92 c) SQL-3 d) SQL-8
8. In which year did SQL-3 become an official SQL standard?
a) 1993 b) 1995 c) 1999 d) 2000
9. The language that requires a user to specify the data to be retrieved without
specifying exactly how to get it is
a) Procedural DML. b) Non-Procedural DML. c) Procedural DDL. d) Non-
Procedural DDL
10. Create table command belongs to the category of SQL
a) DDL b) DML c) DCL d) DQL
11. DML is provided for
a) description for logical structure of database b) addition of new structures in
the database system
c) manipulation & processing of database d) definition of physical structure of
database system
12. Four DML commands are
a) CREATE, UPDATE, DELETE, SELECT
b) INSERT, UPDATE, DROP, SELECT
c) CREATE, ALTER, DELETE, SELECT
d) INSERT, MODIFY, DELETE, SELECT
e) INSERT, UPDATE, DELETE, SELECT
13. Which of the following is a DDL statement?
a) SELECT b) DROP c) DELETE d) UPDATE
14. Which of the following is not a DDL statement?
a) SELECT b) ALTER c) CREATE d) DROP
15. Which of the following is not a DDL statement?
a) UPDATE b) DROP c) CREATE d) ALTER
16. DCL implies the commands
a) select & update b) insert & delete c) grant & revoke d) create & drop
17. Which of the following is a comparison operator in SQL?
a) = b) LIKE c) BETWEEN d) All of these
18. The clause in SQL that specifies that the query result should be sorted in ascending
or descending order based on the values of one or more columns is

Question Bank_EC705C
Page 7
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

a) View b) Order by c) Group by d) Having

19. Which of the following keys in a table can uniquely identify a row in a table?
a) Candidate key b) Primary key c) Alternate key d) All of the above
20. A table can have only one
a) Candidate key b) Primary key c) Alternate key d) All of the above
21. Which key cannot be null
a) Foreign key b) Primary key c) Super key d) Unique key
22. In case of entity integrity, the primary key may be
a) not Null b) Null c) both Null & not Null d) any value
23. NULL stands for
a) zero b) space c) garbage d) absence of any value
24. An attribute of one table matching the primary key of another table is called
a) candidate key b) secondary key c) foreign key d) composite key
25. All candidate keys other than the primary keys are called
a) Secondary keys b) Alternate keys c) Eligible keys d) None of the
above
26. What is the name of the attribute or attribute combination of one relation whose
values are required to match those of the primary key of some other relation?
a) Primary key b) Candidate key c) Matching key d) Foreign key
27. A discriminator is also called
a) partial key b) super key c) foreign key d) primary key
28. Which of the following is an integrity constraint?
a) Domain constraint b) Entity integrity c) Referential integrity d) All of the
above
29. Which of the following is pan of a domain definition?
a) Domain name b) Data type c) Size d) All of the above
30. The rule that a value of a foreign key must appear as a value of some specific table
is called a
a) Referential constraint. b) Index. c) Integrity constraint. d) Functional
dependency.
31. In relational model, each tuple contains values for –
a) attributes b) entities c) relationships d) domains

Module-V: Relational Database Design


1. Which of the following is the formal process for deciding which attributes should be
grouped together in a relation?
a) Normalization b) Performance tuning c) Optimization d) None of the
above
2. Who developed the normalization process?
a) C. J. Date b) E. F. Codd c) Donald Chamberlain d) Collin White
3. Who developed the BCNF?
a) Boyd and Cromwell b) Date and Codd c) Date and White d) Boyce
and Codd
4. Which is the process of building database structures to store data?
a) Concurrency Management b) Compilation c) Normalization d) None of
the above

Question Bank_EC705C
Page 8
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

5. Which of the following process involves analysis and identification of data that must
be stored and how best 10 store it?
a) Normalization b) Denormalization c) Information modeling d) All of the
above
6. Which of the following is a formal process of developing data structures in a manner
that eliminates redundancy and promotes integrity?
a) Normalization b) Compilation c) Performance Tuning d) Information Model -
ing
7. What is the expansion of BCNF?
a) Boyd-Cromwell Normal Form b)Boyce-Codd Normal Form
c) Boyd-Codd Normal Form d) None of the above
8. When all the columns in a table describe and depend upon the primary key, the table
is said to satisfy the normal form.
a) First b) Second c) Third d) Fourth
9. A normal form in which every non prime attribute is fully dependent on prime at -
tribute is
a) 1NF b) 2NF c) 3NF d) BCNF
10. Transitive dependency is removed in
a) 1NF b) 2NF c) 3NF d) 4NF
11. Which of the following is a column in a table that uniquely identifies the records from
a different table?
a) Primary Key b) Candidate Key c) Foreign Key d) Intelligent Key
12. Which of the following is true?
a) Superkey is always a candidate key
b) Every 3NF schema is also in BCNF
c) Generalization is top-down design approach
d) none of these
Module-VI: Internals of RDBMS
1. Serializability of concurrent transactions are ensured by
a) locking b) time stamping c) both (a) and (b) d) none of these.
2. Check pointing is associated with
a) log based recovery
b) non-log based recovery
c) both (a) and (b)
d) none of these.
3. 2PL is a
a) concurrency control technique
b) recovery mechanism
c) deadlock prevention mechanism
d) none of these.
4. Which of the following is not a recovery technique?
a) Shadow-paging b) Deferred updating c) Write-Ahead logging d) Immediate
updating
5. Which of the following situations is detected by a Precedence graph?
a) Deadlock b) Serializability c) Redundancy d) Functional de-
pendency.
6. A transaction is said to be atomic, if and only if
a) transaction is partially completed

Question Bank_EC705C
Page 9
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

b) transaction is fully completed


c) transaction does not take place
d) none of these.
7. Which of the following is the way to undo the effects of an aborted transaction?
a) Compensation transaction b) Roll back c) Recovery d) Error con-
trol.
8. In a pre-commit state a transaction may be
a) Aborted b) committed c) Either (a) or (b) d) none of these
9. Conversion of locking mode from sharable to exclusive is called
a) upgradation b) down gradation c) unlock d) none of these
10. Which one is an odd member?
a) Lost update b) Dirty read c) Phantom deadlock d) Incorrect sum-
mary.
11. Usually commercial RDBMS application use for recovery technique is
a) immediate update b) deferred update
c) check-point based update d) all of these.

12. Lock point in 2 phase locking protocol denotes


a) start of growing phase b) end of growing phase
c) end of shrinking phase d) anywhere in phase.

13. There is a conflict in a schedule if


a) two transactions work on the same data item
b) the operations are from different transactions
c) at least one of the operations is write
d) all of these.

14. Time stamp is used for


a) Serialization b) Deadlock control
c) Transaction log d) both (b) & (c).

15. Which phase is not part of a two phase locking protocol?


a) Growing phase b) Shrinking phase
c) Stabilization phase d) None of these.

16. The concurrency control has the problem of


a) lost updates b) dirty read c) unrepeatable read d) all of these.

17. In 2-phase locking a transaction must


a) release all its locks at the same time
b) NOT obtain any new locks once it has started releasing locks
c) only obtain locks on items not used by any other transactions
d) ensure that deadlocks will never occur.

Module-VII: File Organization & Index Structure


1. One of the causes of the failure of file system

Question Bank_EC705C
Page 10
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

a) Data availability b) Fixed records c) Sequential records d) Lack of secu-


rity
2. One of the shortcomings of file system is
a) data availability b) fixed records c) sequential records d) lack of secu-
rity
3. Which index is specified on the non-ordering fields of a file?
a) Primary b) Clustering c) Secondary d) None of these.
4. For a B-tree of order N with n nodes is of height
a) ( l o g 2 n ) b) (log2n) c) (2 1og2n) d) ( l o g 2 n 2 )

Group-B
WBUT Questions:

Module-I: Introduction to DBMS


1. What is DBMS?
2. What is file-based data management?
3. What is the difference between a database and a table?
4. Explain physical data independence.
5. What are the characteristics that distinguish a DBMS from traditional file processing
system?
6. Explain the elements of a database with the help of a neat diagram.
7. What do you mean by logical data independence?
8. What are database management systems? Give some examples.
9. What are the benefits of using a DBMS?
10. What are the contents of a data dictionary?
11. What is metadata?
12. What are the benefits of a data dictionary?
13. What are the different types of data dictionaries?
14. Who is a database administrator?
15. Who are database designer and what are their responsibilities?
16. Describe the different types of database end-users.
17. Explain external, conceptual, and internal schema.
18. What are the functions of a DBA?
19. What do you mean by data abstraction?
20. Explain View with suitable example. What is the usefulness of a view?
21. What is metadata? What are different types of metadata?
22. What is data model? Explain the hierarchical database model.
23. Explain the network database model.
24. Explain the relational database model.
25. Explain the E-R model.
26. Explain the object-oriented database model.
27. What is logical containment of relationships?
28. Explain the object-relational database model.
29. Explain the advantages and disadvantages of the E-R database model?

Question Bank_EC705C
Page 11
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

30. Compare and contrast the hierarchical, network and object-oriented database mod-
els.

Module-II: Entity-Relationship Model


1. What is E-R modeling? What are the components of an E-R model?
2. Differentiate between
I. Single value and multiple valued attribute.
II. Derived and non-derived attributes.
III. Partial key and primary key. What are multi-valued attributes?
3. What are the problems caused by them?
4. What are the different types of attributes?
5. What is the relation between entities and attributes?
6. What are entity identifiers?
7. What are instances of entities?
8. What are attribute domains?
9. What do you mean by the degree of a relationship? Explain with examples.
10. What is Weak Entity Set? Differentiate between strong and weak entity set. Why a
weak entity set is called existence dependent? How is it represented in ER diagram
and converted into table? Explain with example.
11. Can we convert any weak entity set to a strong entity set by simply adding appropri -
ate attributes? Why, then, do we have weak entity sets?
12. What do you mean by the cardinality of relationship?
13. Define the concept of aggregation. Give two examples of where this concept is use -
ful.
14. What are participation constraints?
15. What' are E-R diagrams and what are their objectives?
16. Compare and contrast between:
I. Specialization and generalization
II. Multivalued attribute and composite attribute.
III. Key constraint and referential integrity constraint.

17. What are super class entity types? Explain with examples.
18. What are subclass entity types? Explain with examples.
19. How are super classes and sub class entity types related?
20. What is specialization?
21. What is generalization?
22. What is a one-to-one relationship? Give examples.
23. What is a one-to-many relationship? Give examples.
24. What is a many-to-many relationship? Give examples.
25. What is a composite attribute? Explain with an example.
26. Draw the E-R diagram of a library using the different components of E-R models.
27. Construct an E-R diagram for a car-insurance company whose customers own one or
more cars each. Each car has associated with it zero to any number of recorded acci-
dents.
28. Construct an E-R diagram for a hospital with a set of patients and a set of medical
doctors. Associate with each patient a log of the various tests and examinations con-
ducted.
29. Consider the E-R diagram in Figure 2.10, which models an online bookstore.
a) List the entity sets and their primary keys.

Question Bank_EC705C
Page 12
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

b) Suppose the bookstore adds music cassettes and compact disks to its collection.
The same music item may be present in cassette or compact disk format, with dif -
fering prices. Extend the E-R diagram to model this addition, ignoring the effect on
shopping baskets.
c) Now extend the E-R diagram, using generalization, to model the case where a
shopping basket may contain any combination of books, music cassettes, or com-
pact disks.

30. Design an E-R diagram for keeping track of the exploits of your favorite sports team.
You should store the matches played, the scores in each match, the players in each
match and individual player statistics for each match. Summary statistics should be
modeled as derived attributes.
31. An E-R diagram can be viewed as a graph. What do the following mean in terms of
the structure of an enterprise schema?
a) The graph is disconnected.
b) The graph is acyclic.

32. a) Construct an ER diagram for a hospital with a set of doctors and set of patients.
Associate with each patient a log of examinations conducted. A patient can see more
than one doctor and a doctor can have more than one patient. A patient should see at
least one doctor and a doctor should have at least one patient. Patient have log and
doctor studies log for deciding treatment. These are minimum details that you should
specify, but it’s upto you- what else you can add to ERD to make it more comprehen-
sive. i) Document all assumptions that you make about the mapping con-
straints, participation, key etc. ii) Write your opinion regarding ‘log’ used as an
entity set and ‘log’ used as an attribute.
Convert them into ER diagram.
b) Also draw another ER diagram having the ternary relationship between the
relations.
Which ER diagram is better to you? State why according to your view.
33. A university registrar’s office maintains data about the following entities:
(a) courses, including number, title, credits, syllabus, and prerequisites;
(b) course offerings, including course number, year, semester, section number, in-
structor(s), timings, and classroom;
(c) students, including student-id, name, and program; and
(d) instructors, including identification number, name, department, and title.
Further, the enrollment of students in courses and grades awarded to students in
each course they are enrolled for must be appropriately modeled.
Construct an E-R diagram for the registrar’s office. Document all assumptions that
you make about the mapping constraints.
34.Draw and Explain the E-R diagram of Banking System with the help of a neat sketch.
35.Design a Generalization-Specialization hierarchy for a motor vehicle sales company.
The company sells motor-cycles, passenger cars, vans, buses. Justify your placement
of attributes at each level of the hierarchy. Explain why they should not be placed at
a higher or lower level.

Module-III: Relational Model


1. Describe the structure of a relational database with suitable examples.
2. What are Codd's rules?

Question Bank_EC705C
Page 13
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

3. Explain how to reduce a relationship set of an E-R diagram into relational


schema.
4. What is a UNION? How is it represented? Explain with an example.
5. What do you mean by union compatibility?
6. What is a DIFFERENCE? How is it represented? Explain with an example.
7. What is an INTERSECTION? How is it represented? Explain with an example.
8. What is a CARTESIAN PRODUCT? How is it represented? Explain with an example.
9. What is a SELECT operation? How is it represented? Explain with an example.
10.What is a selection condition?
11.What is a PROJECT operation? How is it represented? Explain with an example.
12.What is ASSIGNMENT? How is it represented? Explain with an example.
13. What is the DIVISION operation? How is it represented? Explain with an example.
14. What is a RENAME operation? How is it represented? Explain with an example.
15. What is the use of a RENAME operation?
16. What is a JOIN operation? How is it represented? Explain with an example.
17. How deletion is performed using relational algebra?
18. How insertion is performed using relational algebra?
19. What is the difference between theta-join and natural join?
20. Define Join and Outer Join and differentiate between them.
21. Define the following operations of relational algebra and give an example for each
operation
(i) Division.
(ii) Cartesian product

22. Estimate the size for following disjunctive selection


σ θ 1∨θ2∨θ 3 . . .. . .. .∨θn (r ) .As-
sume size for selection condition θ i is S i and nr be number of tuple of r.

23. What do you mean by query optimization? Estimate the size for following conjunctive

selection σ θ 1 ¿ θ 2….. ¿ θ n(r). Assume size for selection condition θ i


is S i and nr be number of tuple of r.
24. What are the relational algebraic operations? Explain with examples.
25. What are aggregate functions? How are they expressed? Explain with examples.
26. How the update operations are performed using relational algebra?
27. Consider the relations:
PROJECT(proj#, proj_name)
EMPLOYEE(emp#, emp_name)
ASSIGNED(proj#, emp#)
Use relational algebra to express the following queries:
(i) Find the employee number of employees who work on at least all of the projects that
employee 107 works on.
(ii) Get the employee number of employees who work on all projects.
28. Consider the following relations
SALESPERSON(SSN, Name, Start_Year, Dept_No)
TRIP(SSN,From_City,To_City,Departure_Date,Return_Date,Trip_ID)
EXPENSE(Trip_ID, Account#, Amount)
Write Q-)ueries in relational algebra
(i) Give the details (all attributes to TRIP relation) for the trips that exceeded $2000
in expenses.
(ii) Print the SSN of salesman who took trips to ‘Chandigarh’.

Question Bank_EC705C
Page 14
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

(iii) Print the total trip expenses incurred by the salesman with SSN =‘234-56-7890’.
29. Consider the schema
Airport (code, name, city, country)
Flight (number, airline, from_airport_code, to_airport_code)
Reservation(flight_number, seat_number, date, passenger_name)
Answer the following using relational algebra
(i) List the flight numbers of flights that take off from India
(ii) List the passenger who are on flight number ‘SA 747’.
(iii) List all the flight information for Indian Airlines and Jet Airways.
30. Consider the database below(primary keys are underlined):
Sailors(sid, sname, rating, age)
Boats(bid, bname, color)
Reserves(sid, bid, day)
Express the following queries in relational algebra:
(i) Find sailors who have reserved boat no.101
(ii) Find names of sailors who have reserved a green boat but not red boat.
(iii) Find sids of sailors who have rating of 10 or have reserved boat 102.
(iv) Find names and sids of sailors who have reserved all green boats
31. Consider the following schema of a relational database
Employee (e.no , name address )
Project (p.no , p_name )
Work-on(e_no, p_no)
Part (part_no,part_name ,qty_on_hand, size)
Use(e_no, p_no, part_no, number)
Solve the following queries using relational Algebra.
a) Print the names of the employees who are working on a project name ‘DBMS’
b) Print the names of all employees where are not working in any project.
c) List the names of the employees and the projects with which the employees
are associated with and for which they have used no part so far.
d) List the names of the projects , such that every employee working on these
projects has used a part ‘bolts’ with size ‘6’
e) List the part number & part names used in both projects ‘DBMS’ and ‘MIS’
f) List the names of all employees who are working in both the project ‘DBMS’
and ‘MIS’
32. Consider the following tables:
Employee
Emp_Na Street City
me
Coyote Toon Hollywoo
d
Rabote Tunnel Carrotvill
e
Smith Revolver Jaannom
William Seaview Seattle

Works
Emp_Nam Branch Salary
e
Coyote Mesa 15000
Rabote Mesa 13000
Question Bank_EC705C
Page 15
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

Gstreen Redmond 45000


William Redmond 17000

Show the result for their natural join, left outer Join, right outer join, full outer join

33. Consider the following relational database , where the primary keys are underlined.
employee (person-name, street, city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)

Give an expression in the relational algebra to express each of the following


queries:
a) Find the names of all employees who work for First Bank Corporation.
b) Find the names and cities of residence of all employees who work for First Bank
Corporation.
c) Find the names, street address, and cities of residence of all employees who work for
First Bank Corporation and earn more than $10,000 per annum.
d) Find the names of all employees in this database who live in the same city as the
company for which they work.
e) Find the names of all employees who live in the same city and on the same street as
do their managers.
f) Find the names of all employees in this database who do not work for First Bank
Corporation.
g) Find the names of all employees who earn more than every employee of Small Bank
Corporation.
h) Assume the companies may be located in several cities. Find all companies located in
every city in which Small Bank Corporation is located.

34. Consider the above relational database. Give a relational-algebra expression for each
of the following queries:
a) Find the company with the most employees.
b) Find the company with the smallest payroll.
c) Find those companies whose employees earn a higher salary, on average, than the
average salary at First Bank Corporation.

35. Specify the following queries on the COMPANY relational database schema given be-
low.

Employee (Fname, Minit, Lname, SSn, Bdate, Address, Sex, Salary, Super_ssn, Dno)
Department (Dname, Dnumber, Mgrssn, Mgr_startdate)
Dept_location (Dnumber, Dlocation)
Project (Pname, Pnumber, Plocation, Dnum)
Works_on (essn, pno, hours)
Dependent (essn, dependent_name, sex, bdate, Relationship)

(a) Retrieve the names of employees in department 5 who work more than 10 hours per
week on the 'ProductX' project.
(b) List the names of employees who have a dependent with the same first name as
themselves.

Question Bank_EC705C
Page 16
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

(c) Find the names of employees that are directly supervised by 'Franklin Wong'.
(d) For each project, list the project name and the total hours per week (by all
employees) spent on that project.
(e) Retrieve the names of employees who work on every project.
(f) Retrieve the names of employees who do not work on any project.
(g) For each department, retrieve the department name, and the average salary of
employees working in that department.
(h) Retrieve the average salary of all female employees.
(i) Find the names and addresses of employees who work on at least one project located
in Houston but whose department has no location in Houston.
(j) List the last names of department managers who have no dependents.

36. Consider the LIBRARY relational schema shown below, which is used to keep track of
books, borrowers, and book loans. Referential integrity constraints are shown as di-
rected. Write down relational expressions for the following queries on the LIBRARY
database:
(a) How many copies of the book titled The Lost Tribe are owned by the library branch
whose name is "Sharpstown"?
(b) How many copies of the book titled The Lost Tribe are owned by each library branch?
(c) Retrieve the names of all borrowers who do not have any books checked out.
(d) For each book that is loaned out from the "Sharpstown" branch and whose Due Date
is today, retrieve the book title, the borrower's name, and the borrower's address.
(e) For each library branch, retrieve the branch name and the total number of books
loaned out from that branch.
(f) Retrieve the names, addresses, and number of books checked out for all borrowers
who have more than five books checked out.
(g) For each book authored (or co-authored) by "Stephen King", retrieve the title and the
number of copies owned by the library branch whose name is "Central".
37. What is relational calculus?
38. In what sense does relational calculus differ from relational algebra and in what
sense are they similar?
39. What is tuple relational calculus?
40. How does tuple relational calculus differ from domain relational calculus?
41. When is a query language called relationally complete?
42. What additional features of commercial query languages over and above those nec-
essary for relational completeness?
43. What do you mean by expressive power?
44. What is a tuple variable?
45. What is the truth value or an atom?
46. What is a formula?

Module-IV: SQL & Integrity Constraints


1. What is a universal database?
2. Name the different SQL data types.
3. Why are entity integrity and referential integrity important in a database?
4. What are character strings? Give examples.
5. What do you mean by bit string? Give examples.
6. What is an exact numeric? Give examples.
7. What are approximate numeric literals? Give examples.

Question Bank_EC705C
Page 17
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

8. What are string data types?


9. Explain the operation of Nulls.
10.What are data definition language (DDL) commands'! Explain with examples.
11. What are data manipulation language (DML) commands? Explain with examples.
12. What are data control language (DCL) commands? Explain with examples.
13. What are data query language (DQL) commands'! Explain with examples.
14.Write the difference between procedural and non-procedural query language.
15. What is view? What are the advantages of view?
16. In SQL, differentiate between
i) a subquery and a join ii) WHERE and HAVING clauses
iii) DROP and DELETE iv) DELETE and TRUNCATE
17. What are the different arithmetic operators in SQL? Explain with examples.
18. What are comparison operators in SQL? Explain with examples.
19. Explain the operators of ANY, ALL and SOME with examples?
20. Explain the comparison operators IN and BETWEEN with examples.
21. What is the difference between LEFT OUTER JOIN and RIGHT OUTER JOIN.
22. What are the advantages of SQL?
23. What are the different categories of SQL commands?
24. What are the different arithmetic operators in SQL? Explain with examples.
25. What are comparison operators in SQL? Explain with examples.
26. Consider following SQL query:
SELECT Cust_name FROM BORROWER WHERE Cust_name
IN (SELECT Cust_name FROM DEPOSITOR)
a) Convert it into equivalent Relation-Algebraic form
b) Convert it into equivalent Domain-Relation-Calculus form
c) Convert it into equivalent Tuple-Relation-Calculus form
27. What is Trigger?
28. (a)Show with example that ‘not exists’ keyword can be used to implement division
operator in SQL.
(b) Write short notes on integrity constraints.
29. Explain the difference between the candidate keys, primary key and alternate keys.
30. What is the uniqueness property?
31. What is referential integrity?
32. What do you mean by foreign key?
33. What are the constraints included in a relational model?
34. What are domain constraints?
35. What is entity integrity?
36. Consider the insurance database(Key is underlined).
Person (license_no, name,address)
Car (registration_no, model,year)
Accident (report_no, date, location)
Owns (license_no, registration_no)
Participated (license_no, registration_no, report_no, damage_amount)
Construct the following queries in SQL:
(i) Find the total number of people who owned cars that were involved in
accidents in 1998.
(ii) Find the number of accidents in which the cars belonging to “John”
were involved.
(iii) Add a new accident into the database (assume the values of attributes)
(iv) Delete the “Maruti” belonging to “John”

Question Bank_EC705C
Page 18
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

(v) Update the damage amount for the car with registration no “AABB2200”
in the accident
37. Consider the supplies-parts-projects database mentioned below:
S(S#, SNAME, STATUS, CITY, primary key S#)
P(P#,PNAME,COLOR,WEIGHT,CITY, Primary key P#)
J(J#,JNAME,CITY, primary key J#)
SPJ(S#,P#,J#,QUANTITY, primary key (S#,P#,J#),foreign key S# references S , foreign
key P# references P , foreign key J# references J)
Write SQL statements to answer the following queries
i) Get full details of all projects In London.
ii) Get full details of parts supplied by a supplier in London.
iii) Get part numbers or parts supplied to a project by a supplier in the same city as
the project.
iv) Get part numbers of parts supplied to some project in an average quantity of more
than 350.
v) Get project numbers for projects not supplied with any red part by any London
supplier.
38. Consider the following relation schema of Library.
Book (book-id, title)
Author (book-id, author-name)
Book-copies (Book-id, branch-id, no-of-copy)
Library-branch (branch-id, branch-name)
Book-loan (book-id, branch-id, card-no)
Borrower (card-no, name, city)
Write the following queries using SQL.
i) List the name of books borrowed by the borrowers who reside in KOLKATA.
ii) Retrieve the names of borrowers who do not borrow any book.
iii) Retrieve the name of the Library branches which have maximum number of books.
iv) Retrieve the name of borrowers who have borrowed at least 3 books and not more
than 10 books.

Module-V: Relational Database Design


1. What are the desirable properties of decomposition?
2. What do you mean by functional dependency? Explain with examples.
3. What are the main characteristics of functional dependencies?
4. Explain how to identify the functional dependencies of a relation using an example.
5. What are Armstrong's axioms?
6. Explain normalization and the normalization process.
7. What are the different normal forms?
8. Why certain functional dependencies are called trivial functional dependencies?
9. Use the definition of functional dependency to argue that each of Armstrong’s axioms
(reflexivity, augmentation, and transitivity) is sound.
10. Use Armstrong’s axioms to prove the soundness of the union rule and decomposi-
tion rule.
11. What is pseudo-transitivity?
12. Give an example of a relation schema R and a set of dependencies such that R is in
BCNF, but is not in 4NF.
13. How are the problems caused by multi-valued attributes resolved?

Question Bank_EC705C
Page 19
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

14. What is an insertion anomaly? Explain with an example.


15. What do you mean by a deletion anomaly! Explain with an example.
16. What is a modification/ update anomaly? Explain with an example.
17. What are multi-valued dependencies or MVDs?
18. What is a join dependency?
19. What do you mean by lossless-join dependency?
20. Why is de-normalization needed?
21. BCNF is stronger than 3NF---Is it true? Explain.
22. Prove that any relation schema with two attributes is in BCNF.
23. What is lossless decomposition? When a binary decomposition become loss less? Let
a relation R= (A, B, C) and F= (A → B). Prove that decomposition of R into R1 =(A,
B) and R2 =(B, C) is Lossy.
24. Derive the union rule, decomposition rule and the pseudo Transitivity rule using the
three Armstrong’s axioms
25. When a binary decomposition become loss less? Show with a small example.
26. What is partial functional dependency, give example?
27. Let R=(A,B,C) and F=(A → B). Prove that decomposition of R
into R1=(A,B) and R2=(A,C) is lossless.
28. Prove that a relation with primary key of single attribute is always in 2NF.
29. Prove that if B is prime attribute in A → B then relation is in 3NF.
30. Suppose a relation R with attributes A, B, C and D. For following set of FDs:
C → D, C → A, B → C. Identify the Candidate Key(s) and identify the best
normal form that R satisfies.
31. What is multivalued dependency? When multivalued dependencies become trivial.
32. Explain Boyce-Codd Normal Form with example and also Compare BCNF and 3NF.
33. What are Armstrong’s inference rules?
34. Suppose you are given relation R with attributes A, B, C, D, E, F and the FDs
A → BC, B → E, CD → EF
Prove that FD AD → F also holds in R.
35. What are the pitfalls of relational database design?
36. What is decomposition? Explain with the help of an example.
37. What are functional dependencies? Explain.
38. What are the inference rules for functional dependencies?
39. Explain multi-valued dependencies with examples.
40. What is the first normal form (1NF)?
41. Explain second normal form (2NF)?
42. What is third normal form (3NF)?
43. Explain the Boyce-Codd normal form (BCNF)?
44. Compare 3NF & BCNF with suitable example.
45. What is the fourth normal form (4NF)?
46. What is the fifth normal form (5NF)?
47. Explain the Domain-Key normal form (DKNF)?
48. What is de-normalization?
49. What is normal form in DBMS? Why is it done? What do you mean by lossless de-
composition?
Let R is a relation.
R= {J, K, L, M}
J is key and L → M exists.
(a) How much deepest normal form this table can have at this level and why?
(b) How we can break down this relation to one step further in normal form?

Question Bank_EC705C
Page 20
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

(c) What is BCNF? How it is different from 3NF?


50. a) Prove that a relation with primary key of single attribute is always in 2NF.
b) Prove that if B is prime attribute in A → B then relation is in 3NF.
c) Suppose a relation R with attributes A, B, C and D. For following set of FDs:
C → D, C → A, B → C. Identify the Candidate Key(s) and identify the best
normal form that R satisfies. d) Explain disadvantages of normalization.
51. a) Define join dependency and multivalued dependency.
b) Given a database schema T(s#, city, status, p#, qty) and with FDs:
s#  city
city  status
s#  status
{s# , p#}  qty
Reduce it into BCNF.
52. a) Discuss the “insertion anomalies”, updation anomalies” and “deletion anomalies”
with respect to normal forms with suitable example and suggest a method to over-
come them.
b) Why a relation that is in 3 NF generally considered good although BCNF is stronger
than 3NF.
c) Discuss the problem of spurious tuples and state how we may prevent it.
53. a) Prove that a relation with primary key of single attribute is always in 2NF.
b) Prove that if B is prime attribute in A → B then relation is in 3NF.
c) Suppose a relation R with attributes A, B, C and D. For following set of FDs:
C → D, C → A, B → C.
Identify the Candidate Key(s) and identify the best normal form that R satisfies.
54. Given the dependency diagram shown in the following figure (the primary key at -
tributes are underlined)

i) Identify and discuss each of the indicated dependencies.


ii) Create a database whose tables are at least in 3NF, showing dependency diagram
for each table.
55. Given R = {A, B, C, D} and a set F of functional dependencies on R given as F = {AB
→ C, AB → D, C → A, D → B}. Find any two candidate keys of R. Show each
step. In which normal form is R? Justify.
56. Suppose that we decompose the schema R = (A, B, C, D, E) into R1 (A, B, C) and
R2(A, D, E).
a) Show that this decomposition is a lossless-join decomposition if the following set F
of functional dependencies holds: A → BC, CD → E, B → D, E → A
b) List all functional dependencies satisfied by the relation R.
c) Show that the decomposition of R is not a dependency-preserving decomposition.
d) Give a lossless-join, dependency-preserving decomposition into 3NF of schema R
e) Give a lossless-join decomposition into BCNF of schema R
57. Consider the following proposed rule for functional dependencies: If α → β and γ
→ β, then α → γ. Prove that this rule is not sound by showing a relation r that sat-
isfies α → β and γ → β, but does not satisfy α → γ.
58. Compute the closure of the following set F of functional dependencies for relation
schema
R = {A, B, C, D, E}. F = {A → BC, CD → E, B → D, E → A}
Question Bank_EC705C
Page 21
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

a) List the candidate keys for R.


b) Compute F+.
c) Find the canonical cover of F.
59. Consider the following two sets of functional dependencies F= {A → C, AC → D, E
→ AD, E → H} and G = {A → CD, E → AH}. Check whether or not they are
equivalent.
Is the set of functional dependencies G minimal? If not, try to find a minimal set of func -
tional dependencies that is equivalent to G. Prove that your set is equivalent to G.

60. Consider the relation schema EMP_DEPT (Ename, Ssn, Bdate, Addr, Dnum, Dname,
Dmgrssn) and the following set G of functional dependencies on EMP_DEPT:
G = {SSN → {ENAME, BDATE, ADDRESS, DNUMBER} , DNUMBER → {DNAME, DM-
GRSSN} }.
Calculate the closures {SSN} + and {DNUMBER} + with respect to G.
61. What update anomalies occur in the EMP_PROJ (Ssn, Project_number, hours, ename,
pname, plocation) and EMP_DEPT (Ename, Ssn, Bdate, Addr, Dnum, Dname, Dm-
grssn) relations with the FDs
F={{SSN, PNUMBER} → HOURS, SSN → ENAME, SSN → {PNAME, PLOCATION}
and
G = {SSN → {ENAME, BDATE, ADDRESS, DNUMBER} , DNUMBER → {DNAME, DM-
GRSSN} }?
62. Consider the universal relation R = {A, B, C, D, E, F, G, H, I} and the set of func -
tional dependencies
F = { {A, B} → {C}, {A} → {D, E}, {B} → {F}, {F} → {G, H}, {D} → {I, J} }.
What is the key for R? Decompose R into 2NF, then 3NF relations.
63. Given relation R (A,B,C,D,E) with dependencies AB → C, CD → E, DE → B is AB a
candidate key of this relation? If not, is ABD? Explain your answer.
64. Show that AB→ D is in the closure of F={AB → C, CE → D, A → E}.
65. CAR_SALE (CarID, Option_type, Option_Listprice, Sale_date, Discounted_price)
This relation refers to options installed on cars (e.g.- cruise control) that were sold at a
dealership and the list and discounted prices for the options. If CarID → Sale_date and
Option_type→ Option_Listprice, and
CarID, Option_type → Discounted_price, are the functional dependencies.
a) Argue from your knowledge of 2NF, why it is not in 2NF.
b) Is it in 3NF? If not, convert it into 3NF.
c) Consider the above relation CAR_SALE is decomposed into the following rela-
tions:
ACTUAL_OPTION_PRICING (CarID, Option_type, Discounted_price)
CAR (CarID, Sale_date )
OPTION (Option_type, Option_Listprice )
Determine if this decomposition is indeed lossless.

Module-VI: Internals of RDBMS


1. State the steps involved in query processing. Why is the query optimization needed?
2. Discuss the ACID properties of transaction.
3. Describe the wait-die and wound-wait protocols for deadlock prevention.
4. Define three concurrency problems: dirty read, non-repeatable read, phantoms.
5. Since every conflict-serializable schedule is view serializable, why do we emphasis
conflict serializable rather than view serializability?
Question Bank_EC705C
Page 22
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

6. What is a cascadeless schedule? Why is it required? Are there any circumstances un-
der which it would be desirable to allow noncascadeless schedule? Explain.
7. Consider the following precedence graph:
T1 T2

T4 T3

T5
Is the corresponding schedule conflict serializable? Explain your answer.

8. Consider the following two transactions:


T1 : read (A);
read (B);
if A = 0 then B:= B+1;
write (B);
T2 : read (B);
read (A);
if B = 0 then A:= A+1;
write (A);
Add lock and unlock instruction of transactions T1 and T2, so that they observe the
two-phase locking protocol. Can the execution of these transactions result in a
deadlock?
9. Let T1, T2 and T3 be transactions that operate on the same data items A, B and C.
Let r1(A) mean that T1 reads A, w1(A) means that T1 writes A and so on for T2 and
T3. Consider the following schedule:
S1: r2(C), r2(B), w2(B), r3(C), r1(A), w1(A), w3(B), w3(C), r2(A), r1(B), w1(B), w2(A).
Is the schedule serializable and why?

Module-VII: File Organization & Index Structure


1. What are the differences between Primary index, Secondary index and Clustering in-
dex?
2. What are the differences between dense index and sparse index?

Group-C
GATE Level & Conceptual Questions:
Module-I: Introduction to DBMS
1. Explain the distinction between disjoint and overlapping constraints in the context of
specialization and
generalization. Marks: 4 Time: 7
min

Question Bank_EC705C
Page 23
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

2. A weak entity set can always be made into a strong entity set by adding to its at-
tributes the primary key attributes of its identifying entity set. Outline what sort of re -
dundancy will result if we do so.
Marks: 2 Time: 5 min
3. Consider the following ER diagram. If A has 100 entities, B has 1000 entities and C
has 10 entities what is the maximum number of entities (A, B, C) that could be in the
ternary relationship set R? Explain.
Marks: 3 Time: 6 min

4. List down the differences between an active and passive data dictionary?
Marks: 4 Time:6 min
Module-II: Entity-Relationship Model
1. Consider the following information about a university database:
a) Professors have an id, name, an age, a rank and a research area.
b) Projects have a project number, a budget, a start date and a finish date.
c) Under graduate students have an id, name, age, a course.
d) Each project is managed by one professor, called Principal Investigator.
e) One or more professors called Co-investigators work each project on.
f) When graduate students work ona project, a professor must supervise their
work.
g) Graduate students can work on a multiple projects in which case they will have
different supervisor for each one.
h) Departments have a dept number, name and an office. One professor is an
HOD of a department.
Design a ER diagram for the above system. Your diagram should specify enti-
ties, relationships, different types of attributes, keys, mapping cardinalities,
roles etc. Marks: 8 Time: 15 min
2. Consider a database that is to represent a large business. In this typical business,
there is a Division that operates several Departments. The Division is run by one Em -
ployee and each Department is managed by one Employee. Of course the Depart-
ment employs many Employees who work on projects that are assigned to them. Ev-
eryone needs to be busy, so it is not uncommon for an Employee to be assigned
many Projects and a Project may have many Employees assigned to it. There is a
special case of Employees that are not assigned to any Department; they roam
around looking for work from the various Departments. The task is to create an ERD
that represents this business situation. Marks: 8 Time: 15 min
3. Use the numbered points of information (requirement specification) to draw an En -
tity-Relationship (E-R) diagram for a system to hold information on Oscar awards. Your
E-R diagram should show ENTITIES, RELATIONSHIPS AND PK FIELDS ONLY in addition
to the justification for each side of each relationship by adding comments to the dia-
gram. The diagram has been started using the points below.
a) A film has many roles.
b) Each role is cast in 1 film
c) Each role is nominated for many awards

Question Bank_EC705C
Page 24
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

d) Each award has many roles nominated to receive it. The year of nomination is
recorded and whether or not it was successful.
Marks: 6 Time: 12 min
4. Consider the following ERD.

Convert the ER model into relational model. Marks: 5


Time: 10 min

5. Convert the following ER model of a banking system into relational model:

Marks: 8 Time: 18
min

Module-III- Relational Model


1. Suppose you are given the relational model below:
REGION (R_REGIONKEY, R_NAME, R_COMMENT)
PRIMARY KEY (R_REGIONKEY)

NATION (N_NATIONKEY, N_NAME, N_REGIONKEY, N_COMMENT)


PRIMARY KEY (N_NATIONKEY)
FOREIGN KEY (N_REGIONKEY) REFERENCES REGION (R_REGIONKEY)

PART (P_PARTKEY, P_NAME, P_MFGR, P_BRAND, P_TYPE, P_SIZE, P_CONTAINER, P_RETAILPRICE,


P_COMMENT)
PRIMARY KEY (P_PARTKEY)

Question Bank_EC705C
Page 25
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

SUPPLIER (S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL,


S_COMMENT)
PRIMARY KEY (S_SUPPKEY)
FOREIGN KEY (S_NATIONKEY) REFERENCES NATION (N_NATIONKEY)

PARTSUPP (PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST, PS_COMMENT)


PRIMARY KEY (PS_PARTKEY, PS_SUPPKEY)
FOREIGN KEY PS_PARTKEY REFERENCES PART (P_PARTKEY)
FOREIGN KEY PS_SUPPKEY REFERENCES SUPPLIER (S_SUPPKEY)

Write down the following queries using relational algebra. You may use any valid algebra
expression. Make sure you rename attributes whenever selection conditions are
ambiguous.
I. Find all parts with available quantity greater than 1000 or are supplied by a coun-
try in ’East Asia’
geographic region. Return the name of the part.
II. Find all suppliers who do not supply any parts with retail price greater than 1,000.
Return the name of
the suppliers. Marks: 3+3 Time: 10 min
2. Consider the following schema of a company database:
Employees (eid: integer, ename: string, address: string, supereid: integer)
Departments (did: integer, dname: string)
Projects (pid: integer, pname: string, did: integer)
Works_on (eid: integer, pid: integer, hours: integer)
Each Employee has a supervisor (another Employee) referenced by his/her supereid.
Projects are uniquely assigned to a Department. The Works_on relation records which
Employee works on which Project for how many hours a week.
Formulate each of the following queries in relational algebra (RA).
I. For each Employee, find his / her name and the name of his / her supervisor.
II. Find the eids of Employees who work on a project of every Department, i.e. find
the eids of Employees who work for (a project of) every Department.
Marks: 3+3 Time: 10 min

3. Given two relations R1 and R2, where R1 contains N1 tuples, R2 contains N2 tuples,
and N2> N1> 0, give the min and max possible sizes for the resulting relational
algebra expressions:
R1 U R2, R1 ∩ R2, R1 X R2, σ (a=5) (R1), ∏ a (R1), R1 (JOIN) R2 , where a is an at-
tribute of R1.
Marks: 2X 6 Time: 15 min
4. Consider the employee relation:
EMP (eid, ename, addr, salary, dept)
a. Use tuple relational calculus to retrieve the name and address of all employees
who work for ‘research’ department.
b. Use relational algebra to find the employee with highest salary. Marks:
3+3 Time: 10 min
5. Consider the following relational database:
Hotel (hid, hname, haddr, hcity)

Question Bank_EC705C
Page 26
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

Guest (gid, gname, gaddr, gcity)


Room (hid, roomno, type, price)
Booking (gid, hid, roomno, frmdate, year, noofdays)
a. Write a relational algebra expression that returns the ids of the hotels located in
Vancouver which were not booked at all in the year 2005.
b. Write a relational algebra expression that returns the ids of the guests who have
booked at least one room of type “suite” in every hotel located in Vancouver.
Marks: 3+3 Time: 10 min

6. Person ( PID, PersonName, Sex, Cityofbirth )


Parent ( ParentID, ChildID ) // both ParentID and ChildID are foreign keys referring to
Person PID
Write the following queries in relational algebra using only selection, projection, join,
Cartesian product, set union, intersection and difference.
a. Find the name of grandparents of all people who were born in New York city.
b. Find the name of all people who were born in the same city as their father.
Marks: 3+3 Time: 10 min
7. Consider the following relational database , where the primary keys are underlined.
employee (person-name, street, city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)
a) Find the names of all employees in this database who live in the same city as the
company for which they work.
b) Find the names of all employees in this database who do not work for First Bank
Corporation.
c) Modify the database so that Jones now lives in Newtown.
d) Give all employees of First Bank Corporation a 10 percent salary raise. Marks:
4X2 Time: 15min
8. Consider the following database:
FREQUENTS (CUSTOMER, HOTEL)
SERVES ( HOTEL, SNACKS)
LIKES (CUSTOMER, SNACKS)
The first indicates the hotels each customer visits, the second tell which snacks each ho-
tel serves and the last indicates which snacks are liked by each customer. Express the
following query in relational algebra: print the hotels that serve a snack that customer
Rama likes. Marks: 3 Time: 6 min
9. Suppose we have two relations R(A, B) and S(A, B) with the same schema. The only
key of R is {A}; the only key of S is {A} also. Let relation T(A, B) be the set union of R
and S, i.e., T = R U S. What are the keys of T? Explain.
Marks: 3 Time: 6 min
Module-IV: SQL & Integrity Constraints
1. Consider the following database :
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, city)
manages (employee-name, manager-name)
Solve the following queries by using SQL:
i) Find the names of all employees in this database who live in the same city as the
company for which they work.

Question Bank_EC705C
Page 27
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

ii) Find the names of all employees who live in the same city and on the same street as
do their managers.
iii) Find the names of all employees who earn more than every employee of ‘Aije Bank
Ltd’.
iv) Find all companies located in every city in which ‘Rural Bank (India)’ is located.
v) Give the managers a 10 percent salary raise, whose salary is greater than 50000 and
for others, give only a 3 percent raise.
vi) Find the company that has the most employees
vii) Find those companies whose employees earn a higher salary, on average, than the
average salary at First Bank Corporation.
viii) Find the company that has the smallest payroll.
ix) Give all managers of First Bank Corporation a 10-percent raise. Marks:2X9
Time: 2-3 min each
2. The following relations keep track of airline flight information:
Flights (flno: integer, from: string, to: string, distance: integer, departs: time, arrives:
time, price: integer)
Aircraft (aid: integer, aname: string, cruising_range: integer)
Certified (eid: integer, aid: integer)
Employees (eid: integer, ename: string, salary: integer)
Note that the Employees relation describes pilots and other kinds of employees as well;
every pilot is certified for some aircraft, and only pilots are certified to fly. Write each of
the following queries in SQL.
a) Find the names of aircraft such that all pilots certified to operate them earn more
than $80,000.
b) For each pilot who is certified for more than three aircraft, find the eid and the maxi -
mum cruising_range of the aircraft for which she or he is certified.
c) Find the names of pilots whose salary is less than the price of the cheapest route
from Los Angeles to Honolulu.
d) For all aircraft with cruising_range over 1000 miles, find the name of the aircraft and
the average salary of all pilots certified for this aircraft.
e) Find the names of pilots certified for some Boeing aircraft.
f) Find the aids of all aircraft that can be used on routes from Los Angeles to Chicago.
g) Identify the routes that can be piloted by every pilot who makes more than
$100,000.
h) Print the enames of pilots who can operate planes with cruising_range greater than
3000 miles but are not certified on any Boeing aircraft.
i) A customer wants to travel from Madison to New York with no more than two changes
of flight. List the choice of departure times from Madison if the customer wants to ar-
rive in New York by 6 p.m.
j) Compute the difference between the average salary of a pilot and the average salary
of all employees (including pilots) Marks:2 X
10 Time: 2-3 min each

3. Consider the following relations and write down expressions for the following queries:
EMP ( eid, ename, age, address, salary )
Works ( eid, did, hours )
Dept ( did, dname, managerid )
i) List the name of employees who work for the ‘Research’ department for 8 hours using
Relational Algebra.
ii) List name and address of all employees with department number 5 using Relational
Calculus
Question Bank_EC705C
Page 28
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

iii) Fine the managerid of managers who manage only departments with budgets greater
than 1 lac using SQL.
iv) Find the employee who has highest salary using SQL.

Module-V: Relational Database Design


1. A relation Empdt is defined with attributes empcode(unique), name, street, city, state
and pincode. For any pincode, there is only one city and state. Also, for any given
street, city and state, there is just one pincode. Find out the functional dependencies
of the above relational schema. Emptdt is in which normal form?
Marks: 3+3 Time: 10 min
2. Consider the following two sets of functional dependencies:
F = {A → C, AC → D,E → AD, E → H} and
G = {A → CD, E → AH}.
Check whether or not they are equivalent. Marks: 4
Time: 10 min
3. For the following relation and functional dependencies: R(A,B,C,D,E) with functional
dependencies
B → A, AC → E, DE → B
a. Decompose the relation, as necessary, into a collection of relations that are in
BCNF. Show all of your work and explain which dependency violations you are cor-
recting by your decompositions.
b. Decompose the relation into a collection that follows 3NF instead. Marks:
3+3 Time: 15 min
4. Given universal schema R(A,B,C,D,E,F,G,H,I) and a set of functional dependencies as
follows:
AB → CD, A → E, B → FH, C → G, D → B, G → C, H → I
a. What is the key for the universal schema R?
b. If the universal schema R is not in 3NF (the third normal form), please make
lossless join
decomposition of schema R that is in 3NF with the property of functional depen-
dency preservation.
c. List all the keys (include candidate keys) in all the schemas (tables) achieved
in b.
d. List all the foreign keys in each schema (table) if any.
e. Is the decomposition you have created BCNF decomposition? (That is, is each
of the schemas (tables) achieved in question b. in BCNF?)
Marks:2+4+2+2+3 Time: 20 min
5. In a scheme with attributes A, B, C, D and E following set of functional dependencies
are given:
F = {A → B, A → C, CD → E, B → D, E → A}
Derive F+. Is BD → CD implied by the above set? Marks: 4
Time: 8 min
6. For relation R= (L, M, N, O, P), the following dependencies hold:
M → O, NO → P, P → L, L → MN
R is decomposed into R1= (L, M, N,P) and R2= (M, O).
a. Is the above decomposition is lossless join decomposition? Explain.
b. Is the above decomposition dependency-preserving? If not, list all the depen-
dencies that are not preserved.
c. What is the highest normal form satisfied by the above decomposition?

Question Bank_EC705C
Page 29
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

Marks:2+2+4 Time:
15 min
7. Let R = (a, b, c, d, e, f) be a relation schema with the following dependences : c → f,
e → a, ec → d, a → b. Find a suitable primary key for R?
Marks: 3 Time: 7 min
8. Consider the relation schema R (A, B, C, D, E, H) with the following functional depen-
dencies: A → B, BC → D, E → C, D → A. What are the candidate keys of R?
Marks: 3 Time: 6 min
9. A relation NADDR is defined as follows.
NADDR = (name, street, city, state, postal_code)
where name is unique, and for any given postal code, there is just one city and
state
a. Give a set of FDs for this relation.
b. What are the candidate keys?
c. Is NADDR in3NF? 2NF? Explain why?
d. If NADDR is not in 3NF, normalize it into 3NF relations. Marks: 3+3+3
Time: 15 min
10. Suppose you are given a relation R with four atomic attributes ABCD. For the set of
functional dependencies F: {AB → C, AB → D, C → A, D → B} that hold on R, do
the following:
(a) Identify the candidate key(s) for R. Show your derivation.
(b) Identify the highest normal form that R satisfies (1NF, 2NF, 3NF, or BCNF).
Explain.
(c) If R is not in BCNF, decompose it into a set of BCNF relations that preserve the
dependencies.
Marks: 3+5+ 3 Time: 20 min
11. Let R ( A B C D E ) be a relation schema and consider the following functional depen-
dencies
F = { AB → E, AD → B,B → C, C→ D }, find out the candidate key.

12. Consider the following relation:


EMP_PROJ = { SSn, Pnumber, Hours, Ename, Pname, Plocation },
Assume { SSn, Pnumber }→ Hours; SSn → Ename; Pnumber →{ Pname, Plocation }.
Normalize the above relation into 2NF.

13. Prove that, if any relation R has only one key, it is in BCNF if and only if it is in 3NF.
Marks: 3 Time: 6 min
14. Define a foreign key. Why is the concept needed? How does it play a role in the join
operation?
Marks:1+2+2 Time: 10
min
Module-VI: Internals of RDBMS
1. Consider the following SOL query for a bank database:
select T.branch_name
from branch T, branch S
where T.assets > S.assets and S.branch_city = “Brooklyn”.
Write an efficient relational-algebra expression that is equivalent to this query. Justify
you answer.

Question Bank_EC705C
Page 30
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

2. Show that the following equivalences hold:


i) E1 θ (E2-E3) = E1 θ E2- E1 θ E3
ii) σθ (E1 E2) = σθ (E1) E2
3. What is the most efficient difference between two-phase locking and the time-
stamping technique concurrency control?
Marks:2; Time: 5 min
4. Consider the following transactions and find how many different schedules of the two
transactions are possible? How many of these are serializable?
Transaction 1 Transaction 2
Read (X) Read (X)
X:=X-N X:=X+M
Write (X) Write (X)
Read (Y) ___
Y:=Y+N ___
Write (Y) ___
Marks:5; Time:10 min

5. Transactions cannot be nested inside one another. Why not? Marks:2


Time: 5 min
6. What is the difference between immediate updation and deffered updation of
database? Write down the utility of check point mechanism in log based recovery.
Marks:2+3 Time: 15 min

7. Systems do not allow a given transaction to commit changes to databases on an


individual basis i.e., without simultaneous committing changes to all other databases.
Why not? Marks: 3 Time: 6 min
8. Explain the distinction between the terms serial schedule and serializable schedule.
9. What is recoverable schedule? Why is recoverability of schedule desirable? Are there
any circumstances under which it would be desirable to allow non-recoverable
schedule? Explain you answer.

10. Show that the two-phase locking protocol ensures conflict serializability and that
transactions can be serialized according to their lock points.
11. When a transaction is rolled back under timestamp ordering, it is assigned a new
timestamp. Why can it not simply keep its old timestamp?

Module-VII: File Organization & Index Structure


1. When is it preferable to use a dense index rather than a sparse index? Explain your
answer.
2. What is the difference between a primary index and a secondary index?
3. Is it possible in general to have two primary indices on the same relation for different
search keys? Explain your answer.
4. Construct a B+-tree for the following set of key values:
(2, 3, 5, 7, 11, 17, 19, 23, 29, 31)
Assume that the tree is initially empty and values are added in ascending order. Con-
struct B+-trees for the case where the number of pointers that will fit in one node is 4.
5. Explain the distinction between closed and open hashing. Discuss the relative merits
of each technique in database applications.
Question Bank_EC705C
Page 31
ACADEMY OF TECHNOLOGY
Question bank
Database management system(Ec705c)

6. A B+ tree index is to be built on the Name attribute of the relation STUDENT. Assume
that all student names are of length 8 bytes, disk blocks are of size 512 bytes, and
index pointer are of 4 bytes. What would be the best choice of the degree of the B+
tree?
7. The order of a leaf node in a B+ tree is the maximum number of (value, pointer) pairs
it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long,
the value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of
the leaf node?
8. A B- tree of order 4 is built from scratch by 10 successive iterations. What is the
maximum number of node splitting operations that may take place?

Question Bank_EC705C
Page 32

Вам также может понравиться