Dbms QB
Dbms QB
UNIT: 1
1. Define database management system?
Database management system (DBMS) is a collection of interrelated data and a set of programs
to access those data.
1
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
A data model is a collection of conceptual tools for describing data, data relationships, data
semantics and consistency constraints.
2
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
Multivalued attributes: Attributes with a set of value for a particular entity are called multivalued
attributes.
3
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
ii) DML
DDL: Data base schema is specified by a set of definitions expressed by a special language called
a data definition language.
DML: A data manipulation language is a language that enables users to access or manipulate data
as organized by the appropriate data model.
4
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
• $® there exists
Definition for ‘there exists’ ($):
$ t Î r(Q(t))
which means there exists a tuple ‘t’ in relation ‘r’ such that predicate Q(t) is true.
• "® for all
Definition for ‘for all’ ("): "t Î r(Q(t))
which means Q(t) is true for all tuples ‘t’ in relation
‘r’.
• . ® Implication
Definition for Implication ( ):
P Q means if P is true then Q must be true.
5
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
UNIT: 2
1. What are the parts of SQL language?
The SQL language has several parts:
. Data -definitition language
. Data manipulation language
. View definition
. Transaction control
. Embedded SQL
. Integrity
. Authorization
6
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
Intersection: The result of this relation includes all tuples that are in both r1 and r2.
10. What are aggregate functions? And list the aggregate functions supported by SQL?
Aggregate functions are functions that take a collection of values as input and return a single
value.
Aggregate functions supported by SQL are
. Average: avg
. Minimum: min
. Maximum: max
. Total: sum
. Count: count
7
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
. Form of a relationship
30. List some security violations (or) name any forms of malicious access.
. Unauthorized reading of data
. Unauthorized modification of data
. Unauthorized destruction of data.
8
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
32. What is authorization graph?
Passing of authorization from one user to another can be represented by an authorization graph.
33. List out various user authorization to modify the database schema.
. Index authorization
. Resource authorization
. Alteration authorization
. Drop authorization
9
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
The domain of attribute must include only atomic (simple, indivisible) values.
10
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
UNIT: 3
1. What is an index?
An index is a structure that helps to locate desired records of a relation quickly, without
examining all records.
11
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
File systems that support log disks are called journaling file systems.
21. What are the factors to be taken into account when choosing a RAID level?
o Monetary cost of extra disk storage requirements.
o Performance requirements in terms of number of I/O operations
o Performance when a disk has failed.
o Performances during rebuild.
26. 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.
12
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
27. What is known as heap file organization?
In the heap file organization, any record can be placed anywhere in the file where there is space
for the record. There is no ordering of records. There is a single file for each relation.
32. What are the techniques to be evaluated for both ordered indexing and hashing?
. Access types
. Access time
. Insertion time
. Deletion time
. Space overhead
13
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
40. What is a hash index?
A hash index organizes the search keys, with their associated pointers, into a hash file structure.
14
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
UNIT: 4
1. What is transaction?
Collections of operations that form a single logical unit of work are called transactions.
15
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
11. Define lock?
Lock is the most common used to implement the requirement is to allow a transaction to access a
data item only if it is currently holding a lock on that item.
17. What are the two methods for dealing deadlock problem?
The two methods for dealing deadlock problem is deadlock detection and deadlock recovery.
16
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
32. Differentiate strict two phase locking protocol and rigorous two phase locking protocol.
In strict two phase 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.
34. 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.
17
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
UNIT: 5
1. What is meant by object-oriented data model?
The object-oriented paradigm is based on encapsulation of data and code related to an object in to
a single unit, whose contents are not visible to the outside world.
7. What is substitutability?
Any method of a class-say A can equally well be invoked with any object belonging to any
subclasses B of A. This characteristic leads to code reuse, since the messages, methods, and
functions do not have to be written again for objects of class B.
9. What is DAG?
The class-subclass relationship is represented by a directed acyclic graph.eg: employees can be
temporary or permanenet.we may create subclasses temporary and permanenet, of the class
employee.
18
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
14. What is a Name?
A user-supplied name is used for identity. This form of identity is used for files in file systems.
The user gives each file a name that uniquely identifies it, regardless of its contents.
15What is a Built-in
A notation of identity is built-into the data model or programming language and no user-supplied
identifier is required. This form of identity is used in objectoriented systems.
21. How persistent programming languages differ from traditional programming languages?
Database languages differ from traditional programming languages in that they directly
manipulate data that are persistent-that is, data that continue to exist even after the
program terminated. Relation in a database and tuples in a relation are examples of
persistent data. In contrast, the only persistent data that traditional programming
languages directly manipulate are files.
27. Write a query to define tables students and teachers as sub tables of people?
19
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
Create table students of student under people
Create table teachers of teacher under people
30. What are the two approaches to store relations in distributed database?
*Replication
*Fragmentation
31. What are the two different schemes for fragmenting a relation?
*horizontal
*vertical
20
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
16 MARK QUESTIONS
UNIT: 1
1. EXPLAIN ABOUT DATABASE SYSTEM STRUCTURE?
Storage manager
• Authorization and integrity manager
• Transaction manager
• File manager
• Buffer manager
Storage manager implements several data structure as a part of physical system implementation
• Data function
• Data dictionary
• Indices
The query processor
• DDL interpreter
• DML
• Query evaluation engine
21
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
• Object oriented data model
• Object relational data model
• Network data model
• Hierarchical data model
UNIT-2
1. DESCRIBE INTEGRITY AND SECURITY?
• Domain constraint
Referential integrity
A value that appears in one relation for a given set of attributes also appear for a certain set of
attributes in another relation. This condition is called referential integrity.
• Referential integrity and E-R models
• Database modification
• Referential integrity in SQL
22
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
3. WHAT IS DATA DEFINITION LANGUAGE?EXPLAIN IT IN DETAIL?
The SQL DDL allows specification of not only a set of relations, but also information after each
relation, including
• The schema for each relation
• The domain of values associated with each attribute
• The integrity constraints
• The set of indices to be maintained for each relation
• The security and authorization information for each relation
• The physical storage structure of each relation on disk
Domain Types in SQL
Char(n),
varchar(n), int, small int, numeric(p,d), real, double, precision,
float(n), date, time, timestamp.
Schema Definition in SQL
• Primary key
• Check
• Set comparison
select distinct T.branch-name
from branch as T,branch as S
where T.assets > S.assets and S.branch-city=’Brooklyn’
• Test for Empty Relations
Select customer-name
from borrower
where exits (select *
from depositor
where depositor.customername=
borrower.customer-name)
• Test for the Absence of Duplicate Tuples
23
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
UNIT-3
1. DESCRIBE FILE ORGANISATION?
A file is organized logically as a sequence of records. These records are mapped onto disk blocks.
• Fixed-Length Records
type deposit=record
Accountnumber:char(10);
branch name:char(22);
balance: real;
end
• Variable length records
*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
. Byte string Representation
. Fixed length representation
• Reserved space
• List representation
24
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
. Queries on B+-Tree
. Update on B+-Tree
B+-Tree file organization
. B-Tree index files
Unit 4
1. DESCRIBE LOG BASED RECOVERY
The most usably structure for recording data base modification is the LOG the log is a sequence
of log records recording all the update activities in the data base. There are several types of log
records. An update log records describes a single data base write it has these fields
• Transaction identifier
• Data item identifier
• Old value
• New value
The various types log records as.
• < Ti start >. Transaction Ti has started
• < Ti , Tx v1,v2 > .Transaction Ti has performed a right on data item
• < Ti commit > Transaction Ti has committed
• < Ti about > Transaction Ti has aborted
. Deferred data base modification
. Immediate data base modification
. Check point
. Shadow paging
25
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
26
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
UNIT 5
1. WRITE SHORT NOTES ON DATA WARE HOUSING?
Data ware housing applications requires the transformation of data from many sources into a
cohesive consistent step set of data configured appropriately for use in data ware house operation.
• Distributed Transformation services
Data ware housing is an approach to manage data in which heterogeneous data sources are
migrated to a separate homogeneous data base
• Online Analytical processing services
OLAP services provide server and client capabilities to create and manage multidimensional
OLAP data .
27
SSM College of Engineering, Komarapalayam
Department of Information Technology
DBMS Question Bank
28