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

112382

The document outlines the curriculum for CS1403 - Database Design and Management, covering topics such as relational databases, data models, SQL fundamentals, and entity-relationship models. It includes definitions, applications, and characteristics of database management systems, along with various SQL commands and operations of relational algebra. Additionally, it provides exercises and examples related to database concepts and queries.

Uploaded by

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

112382

The document outlines the curriculum for CS1403 - Database Design and Management, covering topics such as relational databases, data models, SQL fundamentals, and entity-relationship models. It includes definitions, applications, and characteristics of database management systems, along with various SQL commands and operations of relational algebra. Additionally, it provides exercises and examples related to database concepts and queries.

Uploaded by

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

CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

UNIT I RELATIONAL DATABASES


Purpose of Database System – Views of data – Data Models – Database System Architecture Entity-
Relationship model – E-R Diagrams – Enhanced-ER Model – ER-to-Relational Mapping– Introduction
to relational databases – Relational Model – Keys – Relational Algebra – SQL fundamentals –
Advanced SQL features
UNIT-I / PART-A
1. Define database management system?
Database management system (DBMS) is a collection of interrelated data and a set of programs
to access those data.
2. List any five applications of DBMS.
Banking, Airlines, Universities, Credit card transactions, Tele communication, Finance, Sales,
Manufacturing, Human resources.
3. What is the purpose of Database Management System? (Dec 14)
What are the four main characteristics that differentiate the database approach from the file-
processing approach? (Nov/Dec 2019)
Analyze the purpose of database management system. (Nov 22)
Data redundancy and inconsistency, Difficulty in accessing data, Data isolation, Integrity
problems, Atomicity problems and Concurrent access anomalies
4. Define the terms 1) physical schema 2) logical schema.
Physical schema: The physical schema describes the database design at the physical level,
which is the lowest level of abstraction describing how the data are actually stored.
Logical schema: The logical schema describes the database design at the logical level, which
describes what data are stored in the database and what relationship exists among the data.
5. What is a data model? List the types of data models used? (May 19)
A data model is a collection of conceptual tools for describing data, data relationships, data
semantics and consistency constraints.
 Hierarchical database model.
 Relational model.
 Network model.
 Object-oriented database model.
 Entity-relationship model..
6. List out the operations of the relational algebra
The Six basic operators Select, project, union, set difference, Cartesian product and Rename.
7. Define relational data model
Relational model use a collection of tables to represent both data and the relationships among
those data. Each table has a multiple columns and each column has unique name.
8. List any eight applications. (May 19)
Banking, Airlines, Universities, Credit card transactions, Tele communication, Finance,
Sales, Manufacturing, Human resources.
9. How to add primary key to a table with suitable query?
Alter table <table name> add primary key(column);
10. What are composite attributes?
Composite attributes can be divided in to sub parts. The degree of relationship type is the
number of participating entity types.

St. Joseph’s College of Engineering Page 1 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

11. Explain entity relationship model?(May 16)


The entity relationship model is a collection of basic objects called entities and relationship
among those objects. An entity is a thing or object in the real world that is distinguishable from
other objects.
12. Why does SQL allow duplicate tuples in a table or in a query result? (Dec 15)
If key constraint is not set on a relation every result in a relation will be considered as a tuple
and hence SQL allows duplicate tuples in a table. Distinct keyword is used to avoid duplicate
tuples in the result.
13. Write the characteristics that distinguish the Database approach with the File-based
approach. (May 15,Nov 16, May 22)
What are the disadvantages of file processing system?(May 16)
File-based System.
1. Separation and isolation of data
2. Duplication of data
3. Incompatible file formats
4. Data dependence
Database Approach:
1. Control of data redundancy
2. Data consistency
3. Sharing of data
4. Improved data integrity
5. Improved security
14. Name the categories of SQL command?(May 19)
SQL commands are divided in to the following categories:
1. Data - definition language
2. Data manipulation language
3. Data Query language
4. Data control language
5. Data administration statements
6. Transaction control statements
15. State the three levels of abstraction (Dec 20,May 21)
There are mainly three levels of data abstraction: Internal Level, Conceptual or Logical Level or
External or View level. The internal schema defines the physical storage structure of the
database. The conceptual schema describes the Database structure of the whole database for
the community of users.
16. Express in relational algebra, the division operation( / ) using the project, Cartesian product
and minus operations. Give a example (Dec 19)
Let R(A,B)R(A,B) and S(B)S(B) be two relations. Division should find all values of A in R that
are connected with all values of B (in S). Think AB÷B=A .
R÷S= πA(R) – πA (πA (R) × S − R)
πA(R)×S : this contains all possible AB pairs.
R : this contains the actual AB pairs.
For the values of A that are connected to all values of B, after we do the difference, those will
be gone. In the difference πA(R)×S−R there are only values of A that are NOT connected to all
B.

St. Joseph’s College of Engineering Page 2 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

17. Define: DDL, DML, DCL and TCL. (Dec 14,16,May 15)
DDL COMMANDS:
 Create
 Alter
 Add
 Modify
 Drop
 Rename
 Drop
DML Commands:
 Insert
 Select
 Update
 Delete
DCL commands
 Grant - Provide access privilege to user
 Revoke - Get back access privilege from user
TCL commands
 Commit
 Rollback
Save point

18. Mention the 2 forms of integrity constraints in ER model?


 Key declarations
 Form of a relationship

19. Define the terms Entity set and Relationship set (May 19, May 22)
An entity is represented by a set of attributes. Attributes are descriptive properties possessed by
each member of an entity set. A relationship set is a set of relationships of same type.

20. What are the various types of keys in the database? (Dec 20,May 21)
There are mainly Eight different types of Keys in DBMS and each key has it’s different
functionality:
1. Super Key
2. Primary Key
3. Candidate Key
4. Alternate Key
5. Foreign Key
6. Compound Key
7. Composite Key

21. What are stored and derived attributes?


Stored attributes: The attributes stored in a data base are called stored attributes.
Derived attributes: The attributes that are derived from the stored attributes are called derived
attributes

St. Joseph’s College of Engineering Page 3 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

22. What is a weak entity? Give example. (Dec 16)


It is an entity that cannot be identified uniquely without considering some primary key
attributes of another identifying owner entity. An example is including Dependent information
for employees for insurance purposes.
23. What are attributes? Give examples.
An entity is represented by a set of attributes. Attributes are descriptive properties possessed
by each member of an entity set.
Example: possible attributes of customer entity are customer name, customer id, Customer
Street, customer city.
24. What is the significance of “participation role name” in the description of relationship types?
(Dec 20,May 21)
The function that an entity plays in a relationship is called its role. Roles are normally explicit and
not specified. They are useful when the meaning of a relationship set needs clarification.
For example, the entity sets of a relationship may not be distinct. The relationship works-for might
be ordered pairs of employees (first is manager, second is worker).
In the E-R diagram, this can be shown by labeling the lines connecting entities (rectangles) to
relationships (diamonds).

