CS6302 DBMS 2marks

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014

P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 1
TWO MARKS QUESTIONS WITH ANSWERS
U UN NI IT T I I: : I IN NT TR RO OD DU UC CT TI IO ON N T TO O D DB BM MS S

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. What is Data?
Known facts are called data. Example employee salary, emp name, emp dob etc, they have
implicit meaning.
3. What is Information?
Collection of data is called information.Ex. Raja working as a Engineer in ABC pvt Ltd.
4. What are the advantages of using a DBMS?
The advantages of using a DBMS are
a) Controlling redundancy
b) Restricting unauthorized access
c) Providing multiple user interfaces
d) Enforcing integrity constraints.
e) Providing backup and recovery
5. List any eight applications of DBMS.
a) Banking
b) Airlines
c) Universities
d) Credit card transactions
e) Tele communication
f) Finance
g) Sales
h) Manufacturing
i) Human resources
6. What are the disadvantages of file processing system?
The disadvantages of file processing systems are
a) Data redundancy and inconsistency
b) Difficulty in accessing data
c) Data isolation
d) Integrity problems
e) Atomicity problems
f) Concurrent access anomalies

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 2
7. State the various processes of database.
a) Defining
b) Constructing
c) Manipulating
8. What are the characteristics of database.
a) self describing nature of the database
b) insulation between programs and data and data abstraction.
c) Support for multiple views of data
d) Sharing of data and multi-user transaction processing
9. Give the levels of data abstraction?
a) Physical level
b) logical level
c) view level
10. Define-metadata.
The information stored in the catalog is called meta-data and it describes the structure of the
primary database.
11. Define data abstraction.
The characteristics that allow program data independence and program operation independence are called
data abstraction.
12. Define instance and schema?

Instance: Collection of data stored in the data base at a particular moment is called an Instance
of the database.
Schema: The overall design of the data base is called the data base schema.

13. 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.
14. What is conceptual schema?
The schemas at the view level are called sub schemas that describe different views of the
database.
15. Define data model?
A data model is a collection of conceptual tools for describing data, data relationships, data
semantics and consistency constraints.


III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 3
16. What is storage manager?
A storage manager is a program module that provides the interface between the low level data
stored in a database and the application programs and queries submitted to the system.
17. What are the components of storage manager?
The storage manager components include
a) Authorization and integrity manager
b) Transaction manager
c) File manager
d) Buffer manager
18. What is the purpose of storage manager?
The storage manager is responsible for the following
a) Interaction with the file manager
b) Translation of DML commands in to low level files system commands
c) Storing, retrieving and updating data in the database
19. List the data structures implemented by the storage manager.
The storage manager implements the following data structure
a) Data files
b) Data dictionary
c) indices
20. What is a data dictionary?
A data dictionary is a data structure which stores meta data about the structure of the database
ie. the schema of the database.
21. What are data Models?
A collection conceptual tools for describing
Data
Data relationships
Data semantics
Data constraints
22. List the different data models
The available data models are
Relational model
Entity-Relationship data model (mainly for database design)
Object-based data models (Object-oriented and Object-relational)
Semi structured data model (XML)
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 4
Other older models:
Network model
Hierarchical model
23. What is an entity relationship model?
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.
24. 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.
25. What is relationship? Give examples
A relationship is an association among several entities. Example: A depositor relationship
associates a customer with each account that he/she has.

26. What is an entity?
An entity is an object that exists and is distinguishable from other objects. Example: specific
person, company, event, plant
27. What is an entity set?
An entity set is a set of entities of the same type that share the same properties. Example: set of
all persons, companies, trees, holidays
28. What is Relationship Sets?
A relationship is an association among several entities
Example:
Hayes depositor A-102
customer entity relationship set account entity
29. What is Degree of a Relationship Set?
Refers to number of entity sets that participate in a relationship set.
30. Mention the Attribute types:
Simple and composite attributes.
Single-valued and multi-valued attributes
Derived attributes
Composite Attributes


III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 5
31. Mapping Cardinality Constraints
Express the number of entities to which another entity can be associated via a relationship set.
Most useful in describing binary relationship sets.
32. For a binary relationship set the mapping cardinality must be one of the following types:
One to one
One to many
Many to one
Many to many
33. What is Weak Entity Sets.
An entity set that does not have a primary key is referred to as a weak entity set.
34. Define Discriminator.
The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes
among all the entities of a weak entity set.
35. Define primary key.
The primary key of a weak entity set is formed by the primary key of the strong entity set on
which the weak entity set is existence dependent, plus the weak entity sets
discriminator.