25. What is E-R diagram? (Dec 20,May 21)


An Entity–relationship model (ER model) describes the structure of a database with the help
of a diagram, which is known as Entity Relationship Diagram (ER Diagram).

UNIT-I / PART-B
1. List out the disadvantages of File system over DB & explain it in detail.
2. List out the operations of the relational algebra and explain with suitable examples.(Dec 16)
3. Sketch the typical component modules of DBMS. Indicate and explain the interactions between
those modules of the system (May 22)
i) With the help of a neat block diagram explain the basic architecture of a database
management system. (Dec 15,20,May 16,21)
ii) What are the advantages of having a centralized control of data? Illustrate your answer with
suitable example. (Dec 15)

St. Joseph’s College of Engineering Page 4 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

4. Briefly explain about views of data.(May 16)


Discuss about (i) Data Models (ii) Mapping cardinalities. (Dec 14)

5. Explain about data definition language and data manipulation language in SQL with
examples.(Dec 14,June 16)
Describe the following with examples
i) 1) DDL. (2) DML.
(ii) Write a note on aggregate functions (May 22)

6. Explain about SQL Fundamentals.(May 16)(or) What are the several parts of SQL query
language ? What are the basic built in types used during SQL create statement? State and given
example for the basic structure of SQL queries. (Dec 20 ,May 21)

7. Describe the six clauses in the syntax of an SQL query, and show what type of constructs can
be specified in each of the six clauses. Which of the six clauses are required and which are
optional? (Dec 15)

8. Explain the three different groups of data models in with suitable examples.(May 19))

9. Describe about static and dynamic SQL in detail. (May 19)

10. Consider the schema given in the above question and write the following queries in SQL
1. Find the names of suppliers who supply some red part
2. Find the sids of suppliers who supply some red part and some green part
3. Find the sids of suppliers who supply every red part
4. Find the pids of parts supplied by atleast two different suppliers (Dec 19)

11. Consider a student registration database comprising of the below given table schema.
Student File
Student Number Student Name Address Telephone
Course File
Course Number Description Hours Professor Number
Professor File
Professor Number Name Office
Registration file
Student Number Course Number Date
Consider a suitable sample of tuples/records for the above mentioned tables and write DML
statements (SQL) to answer for the queries listed below.
1. Which courses does a specific professor teach?
2. What courses does specific professors?
3. Who teaches a specific course and where is his/her office?
4. For a specific student number, in which courses is the student registered and what is
his/her name?
5. Who are the professors for a specific student?
6. Who is the student registered in a specific course? (May 15)

St. Joseph’s College of Engineering Page 5 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

12. Explain ER model by taking Hospital management/Banking System/University Database as


case study(Dec 14)

13. Explain the following terms briefly : attribute, domain, entity relationship, entity set,
relationship set, one-to-many relationship, many-to-many relationship, participation
constraint, overlap constraint, covering constraint, weak entity set, aggregation and role
indicator (Dec 20,May 21)

14. Assume the following table.


Degree(degcode, name, subject)
Candidate(seatno, degcode, semester, month, year, result)
Marks(seatno, degcode, semester, month, year, papcode, marks)
Degcode-degree code, Name-name of the degree (MSc, MCOM)
Subject-subject of the course. E.g. Phy, Papcode- Paper code E.g. A1
Solve the following queries using SQL:
(i) Write a SELECT statement to display all the degree codes which are there
in the candidate table but not present in degree table in the order of
degcode.
(ii) Write a SELECT statement to display the name of all the
candidates who have got less than 40 marks in exactly 2 subjects.
(iii)Write a SELECT statement to display the name, subject and
number of candidates for all degrees in which there are less than 5
candidates.
(iv) Write a SELECT statement to display the names of all the
candidates who have got highest total marks in MSc.,(Maths) (Dec 15)

15. i)Consider the following schema:


Suppliers (sid:integer, sname:string,address : string)
Parts(pid : integer, pname : string, color : string)
Catalog(sid : integer, pid : integer, cost : real)
The key fields are underlined and the domain of each field is listed after the field name.
Therefore sid is the key for Suppliers, pid is the key for Parts and sid and pid together form the
key for catalog. The catalog relation lists the prices charged for parts by suppliers.
Write the following queries in relational algebra:
1. Find the sids of suppliers who supply some red or green part
2. Find the sids of suppliers who supply some red or green part
3. Find the pids of parts supplied by at least two different suppliers
ii) Sketch the typical component modules of DBMS. Indicate and explain the interactions
between those modules of the system.(Dec 19)

16. 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 accidents. Each insurance
policy covers one or more cars, and has one or more premium payments associated with it.
Each payment is for a particular period of time set of customers, and the date when the
payment was received. (Dec 16)

St. Joseph’s College of Engineering Page 6 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

17. A car rental company maintains a database for all vehicles in its current fleet. For all vehicles, it
includes the vehicle identification number, license number, manufacturer, model, date of
purchase, and color. Special data are included for certain types of vehicles.
• Trucks: cargo capacity.
• Sports cars: horsepower, renter age requirement.
• Vans: number of passengers.
Off-road vehicles: ground clearance, drivetrain (four- or two-wheel drive).
Construct an ER model for the car rental company database. (Dec 15, May 22)
18. Consider the following information about a university database:
i. Professors have an SSN, a name, an age, a rank, and a research specialty.
ii. Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending date,
and a budget.
iii. Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or Ph.D.).
iv. Each project is managed by one professor (known as the project’s principal investigator).
v. Each project is worked on by one or more professors (known as the project’s co-
investigators).
vi. Professors can manage and/or work on multiple projects.
vii. Each project is worked on by one or more graduate students (known as the project’s
research assistants).
viii. When graduate students work on a project, a professor must supervise their work on the
project. Graduate students can work on multiple projects, in which case they will have a
(potentially different) supervisor for each one.
ix. Departments have a department number, a department name, and a main office.
x. Departments have a professor (known as the chairman) who runs the department.
xi. Professors work in one or more departments, and for each department that they work in, a
time percentage is associated with their job.
xii. Graduate students have one major department in which they are working on their degree.
xiii. Each graduate student has another, more senior graduate student (known as a student
advisor) who advises him or her on what courses to take.
Design and draw an ER diagram that captures the information about the university.
Use only the basic ER model here, that is, entities, relationships, and attributes.
Be sure to indicate any key and participation constraints (Dec 19)
19. Draw E – R Diagram for the “Restaurant Menu Ordering System”, which will facilitate the
food items ordering and services within a restaurant.
The entire restaurant scenario is detailed as follows.
The Customer is able to view the food items menu, call the waiter, place orders and obtain the
final bill through the computer kept in their table.
The waiters through their wireless tablet PC are able to initialize a table for customers, control
the table functions to assist customers, orders, send orders to food preparation staff (chef) and
finalize the customer’s bill.
The food preparation staffs (Chefs), with their touch-display interface to the system, are able to
view orders sent to the kitchen by waiters.
During preparation, they are able to let the waiter know the status of each item, and can send
notification when items are completed.
The system should have full accountability and logging facilities, and should support
supervisor actions to account for exceptional circumstances, such as a meal being refunded or
walked out on. (May 15)