36. Define the terms i) Entity set ii) Relationship set
Entity set: The set of all entities of the same type is termed as an entity set.
Relationship set: The set of all relationships of the same type is termed as a relationship set.
37. Define single valued and multivalued attributes.
Single valued attributes: attributes with a single value for a particular entity are called single
valued attributes.
Multivalued attributes: Attributes with a set of value for a particular entity are called
multivalued attributes.
38. 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.
39. What are composite attributes?
Composite attributes can be divided in to sub parts.
40. Define null values.
In some cases a particular entity may not have an applicable value for an attribute or if we do
not know the value of an attribute for a particular entity. In these cases null value is used.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 6
41. Define the terms i) Entity type ii) Entity set
Entity type: An entity type defines a collection of entities that have the same attributes.
Entity set: The set of all entities of the same type is termed as an entity set.
42. What is meant by the degree of relationship set?
The degree of relationship type is the number of participating entity types.
43. Define the terms i) Key attribute ii) Value set
Key attribute: An entity type usually has an attribute whose values are distinct from each
individual entity in the collection. Such an attribute is called a key attribute.
Value set: Each simple attribute of an entity type is associated with a value set that specifies
the set of values that may be assigned to that attribute for each individual entity.
44. Define weak and strong entity sets?
Weak entity set: entity set that do not have key attribute of their own are called weak entity
sets. Strong entity set: Entity set that has a primary key is termed a strong entity set.
45. 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:
46. Explain the two types of participation constraint.
Total: The participation of an entity set E in a relationship set R is said to be total if every
entity in E participates in at least one relationship in R.
Partial: if only some entities in E participate in relationships in R, the participation of entity set
E in relationship R is said to be partial.
47. Define the terms i) DDL 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.
48. What are the types of attributes in the ER model?
a) Simple versus composite
b) Single valued versus multi-valued
c) Stored versus derived

49. What are composite and simple attributes?
Composite attributes can be divided into smaller subparts. Simple or atomic attributes are not
divisible.

50. What are stored and derived attribute?
The age attribute is called derived attribute and is said to be derivable from the birth data attribute
which is called stored attribute.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 7
51. What is normalization?
It is a process of analysing the given relation schemas based on their Functional
Dependencies (FDs) and primary key to achieve the properties
Minimizing redundancy
Minimizing insertion, deletion and update anomalies.
52. What is Functional Dependency?
A Functional dependency is denoted by X Y between two sets of attributes X and Y that
are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R.
The constraint is for any two tuples t1 and t2 in r if t1[X] =t2[X] then they have t1[Y] =t2[Y].
This means the value of X component of a tuple uniquely determines the value of component Y.
53. When is a functional dependency F said to be minimal?
Every dependency in F has a single attribute for its right hand side.
We cannot replace any dependency X A in F with a dependency Y A where Y is a
proper subset of X and still have a set of dependency that is equivalent to F.
We cannot remove any dependency from F and still have set of dependency that is
equivalent to F.
54. What is Multivalued dependency?
Multivalued dependency denoted by X Y specified on relation schema R, where X
and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples
t1 and t2 exist in r such that t1[X] =t2[X] then t3 and t4 should also exist in r with the following
properties
t3[x] =t4[X] =t1[X] =t2[X]
t3[Y] =t1[Y] and t4[Y] =t2[Y]
t3[Z] =t2[Z] and t4[Z] =t1[Z]
where [Z =(R-(X U Y)) ]
55. What is 1 NF (Normal Form)?
The domain of attribute must include only atomic (simple, indivisible) values.
56. What is Fully Functional dependency?
It is based on concept of full functional dependency. A functional dependency
X Y is full functional dependency if removal of any attribute A from X means that the dependency
does not hold any more.
57. What is 2NF?
A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully
functionally dependent on primary key.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 8
58. What is 3NF?
A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is
true
X is a Super-key of R.
A is a prime attribute of R.
In other words, if every non prime attribute is non-transitively dependent on primary key.

59. What is BCNF (Boyce-Codd Normal Form)?
A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that
for every FD X A, X must be a candidate key.
60. What is 4NF?
A relation schema R is said to be in 4NF if for every Multivalued dependency
X Y that holds over R, one of following is true
X is subset or equal to (or) XY =R.
X is a super key.
61. What is 5NF?
A Relation schema R is said to be 5NF if for every join dependency {R1, R2, ..., Rn} that
holds R, one the following is true
Ri =R for some i.
The join dependency is implied by the set of FD, over R in which the left side is key of R.
62. What is Domain-Key Normal Form?
A relation is said to be in DKNF if all constraints and dependencies that should hold on the
the constraint can be enforced by simply enforcing the domain constraint and key constraint on
the relation.
63. What is Denormalization.
Denormalization is a strategy that database managers use to increase the performance of a database
infrastructure. It involves adding redundant data to a normalized database to reduce certain types of
problems with database queries that combine data from various tables into a single table. The definition
of denormalization is dependent on the definition of normalization, which is defined as the process of
organizing a database into tables correctly to promote a given use.




III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 9
U UN NI IT T I II I: : S SQ QL L & & Q QU UE ER RY Y O OP PT TI IM MI IZ ZA AT TI IO ON N
1. Define query language?
A query is a statement requesting the retrieval of information. The portion of DML that
involves information retrieval is called a query language
2. 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
3. What are the categories of SQL command?
SQL commands are divided in to the following categories:
Data definitition language
Data manipulation language
Data Query language
Data control language
Data administration statements
Transaction control statements
4. What is the use of rename operation?
Rename operation is used to rename both relations and a attributes. It uses the as clause, taking
the form: Old-name as new-name
5. Define tuple variable?
Tuple variables are used for comparing two tuples in the same relation. The tuple variables are
defined in the from clause by way of the as clause.
6. List the string operations supported by SQL?
Pattern matching Operation
Concatenation
Extracting character strings
Converting between uppercase and lower case letters.



III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 10
7. List the set operations of SQL?
Union
Intersect operation
The except operation
8. What is the use of Union and intersection operation?
Union: The result of this operation includes all tuples that are either in r1 or in r2 or in both r1
and r2. Duplicate tuples are automatically eliminated.
Intersection: The result of this relation includes all tuples that are in both r1 and r2.
9. 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
10. Define Super key.
Super Key: Super key is a set of one or more attributes that are taken collectively whose values or
tuple is identified uniquely.
For example, Enrollment no., Email Id of Student table are super keys of that particular table.
11. Define Candidate key.
Candidate key: It is not proper subset of super key. The content of super key can be a candidate
key but not vice versa.
For example, Enrollment No. is a candidate key as it is a super key but no subsets of it is super key.
12. Define Primary key.
Primary key: It is a candidate key which represents a particular attributes whose values are unique
and not NULL.
For example, Enrollment No. is a primary key of student table as it is unique of particular student. It
is not possible that students have same Enrollment No and also that a student is without Enrollment
No.
13. Define Foreign key.
Foreign key: Foreign key is a primary key of another table. Any attribute of a particular table is a
foreign key if that attribute is derived from another table and is also a primary key of that table. For
example, If student ID is a primary key of student table then it can be used as a foreign key in Exam
table where the name can be known of student with the help of student ID.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 11
14. List the Database Languages.
There are four types of Database languages. They are:
DML (Data Manipulation Language)
DDL (Data Definition Language)
DCL (Data Control Language)
TCL (Transaction Control Language)
15. What is the use of group by clause?
Group by clause is used to apply aggregate functions to a set of tuples. The attributes given in the
group by clause are used to form groups.Tuples with the same value on all attributes in the group by
clause are placed in one group.
16. What is the use of sub queries?
A sub query is a select-from-where expression that is nested with in another query. A common
use of sub queries is to perform tests for set membership, make set comparisions, and determine set
cardinality.
17. What is view in SQL? How is it defined?
Any relation that is not part of the logical model, but is made visible to a user as a virtual
relation is called a view. We define view in SQL by using the create view command. The form of the
create view command is
Create view v as <query expression>

18. List out the statements associated with a database transaction?
Commit work
Rollback work
19. List the SQL domain Types?
SQL supports the following domain types.
1) Char(n) 2) varchar(n) 3) int 4) numeric(p,d) 5) float(n) 6) date.
20. What is the use of integrity constraints?
Integrity constraints ensure that changes made to the database by authorized users do not result in
a loss of data consistency. Thus integrity constraints guard against accidental damage to the
database.
21. What is trigger?
Triggers are statements that are executed automatically by the system as the side effect of a
modification to the database.
22. What are domain constraints?
A domain is a set of values that may be assigned to an attribute .all values that appear in a
column of a relation must be taken from the same domain.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 12
23. What are referential integrity constraints?
A value that appears in one relation for a given set of attributes also appears for a certain set of
attributes in another relation.
24. What is assertion? Mention the forms available.
An assertion is a predicate expressing a condition that we wish the database always to satisfy.
Domain integrity constraints. Referential integrity constraints
25. Give the syntax of assertion?
Create assertion <assertion name>check<predicate>
26. What is the need for triggers?
Triggers are useful mechanisms for alerting humans or for starting certain tasks automatically
when certain conditions are met.
27. Give the forms of triggers?
The triggering event can be insert or delete.
For updated the trigger can specify columns.
The referencing old row as clause
The referencing new row as clause
The triggers can be initiated before the event or after the event.
28. What does database security refer to?
Database security refers to the protection from unauthorized access and malicious destruction or
alteration.
29. List the types of authorization.
Read authorization
Write authorization
Update authorization
Drop authorization
30. What is authorization graph?
Passing of authorization from one user to another can be represented by an authorization graph.
31. Name the various privileges in SQL?
Delete
Select
Insert
Update