St. Joseph’s College of Engineering Page 7 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

UNIT II DATABASE DESIGN


Embedded SQL– Dynamic SQL - Functional Dependencies – Non-loss Decomposition – First,
Second, Third Normal Forms, Dependency Preservation – Boyce/Codd Normal Form –
Multivalued Dependencies and Fourth Normal Form – Join Dependencies and Fifth Normal
Form
UNIT-II / PART-A
1. What is embedded SQL? What are its advantages?
The SQL standard defines embedded of SQL in a variety of programming languages such as C,
Java, and Cobol. A language to which SQL queries are embedded is referred to as a host
language, and the SQL structures permitted in the host language comprise embedded SQL.
The basic form of these languages follows that of the System R embedding of SQL into PL/I.
EXEC SQL statement is used to identify embedded SQL request to the preprocessor
EXEC SQL <embedded SQL statement > END_EXEC
2. What is a primary key?
Primary key is a set of one or more attributes that can uniquely identify record from the
relation; it will not accept null values and redundant values. A relation can have only one
primary key.
3. What is a super key and foreign key?
A super key is a set of one or more attributes that collectively allows us to identify uniquely an
entity in the entity set.
A relation schema r1 derived from an ER schema may include among its attributes the primary
key of another relation schema r2.this attribute is called a foreign key from r1 referencing r2.
4. What is the difference between unique and primary key?
Unique and primary key are keys which are used to uniquely identify record from the relation.
But unique key accepts null values; primary key does not accept null values.
5. What does the cardinality ratio specify?
Mapping cardinalities or cardinality ratios express the number of entities to which another
entity can be associated. Mapping cardinalities must be one of the following: One to one, One
to many, Many to one and Many to many.
6. What is normalization?
 Normalization is the process of organizing the data in the database.
 Normalization is used to minimize the redundancy from a relation or set of relations. It
is also used to eliminate undesirable characteristics like Insertion, Update, and Deletion
Anomalies.
 Normalization divides the larger table into smaller and links them using relationships.
 The normal form is used to reduce redundancy from the database table.
7. Why do we need Normalization?
The main reason for normalizing the relations is removing the anomalies. Failure to eliminate
anomalies leads to data redundancy and can cause data integrity and other problems as the
database grows. Normalization consists of a series of guidelines that helps to guide you in
creating a good database structure.
8. What is insertion anomaly?
Insertion Anomaly: Insertion Anomaly refers to when one cannot insert a new tuple into a
relationship due to lack of data.

St. Joseph’s College of Engineering Page 8 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

9. What is deletion anomaly?


Deletion Anomaly: The delete anomaly refers to the situation where the deletion of data
results in the unintended loss of some other important data.
10. What is updation anomaly?
Updatation Anomaly: The update anomaly is when an update of a single data value requires
multiple rows of data to be updated
11. Define Functional dependency. (May 15,21,Dec 20)
What is FD? Examine why certain Functional dependencies are called trivial FD? (May 22)
In a given relation R, X and Y are attributes. Attribute Y is functionally dependent on
attribute X if each value of X determines EXACTLY ONE value of Y, which is represented as
X → Y (X can be composite in nature).
We say here “x determines y” or “y is functionally dependent on x” Empid → Ename
12. Define full functional dependency.
The term full functional dependency (FFD) is used to indicate the minimum set of attributes in
of a functional dependency (FD).
13. Explain about partial functional dependency?
X and Y are attributes. Attribute Y is partially dependent on the attribute X only if it is
dependent on a sub-set of attribute X.
14. What you meant by transitive functional dependency?
Transitive dependency is a functional dependency which holds by virtue of transitivity. A
transitive dependency can occur only in a relation that has three or more attributes. Let A, B,
and C designates three distinct attributes (or distinct collections of attributes) in the relation.
Suppose all three of the following conditions hold:
1.A B
2. It is not the case that BA
3. BC
Then the functional dependency AC (Which follows from 1 and 3 by the axiom of
transitivity) is a transitive dependency.
15. Define multivalue dependency
Multivalued dependency occurs when two attributes in a table are independent of each other
but, both depend on a third attribute.
A multivalued dependency consists of at least two attributes that are dependent on a third
attribute that's why it always requires at least three attributes.
16. What is first normal form?
 A relation will be 1NF if it contains an atomic value.
 It states that an attribute of a table cannot hold multiple values. It must hold only
single-valued attribute.
 First normal form disallows the multi-valued attribute, composite attribute, and their
combinations.
17. What is second normal form?
In the 2NF, relational must be in 1NF.
In the second normal form, all non-key attributes are fully functional dependent on the
primary key
18. What is third normal form?
A relation will be in 3NF if it is in 2NF and not contain any transitive partial dependency.
3NF is used to reduce the data duplication. It is also used to achieve the data integrity.
If there is no transitive dependency for non-prime attributes, then the relation must be in third
normal form.

St. Joseph’s College of Engineering Page 9 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

19. What is BCNF?


BCNF is the advance version of 3NF. It is stricter than 3NF.
A table is in BCNF if every functional dependency X → Y, X is the super key of the table.
For BCNF, the table should be in 3NF, and for every FD, LHS is super key.
20. „Boyce-Codd normal form is found to be stricter than third normal form‟. Justify the statement
 BCNF is a stronger form of normalization than 3NF because it eliminates the second
condition for 3NF, which allowed the right side of the FD to be a prime attribute.
 Thus, every left side of an FD in a table must be a superkey. Every table that is BCNF is also
3NF, 2NF, and 1NF, by the previous definitions.
21. What is fourth normal form?
A relation will be in 4NF if it is in Boyce Codd normal form and has no multi-valued dependency.
For a dependency A → B, if for a single value of A, multiple values of B exists, then the relation will
be a multi-valued dependency
22. What is fifth normal form?
 A relation is in 5NF if it is in 4NF and not contains any join dependency and joining should
be lossless.
 5NF is satisfied when all the tables are broken into as many tables as possible in order to
avoid redundancy.
 5NF is also known as Project-join normal form (PJ/NF).
23. What is meant by domain key normal form?
Domain/key normal form (DKNF) is a normal form used in database normalization which
requires that the database contains no constraints other than domain constraints and key
constraints.
24. Give the properties of decomposition. (May 19)
The properties of Decomposition are Lossless Decomposition, Dependency Preservation, Lack of
Data Redundancy
25. What is Lossless Decomposition?
o If the information is not lost from the relation that is decomposed, then the decomposition
will be lossless.
o The lossless decomposition guarantees that the join of relations will result in the same
relation as it was decomposed.
o The relation is said to be lossless decomposition if natural joins of all the decomposition
give the original relation.
26. What is Dependency Preserving?
o It is an important constraint of the database.
o In the dependency preservation, at least one decomposed table must satisfy every
dependency.
o If a relation R is decomposed into relation R1 and R2, then the dependencies of R either
must be a part of R1 or R2 or must be derivable from the combination of functional
dependencies of R1 and R2.
UNIT-II / PART-B
1. Briefly discuss about the functional dependency concepts (May 19)
2. State the need for Normalization of a Database and Explain the various Normal Forms (1st, 2nd,
3rd, BCNF, 4th, 5th and Domain- Key) with suitable examples. (May 15, 19,Dec 14,16)
3. i) Discuss in detail the steps involved in the ER – to Relational mapping in the process of
relational database design
ii) Exemplify the multi-value dependency and the fourth normal form-4NF (Dec 19)
4. i) For the following relation R and set of functional dependencies F : R(A,B,C,D,E), F = {AC ->
E, B->D, E-> A) } List all candidate keys

St. Joseph’s College of Engineering Page 10 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

5. i) Explain with suitable example, the constraints of specialization and generalization in ER


data modelling
ii) Exemplify the join dependency and the fifth normal form-5NF (Dec 19)
6.

(May 19)
7. Consider the following relations :
Sailors (sid:integer, sname:string, rating:integer, age:real)
Boats (bid:integer, bname:string, color:string)
Reserves(sid:integer, bid:integer, day:date) (Dec 20,May 21)
Write the SQL statement for the following queries :
i. Find all sailors with a rating above 7.
ii. Find the sids of sailors who have reserved a red boat.
iii. Find the colors of boats reserved by lubber.
iv. Find the names of sailors who have reserved at least one boat.
8. Write short notes on following
i. Loss less decomposition
ii. Dependency Preserving
9. Explain the following
i) Multivalue dependency
ii) Join dependency
10. With relevant example discuss the various operations in relational algebra

UNIT III TRANSACTIONS


Transaction Concepts – ACID Properties – Schedules – Serializability – Concurrency Control –
Need for Concurrency – Locking Protocols – Two Phase Locking – Deadlock – Transaction
Recovery – Save Points – Isolation Levels – SQL Facilities for Concurrency and Recovery.
UNIT-III/ PART-A
1. Give the reasons for allowing concurrency?
The reasons for allowing concurrency is if the transactions run serially, a short transaction may
have to wait for a preceding long transaction to complete, which can lead to unpredictable
delays in running a transaction. So concurrent execution reduces the unpredictable delays in
running transactions.
2. What are the two types of serializability?
The two types of serializability is Conflict serializability, View serializability.

St. Joseph’s College of Engineering Page 11 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

3. What is average response time?


The average response time is that the average time for a transaction to be completed after it has
been submitted.
4. Differentiate strict two phase locking protocol and rigorous two phase locking
protocol.(May 16)
 In strict two phases locking protocol all exclusive mode locks taken by a transaction is held
until that transaction commits.
 Rigorous two phase locking protocol requires that all locks be held until the Transaction
commits.
5. How the time stamps are implemented?
 Use the value of the system clock as the time stamp. That is a transaction’s time stamp is
equal to the value of the clock when the transaction enters the system.
 Use a logical counter that is incremented after a new timestamp has been assigned; that is
the time stamp is equal to the value of the counter.
6. Define blocks?
The database system resides permanently on nonvolatile storage, and is partitioned into fixed-
length storage units called blocks.
7. What are the different modes of lock?
The modes of lock are:
 Shared
 Exclusive
8. What are the time stamps associated with each data item?
 W-timestamp (Q) denotes the largest time stamp if any transaction that executed WRITE
(Q) successfully.
 R-timestamp (Q) denotes the largest time stamp if any transaction that executed READ (Q)
successfully.
9. Define deadlock?
Neither of the transaction can ever proceed with its normal execution. This situation is called
deadlock
10. Define the phases of two phase locking protocol
Growing phase: a transaction may obtain locks but not release any lock.
Shrinking phase: a transaction may release locks but may not obtain any new locks.
11. Define upgrade and downgrade?
It provides a mechanism for conversion from shared lock to exclusive lock is known as
upgrade.
It provides a mechanism for conversion from exclusive lock to shared lock is known as
downgrade.
12. What is a database graph?
The partial ordering implies that the set D may now be viewed as a directed acyclic graph,
called a database graph.
13. What are uncommitted modifications?
The immediate-modification technique allows database modifications to be output to the
database while the transaction is still in the active state. Data modifications written by active
transactions are called uncommitted modifications.

St. Joseph’s College of Engineering Page 12 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

14. What is meant by buffer blocks?


The blocks residing temporarily in main memory are referred to as buffer blocks.
15. Define shadow paging.
An alternative to log-based crash recovery technique is shadow paging. This technique needs
fewer disk accesses than do the log-based methods.
16. Define page.
The database is partitioned into some number of fixed-length blocks, which are referred to as
pages.
17. Explain current page table and shadow page table.
The key idea behind the shadow paging technique is to maintain two page tables during the
life of the transaction: the current page table and the shadow page table. Both the page tables
are identical when the transaction starts. The current page table may be changed when a
transaction performs a write operation.
18. What is transaction?
Collections of operations that form a single logical unit of work are called transactions.
19. What are the drawbacks of shadow-paging technique?
 Commit Overhead
 Data fragmentation
 Garbage collection
20. What is meant by garbage collection.(May 16)
Garbage may be created also as a side effect of crashes. Periodically, it is necessary to find all
the garbage pages and to add them to the list of free pages. This process is called garbage
collection.
21. What is serializability? How it is tested? (Dec 14,16)
A (possibly concurrent) schedule is serializable if it is equivalent to a serial schedule.
Precedence graph is used to test the serializability
22. Mention the approaches of deadlock recovery
The common solution is to roll back one or more transactions to break the deadlock
 Selection of victim
 Rollback
 Partial
 Total and Starvation.
23. Write the ACID properties of Transaction. (Dec 14,20,May 15,16,21,22)
Atomicity − This property states that a transaction must be treated as an atomic unit, that is,
either all of its operations are executed or none.
Consistency − The database must remain in a consistent state after any transaction.
Durability − The database should be durable enough to hold all its latest updates even if the
system fails or restarts.
Isolation − In a database system where more than one transaction are being executed
simultaneously and in parallel, the property of isolation states that all the transactions will be
carried out and executed as if it is the only transaction in the system.
24. What is recovery management component?
Ensuring durability is the responsibility of a software component of the base system called the
recovery management component.

St. Joseph’s College of Engineering Page 13 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

25. When is a transaction rolled back?