III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 13
32. What is Partial key
It is a set of attributes that can uniquely identify weak entities and that are related to same
owner entity. It is sometime called as Discriminator.
33. What is Alternate key?
All Candidate Keys excluding the Primary Key are known as Alternate.
34. What is Artificial key?
If no obvious key, either stand alone or compound is available, then the last resort is to simply
create a key, by assigning a unique number to each record or occurrence. Then this is known as
developing an artificial key.
35. What is Compound Key?
If no single data element uniquely identifies occurrences within a construct, then
combining multiple elements to create a unique identifier for the construct is known as creating a
compound key.
36. What is Natural Key?
When one of the data elements stored within a construct is utilized as the primary key, then it
is called the natural key.
37. What is indexing and what are the different kinds of indexing?
Indexing is a technique for determining how quickly specific data can be found. Types:
Binary search style indexing
B-Tree indexing
Inverted list indexing
Memory resident table
Table indexing
38. What is system catalog or catalog relation? How is better known as?
A RDBMS maintains a description of all the data that it contains, information about every
relation and index that it contains. This information is stored in a collection of relations maintained
by the system called metadata. It is also called data dictionary.
39. What is a query?
A query with respect to DBMS relates to user commands that are used to interact with a data
base. The query language can be classified into data definition language and data manipulation
language.
40. What is meant by query optimization?
The phase that identifies an efficient execution plan for evaluating a query that has the least
estimated cost is referred to as query optimization.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 14
41. What do you mean by Correlated subquery?
Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent
query. Depending on how the subquery is written, it can be executed once for the parent query or it
can be executed once for each row returned by the parent query. If the subquery is executed for each
row of the parent, this is called a correlated subquery.
A correlated subquery can be easily identified if it contains any references to the parent
subquery columns in its WHERE clause. Columns from the subquery cannot be referenced
anywhere else in the parent query. The following example demonstrates a non-correlated
subquery.
E.g. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER
Where CUST.CNUM =ORDER.CNUM)
42. Define Embedded SQL.
Embedded SQL statements are SQL statements written inline with the program source code of
the host language.
43. Define Dynamic SQL.
Useful for applications to generate and run SQL statements, based on user inputs
Queries may not be known in advance
44. What is Distributed databases
In a distributed database system, the database is stored on several computers.
45. What are the two techniques of implementing query optimization?
Heuristic rules for ordering the operations in a query execution strategy
Systematically estimating the cost of different execution strategies
46. Define external sorting?
It refers to sorting algorithms that are suitable for large files of records stored on disk that do
not fit entirely in main memory such as most database files.
47. What are the phases of external sorting?
Sorting phase
Merging phase
48. Define degree of merging?
It is the number of runs that can be merged together in each pass.
49. Give the search methods for simple select operation?
a) Linear search b) Binary Search c) Using a primary index d) Using a primary index to retrieve
multiple records e) Using a clustering index to retrieve multiple records f)Using secondary index on
equality comparison.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 15
50. What are the methods for implementing joins?
Nested loop join
Single loop join
Sort-merge join
51. What is a query tree?
A query tree is a data structure that corresponds to a relational algebra expression. It represents
the input relations of the query as leaf nodes of the tree, and represents the relational algebra
operations as internal nodes.
52. What are the cost components for query execution?
Access cost to secondary storage
Storage cost
Computation cost
Memory usage cost
Communication cost




















III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 16
U UN NI IT T I II II I: : T TR RA AN NS SA AC CT TI IO ON N P PR RO OC CE ES SS SI IN NG G A AN ND D C CO ON NC CU UR RR RE EN NC CY Y C CO ON NT TR RO OL L