Any changes that the aborted transaction made to the database must be undone. Once the
changes caused by an aborted transaction have been undone, then the transaction has been
rolled back.
26. Give an example of two phase commit protocol. (Dec 15)
Client want all or nothing transactions and Transfer either happens or nothing at all.
27. What are the states of transaction (May 19)
The states of transaction are Active, Partially committed, Failed, Aborted, Committed,
Terminated
28. What is a shadow copy scheme?
It is simple, but efficient, scheme called the shadow copy schemes. It is based on making copies
of the database called shadow copies that one transaction is active at a time. The scheme also
assumes that the database is simply a file on disk.
29. What are the states of transaction?
The states of transaction are
 Active
 Partially committed
 Failed
 Aborted
 Committed
 Terminated

30. What is meant by concurrency control? (Dec 15)


A transaction is a particular execution of the program. When multiple transactions are trying
to access the same shareable resource, many problems arise if the access control is not done
properly. Mechanisms to which access control can be maintained is called Concurrency
control.

31. List the four conditions for deadlock. (Dec 16)


• mutual exclusion
• hold and wait or partial allocation
• no pre-emption
• resource waiting or circular wait

32. What is isolation in database?


Transaction isolation is an important part of any transactional system. It deals with consistency
and completeness of data retrieved by queries unaffecting a user data by other user actions.
A database acquires locks on data to maintain a high level of isolation.

33. What is meant by log based recovery?


The log is a sequence of log records, recording all the update activities in the database. In a
stable storage, logs for each transaction are maintained. Any operation which is performed
on the database is recorded is on the log. Prior to performing any modification to database,
an update log record is created to reflect that modification.

St. Joseph’s College of Engineering Page 14 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

34. Brief any two violations that may occur if a transaction executes a lower isolation level
than serializable. (Dec 19, May 22)
If a transaction executes a lower isolation level than serializable, occurring violations are
 Lost-update anomaly ,Dirty-Write anomaly
 Dirty-Read anomaly, Non-Repeatable read anomaly
 Phantom Read anomaly, Write skew anomaly
35. What benefit does strict two-phase locking provide? What are the disadvantages of it? (Dec
20 ,May 21)
A transaction is said to follow Two Phase Locking protocol if Locking and Unlocking can be
done in two phases.
 Growing Phase: New locks on data items may be acquired but none can be released.
 Shrinking Phase: Existing locks may be released but no new locks can be acquired.
Disadvantages
The greatest disadvantage of the two-phase commit protocol is that it is a blocking protocol. If
the coordinator fails permanently, some participants will never resolve their transactions: After
a participant has sent an agreement message to the coordinator, it will block until a commit or
rollback is received.
36. What are different isolation levels in database?
 Serializable.
 Repeatable reads.
 Read committed.
 Read uncommitted.
 Dirty reads.
 Non-repeatable reads.
 Phantom reads.
37. List the responsibilities of a DBMS has whenever a transaction is submitted to the
system for execution? (Dec 19)
Whenever a transaction is submitted to a DBMS for execution, the system is responsible for
making sure that either:
1.All the operations in the transaction are completed successfully and the effect is recorded
permanently in the database; or
2. The transaction has no effect whatsoever on the database or on any other transactions.
The DBMS must not permit some operations of a transaction T to be applied to the
database while other operations of T are not. This may happen if a transaction fails after
executing some of its operations but before executing all of them.
UNIT-III / PART-B
1. Discuss view serializability and conflict serializability (Dec 15)
2. Write short notes on Transaction State and discuss the properties of transaction.
3. Briefly describe two phase locking in concurrency control techniques. (Dec 14,16)
4. Explain the concepts of concurrent execution in Transaction processing system. (Dec 14)
5. Explain Transaction concept with an example. (Dec 14)
What is a transaction? With a neat sketch describe the states of a transaction (May 22)
6. Explain about dead lock recovery algorithm with an example.
7. Explain the concurrency problem with example

St. Joseph’s College of Engineering Page 15 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

8. What are the two approaches of deadlock prevention? Explain in detail with suitable
example. (Dec 20,May 21)
Define deadlock. Examine deadlock prevention and detection (May 22)
9. What is concurrency control? How is it implemented in DBMS? Illustrate with a suitable
example. (Dec 14)
10. Briefly explain about Two phase commit and three phase commit protocols. (Apr/May 15) (May/June 16)
(Dec 14)
11. What is deadlock? How does it occur? How transactions be written to (i) Avoid deadlock (ii)
guarantee correct execution. Illustrate with suitable example. (Dec 14,15,16)
12. Explain about Locking Protocols. (May 16)
13. State and explain the transaction isolation level. (Dec 20,May 21)
14. Discuss in detail about the testing of serializability. (May 19)
15. Explain deferred and immediate modification versions of log-based recovery Scheme (May
19)
16. Discuss in detail about the ACID properties of transaction (May 19)
17. What is concurrency control? How it is implemented in DBMS? Briefly elaborate with
diagrams and examples. (May 19)
18. Consider the following extension to the tree-locking protocol, which allows both shared and
exclusive locks:
• A transaction can be either a read-only transaction, in which case it can request only shared
locks, or an update transaction, in which case it can request only exclusive locks.
• Each transaction must follow the rules of the tree protocol. Read-only transactions may lock
any data item first, whereas update transactions must lock the root first. Show that the protocol
ensures serializability and deadlock freedom. (Dec 16)
19. Consider the following schedules. The actions are listed in the order they are schedule, and
prefixed with transaction name.
S1: T1: R(X), T2: R(x), T1: W(Y), T2: W(Y), T1: R(Y), T2: R(Y)
S2:T3: R(X), T1: R(X), T1: W(Y), T2: R (Z), T2: W (Z), T3: R (Z)
For each of the schedules, answer the following questions:
i. What is the precedence graph for the schedule?
ii. Is the schedule conflict-serializable? If so, what are all the conflict equivalent serial
schedules?
iii. Is the schedule view-serializable? If so, what are all the view equivalent serial
schedules? (May 15)
20. Discuss elaborately the two-phase locking protocol that ensures serializability.
ii) Brief the states of a transaction with a neat diagram (Dec 19)
21. What can you say about
(i) serial, non-serial schedules
(ii) conflict-serializable and view serializable (May 22)
22. Explain the concurrency problem with example. (May 22)
23. i) Narrate the actions that are considered for deadlock detection and the recovery from
deadlock
ii) Discuss the properties of a transaction that ensure integrity of data in the database system.
(Dec 19)

St. Joseph’s College of Engineering Page 16 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

24. Consider the following two transactions:


T1: read(A);
read(B);
if A = 0then B := B + 1;
write(B).
T2: read(B);
read(A);
if B = 0then A := A + 1;
write(A).
Add lock and unlock instructions to transactions T31 and T32, so that they observe the two-
phase locking protocol. Can the execution of these transactions result in a deadlock? (Dec 16)
UNIT IV IMPLEMENTATION TECHNIQUES
RAID – File Organization – Organization of Records in Files – Indexing and Hashing –Ordered
Indices – B+ tree Index Files – B tree Index Files – Static Hashing – Dynamic Hashing – Query
Processing Overview – Algorithms for SELECT and JOIN operations – Query optimization using
Heuristics and Cost Estimation.
UNIT-IV / PART-A
1. What is B-Tree?
 A B-tree eliminates the redundant storage of search-key values.
 It allows search key values to appear only once.