1. Define transaction
A transaction is a logical unit of database processing that includes one or more database
access operations that include insertion, deletion, modification or retrieval operations.
2. What are the problems that occur in transaction if they run concurrently?
Lost Update problem
Temporary update problem
Incorrect summary problem
3. What are the types of failures?
Computer failure(system crash)
Transaction or system Error
Local errors
Concurrency control enforcement
Disk failures
Physical problems and catastrophes
4. What are the transaction operations?
Begin transaction
Read or write
End transaction
Commit transaction
Rollback or abort
5. When does a transaction reach its commit point?
A transaction T reaches its commit point when all its operations that access the database have
been executed successfully and the effect of all the transaction operations on the database have
been recorded in the log;
6. What are the properties of transaction?
Atomicity
Consistency reservation
Isolation
Durability or permanency
7. What are the two statements regarding transaction?
The two statements regarding transaction of the form:
Begin transaction
End transaction
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 17
8. 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.
9. What are the states of transaction?
The states of transaction are
Active
Partially committed
Failed
Aborted
Committed
Terminated
10. 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.
11. 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.
12. 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.
13. What are the two types of serializability?
The two types of serializability is
Conflict serializability
View serializability
14. Define consistent state.
A consistent state of the database satisfies the constraints specified in the schema as well as any
other constraints that should hold on the database.
15. When is a schedule said to be serial?
A schedule S is said to be serial if, for every transaction T participating in the schedule all
the operations of T is executed consecutively in the schedule otherwise it is non serial.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 18
16. What is Serializability?
An interleaved execution is considered correct if and only if it is serializable
A set of transactions is serializable if and only if it is guaranteed to produce the same result
as when each transaction is completed prior to the following one being started
17. When is a schedule serializable?
A schedule S of transactions is serializable if it is equivalent to some serial schedule of
the same n transactions.
18. Define precedence graph or serialization graph?
It is a directed graph G =(n,E) that consists of a set of nodes N={T1,T2,Tn}and A set of
directed edges E={e1,e2,en}
19. What is Concurrency?
Concurrency ensures that database transactions are performed concurrently without violating
the data integrity of the respective databases.
20. What are the Three Concurrency Problems?
In a multi-processing environment transactions can interfere with each other
Three concurrency problems can arise, that any DBMS must account for and avoid:
Lost Updates
Uncommitted Dependency
Inconsistent Analysis
21. What is a lock?
A lock is a variable associated with a data item that describes the status of the item with
respect to possible operations that can be applied to it.
22. What is a binary lock?
A binary lock can have two states. Locked and Unlocked.
23. What are the fields present in a lock?
Data item name
LOCK
Locking transaction
24. What are the locking operations of a shared/exclusive lock?
Read lock(X)
Write lock(X)
Unlock(X)
25. What are the phases in a locking transaction?
Expanding phase
Shrinking Phase
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 19
26. Define deadlock
Deadlock occurs when each transaction T in a set of two or more transactions is waiting for
some item that is locked by some other transaction T in the set.
27. Define a Timestamp
A time stamp is a unique identifier created by the DBMS to identify a transaction.
28. What are the values present in a timestamp algorithm?
Read TS(X)
Write TS(X)
29. What are the phases in concurrency control protocol?
Read phase
Validation phase
Write phase
30. What are the conditions that hold in a validation phase?
Transaction Tj completes its write phase before Ti starts its read phase
Ti starts write phase after Tj completes its write phase and the read set of Ti has no items
in common with the write set of Tj
Both the read set and the write set of Ti have no items in common with the write set of Tj
and Ti completes its read phase before Ti completes its read phase
31. Define granularity?
The size of data item is called data item granularity.
32. What are types of intension locks?
Intension shared
Intension Exclusive
Shared-Intension Exclusive
33. What are the techniques for recovery from non catastrophic failures?
Deferred update
Immediate update
34. What is durability in DBMS?
Once the DBMS informs the user that a transaction has successfully completed, its effects
should persist even if the system crashes before all its changes are reflected on disk. This property
is called durability.
35. What do you mean by atomicity?
Either all actions are carried out or none are. Users should not have to worry about the
effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete
transactions.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 20
36. What do you mean by aggregation?
A concept which is used to model a relationship between a collection of entities and
relationships. It is used when we need to express a relationship among relationships.
37. What is a Phantom Deadlock?
In distributed deadlock detection, the delay in propagating local information might cause
the deadlock detection algorithms to identify deadlocks that do not really exist. Such situations are
called phantom deadlocks and they lead to unnecessary aborts.
38. What is a checkpoint and When does it occur?
A Checkpoint is like a snapshot of the DBMS state. By taking checkpoints, the DBMS can
reduce the amount of work to be done during restart in the event of subsequent crashes.
39. What are the different phases of transaction?
Different phases are
Analysis phase
Redo Phase
Undo phase
40. What do you mean by flat file database?
It is a database in which there are no programs or user access languages. It has no cross-file
capabilities but is user-friendly and provides user-interface management.
41. What is "transparent DBMS"?
It is one, which keeps its Physical Structure hidden from user.
42. 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.
43. What are the different modes of lock?
The modes of lock are:
Shared
Exclusive
44. Define deadlock?
Neither of the transaction can ever proceed with its normal execution. This situation is
called deadlock.
45. 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.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 21
46. 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.
47. 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.
48. What are the two methods for dealing deadlock problem?
The two methods for dealing deadlock problem is deadlock detection and deadlock
recovery.
49. What is a recovery scheme?
An integral part of a database system is a recovery scheme that can restore the database to the
consistent state that existed before the failure.
50. What are the two types of errors?
The two types of errors are:
Logical error
System error

















III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 22
U UN NI IT T I IV V: : T TR RE EN ND DS S I IN N D DA AT TA AB BA AS SE E T TE EC CH HN NO OL LO OG GY Y

1. What are the storage types?
The storage types are:
Volatile storage
Nonvolatile storage
2. What are the main categories of storage hierarchy?
Primary storage
Secondary storage
3. Define track.
Each concentric circle in a disk surface is called a track.
4. What is the hardware address of a block?
The hardware address of a block is the combination of a surface number, track number and
block number.
5. Define seek time.
To transfer a disk block, given its address, the disk controller must first position the read write
head on the correct track. The time required to do this is called seek time.
6. Define blocks?
The database system resides permanently on nonvolatile storage, and is partitioned into
fixed-length storage units called blocks.
7. What is meant by Physical blocks?
The input and output operations are done in block units. The blocks residing on the disk are
referred to as physical blocks.
8. What is meant by buffer blocks?
The blocks residing temporarily in main memory are referred to as buffer blocks.
9. What is meant by disk buffer?
The area of memory where blocks reside temporarily is called the disk buffer.
10. Define rotational delay or latency
The beginning of the desired block rotates into position under the read write head is called rotational
delay or latency.
11. Define bulk transfer rate
The time required to transfer consecutive blocks is called bulk transfer rate.
12. What is the use of RAID?
A variety of disk-organization techniques, collectively called redundant arrays of independent
disks are used to improve the performance and reliability.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 23
13. What is called mirroring?
The simplest approach to introducing redundancy is to duplicate every disk. This technique is
called mirroring or shadowing.
14. What is called mean time to repair?
The mean time to failure is the time it takes to replace a failed disk and to restore the data on it.
15. What is called bit-level striping?
Data striping consists of splitting the bits of each byte across multiple disks. This is called bit -
level striping.
16. What is called block-level striping?
Block level striping stripes blocks across multiple disks. It treats the array of disks as a large
disk, and gives blocks logical numbers.
17. 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.
Performances during rebuild.
18. What is meant by software and hardware RAID systems?
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.
19. What is data striping
Data striping distributes the data transparently over multiple disks to make them appear as a single
large fast disk.
20. What is mirroring or shadowing?
Data is written redundantly to two identical physical disks that are treated as one logical disk. When
data is read it can be retrieved from the disk, with short queuing, seek time and rotational delay.
21. What is bit level data striping?
Bit level data striping consists of splitting a byte of data and writing bit j to the jth disk.
22. What are the records-at a time operations?
Reset, find, read, findnext, delete, modify, insert
23. What are the set at a time operations?
Findall, Findordered, reorganize.
24. Define hashing function?
It provides a function h called the hash function that is applied to the hash field value of a record and
yields the address of the disk block in which the record is stored.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 24
25. What is folding?
It involves applying an arithmetic function such as addition or logical function such as exclusive or to
different portions of the hash field value to calculate the hash address.
26. When does collision occur?
A collision occurs when a hash field value of a record that is being inserted hashes to an address
that already contains a different record.
27. What is collision resolution?
The process of finding new location to insert record is called collision resolution.
28. State the methods of collision resolution?
Open addressing
Chaining
Multiple hashing
29. What is external hashing?
Hashing for disk files is called external hashing.
30. What is local depth in extendible hashing?
A local depth stored with each bucket specifies the number of bits on which the bucket contents are
based.
31. What is meant by log-based recovery?
The most widely used structures for recording database modifications is the log. The log is a
sequence of log records, recording all the update activities in the database. There are several types
of log records.
32. 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.
33. 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.
34. Define page.
The database is partitioned into some number of fixed-length blocks, which are referred to as
pages.
35. 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.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 25
36. What are the drawbacks of shadow-paging technique?

Commit Overhead