2. What is a B+-Tree index?
A B+-Tree index takes the form of a balanced tree in which every path from the root of the root
of the root of the tree to a leaf of the tree is of the same length.
3. What is a hash index?
A hash index organizes the search keys, with their associated pointers, into a hash file
structure
4. Define seek time.
The time for repositioning the arm is called the seek time and it increases with the distance that
the arm is called the seek time.
5. Define rotational latency time.
The time spent waiting for the sector to be accessed to appear under the head is called the
rotational latency time.
6. What is called mirroring?
The simplest approach to introducing redundancy is to duplicate every disk. This technique is
called mirroring or shadowing.
7. What are the two main goals of parallelism?
 Load –balance multiple small accesses, so that the throughput of such accesses
increases.
 Parallelize large accesses so that the response time of large accesses is reduced.
8. What is an index?
An index is a structure that helps to locate desired records of a relation quickly, without
examining all records

St. Joseph’s College of Engineering Page 17 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

9. Define Dense Index (May 19,22)


In dense index, there is an index record for every search key value in the database. This makes
searching faster but requires more space to store index records itself.
10. What are the factors to be taken into account when choosing a RAID level?
 Monetary cost of extra disk storage requirements.
 Performance requirements in terms of number of I/O operations
 Performance when a disk has failed and Performances during rebuild.
11. What are the types of storage devices?
Primary storage, Secondary storage, Tertiary storage, Volatile storage, Nonvolatile storage
12. What is called remapping of bad sectors?
If the controller detects that a sector is damaged when the disk is initially formatted, or when
an attempt is made to write the sector, it can logically map the sector to a different physical
location.
13. Define software and hardware RAID systems? (May 16)
RAID can be implemented with no change at the hardware level, using only software
modification. Such RAID implementations are called software RAID systems and the systems
with special hardware support are called hardware RAID systems.
14. Define hot swapping?
Hot swapping permits the removal of faulty disks and replaces it by new ones without turning
power off. Hot swapping reduces the mean time to repair.
15. What is called query processing?
Query processing refers to the range of activities involved in extracting data from a database.
16. What are the ways in which the variable-length records arise in database systems?
Storage of multiple record types in a file, Record types that allow variable lengths for one or
more fields, Record types that allow repeating fields.
17. What are the two types of blocks in the fixed –length representation? Define them.
 Anchor block: Contains the first record of a chain.
 Overflow block: Contains the records other than those that are the first record of a chain.
18. What is hashing file organization?
In the hashing file organization, a hash function is computed on some attribute of each record.
The result of the hash function specifies in which block of the file the record should be placed.
19. Give an example of a join that is not a simple equi-join for which partitioned parallelism
can be used. (Dec 15)

20. What is called a query evaluation plan?


A sequence of primitive operations that can be used to evaluate be query is a query evaluation
plan or a query execution plan.
21. Differentiate static and dynamic hashing. (May 15,Dec 14,15)
Static Hashing Dynamic Hashing
In static hashing, when a search-key value is Hash function, in dynamic hashing, is made to
provided, the hash function always computes produce a large number of values and only a
the same address. few are used initially.

St. Joseph’s College of Engineering Page 18 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

The number of buckets provided remains Dynamic hashing provides a mechanism in


unchanged at all times i.e. fixed which data buckets are added and removed
dynamically and on-demand .i.e. no. of
buckets not fixed.
Space and overhead is more Minimum space and less overhead
As file grows performance decreases Performance do not degrade as file grows
22. List out the mechanisms to avoid collision during hashing. (Dec 16)
 In overflow chaining, the overflow buckets of a given bucket are chained together in a
linked list.
 Above scheme is called closed hashing. An alternative, called open hashing, which does not
use overflow buckets, is not suitable for database applications.
23. What are the disadvantages of B-Tree over B+ Tree? (Dec 16)
 Only small fraction of all search-key values are found early
 Non-leaf nodes are larger. Thus, B-Trees typically have greater depth than corresponding
B+-Tree
 Insertion and deletion more complicated than in B+-Trees
 Implementation is harder than B+-Trees.
 Not possible to sequentially scan a table by just looking at leaves.
24. Explain “Query optimization”? (May 16)
Query optimization refers to the process of finding the lowest cost method of evaluating a
given query.
25. State the need for Query Optimization. (May 15)
The query optimizer attempts to determine the most efficient way to execute a given query by
considering the possible query plans.
26. Mention all operations of files. (May 19)
File Organization. File Organization defines how file records are mapped onto disk blocks.
Heap File Organization, Sequential File Organization
Hash File Organization, Clustered File Organization.
27. How do you represent leaf node of a B+ tree of order p? (Dec 19)
In B+-tree leaf node contains keys and record pointer associated with it and a block pointer
pointing to next leaf node. Non-leaf nodes contain only keys and child pointer, there is no need
to store record pointer at non-leaf node, because all keys are ultimately present on leaf node.
For leaf node order will be maximum number of keys, record pointer pair a node can hold, but
order of non leaf node is determined by maximum child pointers it can have.
.•For leaf node equation will be: n* k(key size)+ n* r(record pointer size) + b = block size
•For non-leaf node equation will be: (n-1) k(key size)+ n b(block pointer size) = block size
28. Which cost components contribute to query execution? (Dec 19)
Cost components contribute to query execution are
 Access cost to secondary storage.
 Disk storage cost
 Computation cost
 Memory usage cost.
 Communication cost

St. Joseph’s College of Engineering Page 19 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

29. State the storage device hierarchy. (Dec 20,May 21)

30. What are the factors needed to evaluate the technique of ordered indexing and hashing?
(Dec 20,May 21)
Indexing techniques are evaluated on the basis of
 Access types
 Access time
 Insertion time
 Deletion time
 Space overhead
Hashing performance: can be evaluated under the assumption that each key is equally likely
and uniformly hashed to any slot of hash table.
31. A B+ tree with the following specifications, block size 1 KB, block, key and data record pointer of 6
bytes, 9 bytes and 7 bytes long respectively. Compute order of the leaf node? (May 22)
Disk Block size = 1024 bytes
Data Record Pointer size, r = 7 bytes
Key size,k = 9 bytes
Disk Block ptr, b = 6 bytes
n* k(key size)+ n* r(record pointer size) + b = block size
9n+7n+6=1024
16n=1024-6
16n=1018
N=63
UNIT-IV / PART-B
1. Describe File Organization.
2. Define RAID and Explain in detail about RAID technology with suitable diagrams. (Dec 14, 15,
16,May 15,16 19,22)
3. Explain Secondary storage devices.
4. Explain about static and dynamic hashing with an example. (Dec 20,May 21)
5. What is the need for parallel database? Specify the two performance metrics for parallel
database. Discuss in brief about various architecture models for parallel database. (May 22)
6. Explain about ordered indices with an example
7. Explain about B+ trees indexing concepts with an example (Dec 14,May 16)
8. Explain about B trees indexing concepts with an example (Dec 14)
9. Illustrate indexing and hashing techniques with suitable examples. (Dec 15)
10. Explain about Query optimization with neat Diagram. (Dec 14,16)

St. Joseph’s College of Engineering Page 20 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

11. Describe the structure of B+ tree and give the algorithm for search in the B+ tree with example.
(May 19).
12. Give a detailed description about Query processing and Optimization. Explain the cost
estimation of Query Optimization (Dec 14).
13. Discuss about join order optimization and heuristic optimization algorithm. (May 15)
14. Briefly explain about Query Processing (May 16)
Sketch and concise the basic steps in query processing (May 22)
15. i) Explain the various levels of RAID systems
ii) Why data dictionary storage is important (Dec 19)
16. i) With simple algorithms explain the computing of nested loop join and block nested loop join
ii) Sketch and concise the basic steps in query processing. (Dec 19)
17. Describe the procedure for index update for single level indices with example. (Dec 20,May 21)
18. 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. construct B+ trees for
the cases where the number of pointers that will fit in one node is as follows : a) Four b) six c)
Eight (Dec 20,May 21)
UNIT V ADVANCED TOPICS
Distributed Databases: Architecture, Data Storage, Data Fragmentation - Replication and
Allocation Techniques for Distributed Database Design. Distributed Databases: Architecture,
Data Storage, Transaction Processing – Object-based Databases: Object Database Concepts,
Object-Relational features, ODMG Object Model, ODL, OQL - XML Databases: XML Hierarchical
Model, DTD, XML Schema, XQuery.
UNIT-V / PART-A
1. What is homogeneous distributed database and heterogeneous distributed database
Compare Homogeneous and Heterogeneous Distributed database (May 22)
A homogeneous distributed database has identical software and hardware running all
databases instances, and may appear through a single interface as if it were a single database.
A heterogeneous distributed database may have different hardware, operating systems,
database management systems, and even data models for different databases.
2. Define Distributed Database Systems. (Dec 16)
Database spread over multiple machines (also referred to as sites or nodes). Network
interconnects the machines. Database shared by users on multiple machines is called
Distributed Database Systems
3. What are the types of Distributed Database?
 Homogenous distributed DB
 Heterogeneous distributed DB
4. Define fragmentation in Distributed Database
The system partitions the relation into several fragment and stores each fragment at different
sites
Two approaches:
 Horizontal fragmentation
 Vertical fragmentation

St. Joseph’s College of Engineering Page 21 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

5. Define Database replication.


Database replication can be used on many database management systems, usually with a
master/slave relationship between the original and the copies. The master logs the updates,
which then ripple through to the slaves. The slave outputs a message stating that it has
received the update successfully, thus allowing the sending of subsequent updates.
6. What is the advantage of OODB?
An integrated repository of information that is shared by multiple users, multiple products,
multiple applications on multiple platforms.
7. What is Object database System?
An object database is a database management system in which information is represented in
the form of objects as used in object-oriented programming. Object-relational databases are a
hybrid of both approaches.
8. Mention two features of Multimedia databases (May 19)
The features are Integration. Data items do not need to be duplicated for different programs
invocations, Data independence, Concurrency control, Persistence, Privacy ,Integrity control,
Recovery, Query support
9. How do you define types in object relational feature in oracle?
Oracle allows us to define types similar to the types of SQL. The syntax is
CREATE TYPE t AS OBJECT ( list of attributes and methods );
10. Define ODL.
ODL language is used to create object specifications:
 classes and interfaces
- Using the specific language bindings to specify how ODL
 constructs can be mapped to constructs in specific programming
 language, such as C++, SMALLTALK, and JAVA.
11. Compare sequential access devices versus random access devices with example (May 19)
Sequential Access to a data file means that the computer system reads or writes
information to the file sequentially, starting from the beginning of the file and proceeding
step by step.
Random Access to a file means that the computer system can read or write information
anywhere in the data file. This type of operation is also called “Direct Access” because the
computer system knows where the data is stored (using Indexing) and hence goes
“directly” and reads the data.
12. Define ODMG Object model?
The ODMG object model is the data model upon which the object definition langauge (ODL)
and object query language (OQL) are based.
13. Define Information Retrieval.
It is an activity of obtaining information resources relevant to an information need from a
collection of information resources.
14. Define Relevance Ranking. (Dec 14)
A system in which the search engine tries to determine the theme of a site that a link is coming
from.

St. Joseph’s College of Engineering Page 22 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

15. What are the advantages of OODB?


An integrated repository of information that is shared by multiple users, multiple products,
multiple applications on multiple platforms.
It also solves the following problems:
1. The semantic gap: The real world and the Conceptual model is very similar.
2. Impedance mismatch: Programming languages and database systems must be interfaced to
solve application problems. But the language style, data structures, of a programming
language (such as C) and the DBMS (such as Oracle) are different. The OODB supports general
purpose programming in the OODB framework.
3. New application requirements: Especially in OA, CAD, CAM, CASE, object-orientation is
the most natural and most convenient.
16. Define Crawling and indexing the web. (Dec 14)
Web Crawling is the process of search engines combing through web pages in order to
properly index them. These “web crawlers” systematically crawl pages and look at the
keywords contained on the page, the kind of content, all the links on the page, and then
returns that information to the search engine’s server for indexing. Then they follow all the
hyperlinks on the website to get to other websites. When a search engine user enters a query,
the search engine will go to its index and return the most relevant search results based on the
keywords in the search term. Web crawling is an automated process and provides quick, up to
date data.
17. Can we have more than one constructor in a class? If yes, explain the need for such a
situation. (Dec 15)
Yes, default constructor and constructor with parameter
18. Define XML Database.
An XML database is a data persistence software system that allows data to be stored in XML
format. These data can then be queried, exported and serialized into the desired format. XML
databases are usually associated with document-oriented databases.
19. How does the concept of an object in the object-oriented model differ from the concept of
an entity in the entity-relationship model? (Dec 16)
An entity is simply a collection of variables or data items. An object is an encapsulation of data
as well as the methods (code) to operate on the data. The data members of an object are
directly visible only to its methods. The outside world can gain access to the object’s data only
by passing pre-defined messages to it and these messages are implemented by the methods.
20. What is Xpath and Xquery?
XPath can be used to navigate through elements and attributes in an XML document. XPath is
a syntax for defining parts of an XML document. XPath uses path expressions to navigate in
XML documents. XPath contains a library of standard functions. XPath is a major element in
XSLT and in XQuery.
21. Is XML Hierarchical?
XML documents have a hierarchical structure and can conceptually be interpreted as a tree
structure, called an XML tree. XML documents must contain a root element (one that is the
parent of all other elements). All elements in an XML document can contain sub elements, text
and attributes.