Data fragmentation
Garbage collection
37. Define garbage collection.
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.
38. 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.
39. 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.
40. What is the use of a slotted-page structure and what is the information present in the header?
The slotted-page structure is used for organizing records within a single block. The header
contains the following information. The number of record entries in the header. The end of free space
An array whose entries contain the location and size of each record.
41. 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.
42. What is known as sequential file organization?
In the sequential file organization, the records are stored in sequential order, according to the
value of a - search key||of each record.
43. 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.
44. What is known as clustering file organization?
In the clustering file organization, records of several different relations are stored in the same
file.
45. What are the types of indices?
Ordered indices
Hash indices.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 26
46. What are the techniques to be evaluated for both ordered indexing and hashing?
Access types
Access time
Insertion time
Deletion time
Space overhead
47. What is known as a search key?
An attribute or set of attributes used to look up records in a file is called a search key.
48. What is a primary index?
A primary index is an index whose search key also defines the sequential order of the file.
49. What are called index-sequential files?
The files that are ordered sequentially with a primary index on the search key, are called index-
sequential files.
50. What is B-Tree?
A B-tree eliminates the redundant storage of search-key values .It allows search key values to
appear only once.
51. 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.
52. What is a hash index?
A hash index organizes the search keys, with their associated pointers, into a hash file
structure.
53. What is called query processing?
Query processing refers to the range of activities involved in extracting data from a database.
54. What are the steps involved in query processing?
The basic steps are:
Parsing and translation
Optimization
Evaluation
55. What is called a query evaluation plan?
A sequence of primitive operations that can be used to evaluate ba query is a query evaluation
plan or a query execution plan.
56. What is called a query execution engine?
The query execution engine takes a query evaluation plan, executes that plan, and returns the
answers to the query.
III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 27
57. What is called as external sorting?
Sorting of relations that do not fit into memory is called as external sorting.
58. What is called as an N-way merge?
The merge operation is a generalization of the two-way merge used by the standard in-memory
sort-merge algorithm. It merges N runs, so it is called an N-way merge.
59. What is data warehousing?
Development of a data warehouse includes development of system to extract data from operating
system plus installation of a warehouse database system that provides managers flexible access to the
data
60. Define Data mining.
It refers to extracting or mining knowledge from large amount of data. Data mining is a
process of discovering interesting knowledge from large amounts of data stored either, in database,
data warehouse, or other information repositories





















III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 28
U UN NI IT T V V: : A AD DV VA AN NC CE ED D T TO OP PI IC CS S
1. What are the commonly accepted security goals?
Loss of Integrity
Loss of availability
Loss of Confidentiality
2. What are the four kinds of control measures to protect data in database against threats?
Access Control
Inference Control
Flow Control
Encryption
3. How can ensure the security of portion of a sensitive information in database.
A DBMS typically includes a database security and authorization subsystem that is responsible
for ensuring the security ofportions ofa database against unauthorized access.
4. List two types of database security mechanisms
Discretionary security mechanisms.
Mandatory security mechanisms.
5. Define Access Control.
The security mechanism of a DBMS must include provisions for restricting access to the database
system as a whole. This function, called access control, is handled by creating user accounts and
passwords to control the login process by the DBMS.
6. What is Statistical Databases?
Statistical databases are used to provide statistical information or summaries of values based on
various criteria. For example, a database for population statistics may provide statistics based on age
groups, income levels, household size, education levels, and other criteria.
7. Who are the Statistical database users?
Statistical database users such as government statisticians or market research firms are allowed to
access the database to retrieve statistical information about a population but not to access the detailed
confidential information about specific individuals.
8. What is Statistical Database security?
Security for statistical databases must ensure that information about individuals cannot be
accessed. It is sometimes possible to deduce or infer certain facts concerning individuals from queries
that involve only summary statistics on groups; consequently, this must not be permitted either. This
problem is called statistical database security.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 29
9. What is Convert Channels?
Channels that are pathways for information to flow implicitly in ways that violate the security
policy of an organization are called covert channels.
10. What are the responsibilities of DBAs?
The DBAs responsibilities include granting privileges to users who need to use the system and
classifying users and data in accordance with the policy of the organization.
11. What is system or superuser account?
The DBA account in the DBMS, sometimes called a system or superuser account, which provides
powerful capabilities that are not made available to regular database accounts and users.
12. What are the types of action performed by DBA?
Account creation
Privilege granting
Privilege revocation
Security level assignment
13. Mention three most important factors can cause data to be classified as sensitive.
The three most important factors are data availability, access acceptability, and authenticity
assurance.
14. Define Data availability.
If a user is updating a field, then this field becomes inaccessible and other users should not be able
to view this data. This blocking is only temporary and only to ensure that no user sees any inaccurate
data.
15. Define Access acceptability.
Data should only be revealed to authorized users. A database administrator may also deny access
to a user request even if the request does not directly access a sensitive data item, on the grounds that
the requested data may reveal information about the sensitive data that the user is not authorized to
have.
16. Define Authenticity assurance.
Before granting access, certain external characteristics about the user may also be considered. For
example, a user may only be permitted access during working hours. The system may track previous
queries to ensure that a combination of queries does not reveal sensitive data.
17. Differentiate between security and precision.
Security: Means of ensuring that data is kept safe from corruption and that access to it is suitably
controlled. To provide security means to disclose only nonsensitive data, and reject any query that
references a sensitive field.
Precision: To protect all sensitive data while disclosing as much nonsensitive data as possible.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 30
18. What are two levels for assigning privileges to use the database system?
The account level
The relation (or table) level
19. Define Flow control.
Flow control regulates the distribution or flow of information among accessible objects. A flow
between object X and object Y occurs when a program reads values from X and writes values into Y.
20. What is DDB?
Distributed database (DDB) as a collection of multiple logically interrelated databases distributed
over a computer network, and a distributed data base management system (DDBMS) as a software
system that manages a distributed database while making the distribution transparent to the user.
21. What are the conditions should be satisfied, a database to be called distributed?
Connection of database nodes over a computer network
Logical interrelation of the connected databases
Absence of homogeneity constraint among connected nodes
22. List the advantages of DDB.
Improved ease and flexibility of application development
Increased reliability and availability
Improved performance
Easier expansion
23. What is a homogeneous distributed database?
In homogeneous distributed databases, all sites have identical database management system
software, are aware of one another, and agree to cooperate in processing user's requests.
24. What is a heterogeneous distributed database?
In a heterogeneous distributed database, different sites may use different schemas, and different
dbms s/w.The sites may not be aware of one another, and they may provide only limited facilities
for cooperation in transaction processing.
25. What are the two approaches to store relations in distributed database?
Replication
Fragmentation
26. What are the two different schemes for fragmenting a relation?
Horizontal
Vertical