St. Joseph’s College of Engineering Page 23 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

22. Define OQL with syntax.


 Entry point to the database: needed for each query which can
 be any named persistent object:
 the name of the extent of a class
class Person
( extent persons
key ssn)
{ ... ... }
class Faculty extends Person ENTRY POINTS
( extent faculy )
{ ... ... }
class Department
( extent departmet key dname){ ... ... }
23. How does the concept of an object in the object-oriented model differ from the concept of
an entity in the entity-relationship model? (Dec 16)
An entity is simply a collection of variables or data items. An object is an encapsulation of data
as well as the methods (code) to operate on the data. The data members of an object are
directly visible only to its methods. The outside world can gain access to the object’s data only
by passing pre-defined messages to it and these messages are implemented by the methods.
24. What is DTD?
A document type definition (DTD) contains a set of rules that can be used to validate an XML
file. After you have created a DTD, you can edit it manually, adding declarations that define
elements, attributes, entities, and notations, and how they can be used for any XML files that
reference the DTD file.
25. What is the use of XML Schema?
XML Schema is commonly known as XML Schema Definition (XSD). It is used to describe
and validate the structure and the content of XML data. XML schema defines the elements,
attributes and data types. Schema element supports Namespaces.
26. Define Keyword Queries.
Keyword-based queries are the simplest and most commonly used forms of IR queries: the
user just enters keyword combinations to retrieve documents.
27. What are the Types of Queries in IR Systems
 Keyword Queries. Boolean Queries
 Phrase Queries
 Proximity Queries
 Wildcard Queries
 Natural Language Queries.
28. List information types of documents necessary for relevance ranking of documents in IR
(Dec 19)
Types of documents necessary for relevance ranking of documents in IR are precision, recall,
and f-score. They are computed using unordered sets of documents

St. Joseph’s College of Engineering Page 24 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

29. State the steps to create DTD.


Create a new DTD, complete the following steps:
1. Create a project to contain the DTD if needed.
2. In the workbench, click File > New > Other and select XML > DTD. Click Next.
3. Select the project or folder that will contain the DTD.
4. In the File name field, type the name of the DTD, for example MyDTD.dtd. The name of
your DTD file must end with the extension .dtd
5. Click Next.
6. Optional: You can use a DTD template as the basis for your new DTD file. To do so,
click the Use DTD Template check box, and select the template you want to use.
7. Click Finish.
30. What one could understand from allocation schema? (Dec 19)
In distributed database it may be useful to present one possible reference architecture that
addresses data distribution. The reference architecture shown in figure consists of the
following schemas:
• A set of global external schemas;
• A global conceptual schema;
• A fragmentation schemas and allocation schema;
The allocation schema is a description of where the data is to be located, taking account' of any
replication
31. What is the difference between a false positive and false drop? (Dec 20,May 21)
False positive
A true false result means that no genetic material from the disease (for example flu) was
detected.
False drop
A false drop / negative means that the test shows a negative result, but it should have been a
positive (+) result. This means that a person is actually having a disease or is infected but due
to error in the testing or diagnosis, he may be informed that he is not infected.
32. Give the DTD for an XML representation of the following nested-relational schema.
Emp = (ename, ChildrenSet setof (Children),
SkillsSet setof(Skills))
Children = (name, Birthday)
Birthday = (day, month, year)
Skills = (type, ExamsSet setof (Exams))
Exams = (year, city) (Nov/Dec 20 / Apr/May 21)
<! DOCTYPE Emp [
<!ELEMENT Emp(ename,children*,skills*)>
<!ELEMENT children(name,birthday)>
<!ELEMENT birthday(day, month,year)>
<!ELEMENT skills(type,exams+)>
<!ELEMENT exams(year,city)>
<!ELEMENT ename(#PCDATA)>
<!ELEMENT name(#PCDATA)>
<!ELEMENT day(#PCDATA)>
<!ELEMENT month(#PCDATA)>
<!ELEMENTS year(#PCDATA)>
<!ELEMENTS type(#PCDATA)>
<!ELEMENTS city(#PCDATA)> ]>

33. Define Spatial databases. List its types. (Nov 22)


A spatial database is a database that is optimized to store and query data related to
objects in space, including points, lines and polygons.
Vector data: This data is represented as discrete points, lines and polygons
Rastor data: This data is represented as a matrix of square cells

St. Joseph’s College of Engineering Page 25 of 26


CS1403 - Database Design and Management Department of CSE, IT, ADS & AML 2022-2023

UNIT-V / PART-B
1. Explain about Object Oriented Databases and XML Databases.
Discuss the concept of XML database (May 22)
2. Write short notes on Distributed Transactions. (Dec 14)
Distributed Transactions system structure (May 22)
3. Explain in detail the Client - Server Architecture for DDBMS
4. Suppose an Object-Oriented database had an object A, which references object B, which in turn
references object C. Assume all objects are on disk initially? Suppose a program first
dereferences A, then dereferences B by following the reference from A, and then finally
dereferences C. Show the objects that are represented in memory after each dereference, along
with their state. (Dec 15)
5. Suppose that you have been hired as a consultant to choose a database system for your client’s
application. For each of the following applications, state what type of database system
(relational, persistent programming language–based OODB, object relational; do not specify a
commercial product) you would recommend. Justify your recommendation.
(i)A computer-aided design system for a manufacturer of airplanes.
(ii)A system to track contributions made to candidates for public office.
(iii)An information system to support the making of movies. (Dec 16)
6. Give the DTD for an XML representation of the following nested-relational schema
Emp = (ename, ChildrenSet setof(Children), SkillsSet setof(Skills))
Children = (name, Birthday)
Birthday = (day, month, year)
Skills = (type, ExamsSet setof(Exams)).
Exams = (year, city) (Dec 16)
7. Explain XML Schema with an example.
8. Explain various queries in IR Systems with an example.
9. Explain ODL and OQL with an example.
10. Explain ODMG – Object Model in detail.
11. Discuss in detail about Distributed Databases (May 19)
12. Explain in detail about Deductive DB and Spatial DB (May 19)
13. i) Illustrate the usage of OQL, the DMG’s query language
ii) Brief on the methods to store XML documents (Dec 19)
14. i) Illustrate the approaches to store relations in distributed database
ii) How effectiveness of retrieval is measured? Discuss (Dec 19)
15. What are the reasons for building distributed database? Discuss the relative advantages of
centralized and distributed databases. Explain the difference between fragmentation,
replication and location transparency. (Dec 20,May 21)
16. State and explain the persistent programming languages. (Dec 20,May 21)
17. Write short notes on spatial and mobile databases (May 22)

St. Joseph’s College of Engineering Page 26 of 26

You might also like