III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 31
27. What is horizontal fragmentation?
Horizontal fragmentation splits the relation by assuming each tuple of r to one or more
fragments.
28. What is vertical fragmentation?
Vertical fragmentation splits the relation by decomposing the scheme R of relation r.
29. What are the various forms of data transparency?
Fragmentation transparency
Replication transparency
Location transparency
30. Define Data Warehousing.
Data warehouses provide access to data for complex analysis, knowledge discovery, and decision
making.
31. Mention five distinctive characteristics of data warehouse?
Multidimensional conceptual view
Generic dimensionality
Unlimited dimensions and aggregation levels
Unrestricted cross-dimensional operations
Dynamic sparse matrix handling
32. Define Data mining.
It refers to the mining or discovery of new information in terms of patterns or rules from vast
amounts of data. It must be carried out efficiently on large files and databases.
33. Define unsupervised learning.
The previous data mining task of classification deals with partitioning data based on using a
preclassified training sample. However, it is often useful to partition data without having a training
sample; this is also known as unsupervised learning.
34. List the applications of Data Mining.
Marketing
Finance
Manufacturing
Health Care
35. 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.

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 32
36. What is the major advantage of object-oriented programming paradigm?
The ability to modify the definition of an object without affecting the rest of the system is the
major advantage of object-oriented programming paradigm.
37. What are the methods used in object-oriented programming paradigm?
Read-only
Update
38. What is the main difference between read-only and update methods?
A read-only method does not affect the values of a variable in an object, whereas an update
method may change the values of the variables.
39. Differentiate sub-class and super-class?
The specialization of a class is called subclasses.eg: employee is a subclass of person and
teller is a subclass of employee. Conversely, employee is a super class of teller, and person is a
super class of employee.
40. 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.
41. What are multiple inheritances?
Multiple inheritance permits a class to inherit variables and methods from multiple super
classes.
42. What is DAG?
The class-subclass relationship is represented by a directed acyclic graph.eg: employees can
be temporary or permanent. We may create subclasses temporary and permanent, of the class
employee.
43. What is disadvantage of multiple inheritances?
There is potential ambiguity if the same variable or method can be inherited from more than
one superclass.eg: student class may have a variable dept identifying a student's department, and
the teacher class may correspondingly have a variable dept identifying a teacher's department.
44. What is object identity?
An object retains its identity even if some or all the values of variables or definitions of
methods change overtime.
45. What are the several forms of identity?
Value
Name
Built-in

III SEM / CSE CS 6302 DBMS - 2 MARKS Q&A 2014


P r e p a r e d b y D . S a t h y a m u r t h y A P / C S E

Page 33
46. What is a value?
A data value is used for identity. This form of identity is used in relational systems.eg: The
primary key value of a tuple identifies the tuple.
47. 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.
48. What 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 object- oriented systems.
49. What is meant by object identifiers?
Object-oriented systems use an obj ect i denti fi er to i denti f y obj ects. Object
identifiers are unique: that is each object has a single identifier, and no two objects have the
same identifier.
50. What are composite objects?
Objects that contain other objects are called complex objects or composite objects.
51. What is object containment?
References between objects can be used to model different real-world concepts.
52. Why containment is important in oopsystems?
Containment is an important concept in oopsystems because it allows different users to view
data at different granularities.
53. Define object-relational systems?
Systems that provide object-oriented extensions to relational systems are called object-
relational systems.
54. 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.
55. List three types of XML documents
Data-centric XML documents
Document-centric XML documents
Hybrid XML documents

You might also like