dbms q&a

355
QUESTION 1: What is database?

Transcript of dbms q&a

Page 1: dbms q&a

QUESTION 1:What is database?

Page 2: dbms q&a

ANSWER:A database is a logically

Page 3: dbms q&a

coherent collection of data with some inherent

Page 4: dbms q&a

meaning, representing some aspect of real world

Page 5: dbms q&a

and which is designed, built and populated

Page 6: dbms q&a

with data for a specific purpose.

Page 7: dbms q&a

QUESTION 2:What is DBMS?

Page 8: dbms q&a

ANSWER:? Redundancy is controlled.

Page 9: dbms q&a

? Unauthorised access is restricted.

Page 10: dbms q&a

? Providing multiple user interfaces.

Page 11: dbms q&a

? Enforcing integrity constraints.

Page 12: dbms q&a

? Providing backup and recovery.

Page 13: dbms q&a

QUESTION 4:What is a Database system?

Page 14: dbms q&a

ANSWER:The database and DBMS software

Page 15: dbms q&a

together is called as Database system.

Page 16: dbms q&a

QUESTION 5:Disadvantage in File

Page 17: dbms q&a

Processing System?

ANSWER:? Data

Page 18: dbms q&a

redundancy & inconsistency.? Difficult

Page 19: dbms q&a

in accessing data.? Data isolation.

Page 20: dbms q&a

? Data integrity.? Concurrent access is

Page 21: dbms q&a

not possible.? Security Problems. .

Page 22: dbms q&a

QUESTION 6:Describe the three levels of

Page 23: dbms q&a

data abstraction?

Page 24: dbms q&a

ANSWER:The are three levels of

Page 25: dbms q&a

abstraction:

? Physical level: The

Page 26: dbms q&a

lowest level of abstraction describes

Page 27: dbms q&a

how data are stored.

Page 28: dbms q&a

? Logical level: The next higher level of

Page 29: dbms q&a

abstraction, describes what data are stored

Page 30: dbms q&a

in database and what relationship among

Page 31: dbms q&a

those data.

? View level: The

Page 32: dbms q&a

highest level of abstraction describes

Page 33: dbms q&a

only part of entire database.

Page 34: dbms q&a

QUESTION 7:Define the "integrity rules"

Page 35: dbms q&a

ANSWER:There are two Integrity rules.

Page 36: dbms q&a

? Entity Integrity: States that ?Primary

Page 37: dbms q&a

key cannot have NULL value?

Page 38: dbms q&a

? Referential Integrity: States that ?

Page 39: dbms q&a

Foreign Key can be either a NULL value or

Page 40: dbms q&a

should be Primary Key value of other relation.

Page 41: dbms q&a

QUESTION 8:What is extension

Page 42: dbms q&a

and intension?

ANSWER:Extension

Page 43: dbms q&a

-It is the number of tuples present in a table at

Page 44: dbms q&a

any instance. This is time

Page 45: dbms q&a

dependent.

Intension - It is a

Page 46: dbms q&a

constant value that gives the name, structure

Page 47: dbms q&a

of table and the constraints laid on it.

Page 48: dbms q&a

QUESTION 9:What is System R? What are

Page 49: dbms q&a

its two major subsystems?

Page 50: dbms q&a

ANSWER:System R was designed and

Page 51: dbms q&a

developed over a period of 1974-79 at IBM San

Page 52: dbms q&a

Jose Research Center . It is a prototype

Page 53: dbms q&a

and its purpose was to demonstrate that it

Page 54: dbms q&a

is possible to build a Relational System that can

Page 55: dbms q&a

be used in a real life environment to solve real life

Page 56: dbms q&a

problems, with performance at least comparabl

Page 57: dbms q&a

e to that of existing system.

Page 58: dbms q&a

Its two subsystems are

Page 59: dbms q&a

? Research Storage

Page 60: dbms q&a

? System Relational Data System.

Page 61: dbms q&a

QUESTION 10:How is the data structure

Page 62: dbms q&a

of System R different from the relational structure?

Page 63: dbms q&a

ANSWER:Unlike Relational systems in System R

Page 64: dbms q&a

? Domains are not supported

Page 65: dbms q&a

? Enforcement of candidate key

Page 66: dbms q&a

uniqueness is optional

Page 67: dbms q&a

? Enforcement of entity

Page 68: dbms q&a

integrity is optional

? Referentia

Page 69: dbms q&a

l integrity is not enforced

Page 70: dbms q&a

QUESTION 11:What is Data

Page 71: dbms q&a

Independence?

ANSWER:Data

Page 72: dbms q&a

independence means that ?the applicatio

Page 73: dbms q&a

n is independent of the storage structure

Page 74: dbms q&a

and access strategy of data?. In other

Page 75: dbms q&a

words, The ability to modify the schema

Page 76: dbms q&a

definition in one level should not affect the

Page 77: dbms q&a

schema definition in the next

Page 78: dbms q&a

higher level.

Two types of Data

Page 79: dbms q&a

Independence:? Physical Data Independe

Page 80: dbms q&a

nce : Modification in physical level

Page 81: dbms q&a

should not affect the logical level.? Logical

Page 82: dbms q&a

Data Independence : Modification in

Page 83: dbms q&a

logical level should affect the view level.

Page 84: dbms q&a

NOTE: Logical Data Independence is

Page 85: dbms q&a

more difficult to achieve

Page 86: dbms q&a

QUESTION 12:What is a view? How it is

Page 87: dbms q&a

related to data independence?

Page 88: dbms q&a

ANSWER:A view may be thought of as a

Page 89: dbms q&a

virtual table, that is, a table that does not really

Page 90: dbms q&a

exist in its own right but is instead derived

Page 91: dbms q&a

from one or more underlying base table. In

Page 92: dbms q&a

other words, there is no stored file that direct

Page 93: dbms q&a

represents the view instead a definition of view is

Page 94: dbms q&a

stored in data dictionary.Growth and

Page 95: dbms q&a

restructuring of base tables is not reflected

Page 96: dbms q&a

in views. Thus the view can insulate users from

Page 97: dbms q&a

the effects of restructuring and growth in

Page 98: dbms q&a

the database. Hence accounts for logical

Page 99: dbms q&a

data independence. .

Page 100: dbms q&a

QUESTION 13:What is Data Model?

Page 101: dbms q&a

ANSWER:A collection of conceptua

Page 102: dbms q&a

l tools for describing data, data relationships data

Page 103: dbms q&a

semantics and constraints.

Page 104: dbms q&a

QUESTION 14:What is E-R model?

Page 105: dbms q&a

ANSWER:This data model is based on real world

Page 106: dbms q&a

that consists of basic objects called

Page 107: dbms q&a

entities and of relationship among these

Page 108: dbms q&a

objects. Entities are described in a

Page 109: dbms q&a

database by a set of attributes.

Page 110: dbms q&a

QUESTION 15:What is Object

Page 111: dbms q&a

Oriented model?

ANSWER:This

Page 112: dbms q&a

model is based on collection of objects. An object

Page 113: dbms q&a

contains values stored in instance variables

Page 114: dbms q&a

with in the object. An object also contains

Page 115: dbms q&a

bodies of code that operate on the object.

Page 116: dbms q&a

These bodies of code are called methods.

Page 117: dbms q&a

Objects that contain same types of

Page 118: dbms q&a

values and the same methods are

Page 119: dbms q&a

grouped together into classes.

Page 120: dbms q&a

QUESTION 16:What is an Entity?

Page 121: dbms q&a

ANSWER:It is a 'thing' in the real world with

Page 122: dbms q&a

an independent existence.

Page 123: dbms q&a

QUESTION 17:What is an Entity type?

Page 124: dbms q&a

ANSWER:It is a collection (set) of entities

Page 125: dbms q&a

that have same attributes.

Page 126: dbms q&a

QUESTION 18:What is an Entity set?

Page 127: dbms q&a

ANSWER:It is a collection of all entities of

Page 128: dbms q&a

particular entity type in the database.

Page 129: dbms q&a

QUESTION 19:What is an Extension

Page 130: dbms q&a

of entity type?

ANSWER:The

Page 131: dbms q&a

collections of entities of a particular entity

Page 132: dbms q&a

type are grouped together into an entity set.

Page 133: dbms q&a

QUESTION 20:What is Weak Entity set?

Page 134: dbms q&a

ANSWER:An entity set may not have sufficient

Page 135: dbms q&a

attributes to form a primary key, and its

Page 136: dbms q&a

primary key compromises of its partial key

Page 137: dbms q&a

and primary key of its parent entity,

Page 138: dbms q&a

then it is said to be Weak Entity set.

Page 139: dbms q&a

QUESTION 21:What is an attribute?

Page 140: dbms q&a

ANSWER:It is a particular property, which

Page 141: dbms q&a

describes the entity.

QUESTION 22:

Page 142: dbms q&a

What is a Relation Schema and a Relation?

Page 143: dbms q&a

ANSWER:A relation Schema denoted by R(A1,

Page 144: dbms q&a

A2, ?, An) is made up of the relation name R

Page 145: dbms q&a

and the list of attributes Ai that it contains.

Page 146: dbms q&a

A relation is defined as a set of tuples. Let r be the

Page 147: dbms q&a

relation which contains set tuples (t1, t2,

Page 148: dbms q&a

t3, ..., tn). Each tuple is an ordered list of n-

Page 149: dbms q&a

values t=(v1,v2, ..., vn).

Page 150: dbms q&a

QUESTION 23:What is degree of

Page 151: dbms q&a

a Relation?

ANSWER:It is the

Page 152: dbms q&a

number of attribute of its relation schema.

Page 153: dbms q&a

QUESTION 24:What is Relationship?

Page 154: dbms q&a

ANSWER:It is an association among two or

Page 155: dbms q&a

more entities.

QUESTION 25:

Page 156: dbms q&a

What is Relationship set?

Page 157: dbms q&a

ANSWER:The collection (or set) of similar

Page 158: dbms q&a

relationships.

QUESTION 26:

Page 159: dbms q&a

What is Relationship type?

Page 160: dbms q&a

ANSWER:Relationship type defines a set of

Page 161: dbms q&a

associations or a relationship set among a

Page 162: dbms q&a

given set of entity types.

Page 163: dbms q&a

QUESTION 27:What is degree of

Page 164: dbms q&a

Relationship type?

ANSWER:It is the

Page 165: dbms q&a

number of entity type participating.

Page 166: dbms q&a

QUESTION 28:What is Data Storage -

Page 167: dbms q&a

Definition Language?

Page 168: dbms q&a

ANSWER:The storage structures and

Page 169: dbms q&a

access methods used by database system

Page 170: dbms q&a

are specified by a set of definition in a

Page 171: dbms q&a

special type of DDL called data storage-

Page 172: dbms q&a

definition language.

QUESTION 29:

Page 173: dbms q&a

What is DML (Data Manipulation

Page 174: dbms q&a

Language)?

ANSWER:This

Page 175: dbms q&a

language that enable user to access or

Page 176: dbms q&a

manipulate data as organised by appropriat

Page 177: dbms q&a

e data model.

? Procedural

Page 178: dbms q&a

DML or Low level: DML requires a user to

Page 179: dbms q&a

specify what data are needed and how

Page 180: dbms q&a

to get those data.

Page 181: dbms q&a

? Non-Procedural DML or High level: DML

Page 182: dbms q&a

requires a user to specify what data are

Page 183: dbms q&a

needed without specifying how to get

Page 184: dbms q&a

those data.

QUESTION 30:

Page 185: dbms q&a

What is VDL (View Definition Language)?

Page 186: dbms q&a

ANSWER:It specifies user views and their mappings

Page 187: dbms q&a

to the conceptual schema.

Page 188: dbms q&a

QUESTION 31:What is DML Compiler?

Page 189: dbms q&a

ANSWER:It translates DML statement

Page 190: dbms q&a

s in a query language into low-level

Page 191: dbms q&a

instruction that the query evaluation engine

Page 192: dbms q&a

can understand.

Page 193: dbms q&a

QUESTION 32:What is Query

Page 194: dbms q&a

evaluation engine?

ANSWER:It

Page 195: dbms q&a

executes low-level instruction generated

Page 196: dbms q&a

by compiler.

QUESTION 33:

Page 197: dbms q&a

What is DDL Interpreter?

Page 198: dbms q&a

ANSWER:It interprets DDL statement

Page 199: dbms q&a

s and record them in tables

Page 200: dbms q&a

containing metadata.

QUESTION 34:

Page 201: dbms q&a

What is Record-at-a-time?

Page 202: dbms q&a

ANSWER:The Low level or Procedural DML can

Page 203: dbms q&a

specify and retrieve each record

Page 204: dbms q&a

from a set of records. This retrieve of a record is

Page 205: dbms q&a

said to be Record-at-a-time.

Page 206: dbms q&a

QUESTION 35:What is Set-at-a-time or

Page 207: dbms q&a

Set-oriented?

ANSWER:The High

Page 208: dbms q&a

level or Non-procedural DML can specify

Page 209: dbms q&a

and retrieve many records in a single

Page 210: dbms q&a

DML statement. This retrieve of a record is

Page 211: dbms q&a

said to be Set-at-a-time or Set-oriented.

Page 212: dbms q&a

QUESTION 36:What is Relational Algebra?

Page 213: dbms q&a

ANSWER:It is procedural query language.

Page 214: dbms q&a

It consists of a set of operations that take one or two

Page 215: dbms q&a

relations as input and produce a

Page 216: dbms q&a

new relation.

QUESTION 37:

Page 217: dbms q&a

What is Relational Calculus?

Page 218: dbms q&a

ANSWER:It is an applied predicate calculus

Page 219: dbms q&a

specifically tailored for relational databases

Page 220: dbms q&a

proposed by E.F. Codd. E.g. of languages

Page 221: dbms q&a

based on it are DSL ALPHA, QUEL.

Page 222: dbms q&a

QUESTION 38:How does Tuple-oriented

Page 223: dbms q&a

relational calculus differ from domain-oriented

Page 224: dbms q&a

relational calculus

ANSWER:The tuple-

Page 225: dbms q&a

oriented calculus uses a tuple variables

Page 226: dbms q&a

i.e., variable whose only permitted

Page 227: dbms q&a

values are tuples of that relation. E.g. QUEL

Page 228: dbms q&a

The domain-oriented calculus has

Page 229: dbms q&a

domain variables i.e., variables that range

Page 230: dbms q&a

over the underlying domains instead of over

Page 231: dbms q&a

relation. E.g. ILL, DEDUCE.

Page 232: dbms q&a

QUESTION 39:What is normalization?

Page 233: dbms q&a

ANSWER:It is a process of analysing the given

Page 234: dbms q&a

relation schemas based on their Functional

Page 235: dbms q&a

Dependencies (FDs) and primary key to

Page 236: dbms q&a

achieve the properties

Page 237: dbms q&a

? Minimizing redundancy

Page 238: dbms q&a

? Minimizing insertion, deletion and

Page 239: dbms q&a

update anomalies.

Page 240: dbms q&a

QUESTION 40:What is Functional

Page 241: dbms q&a

Dependency?

ANSWER:A

Page 242: dbms q&a

Functional dependency is denoted by X Y

Page 243: dbms q&a

between two sets of attributes X and Y

Page 244: dbms q&a

that are subsets of R specifies a constraint

Page 245: dbms q&a

on the possible tuple that can form a relation

Page 246: dbms q&a

state r of R. The constraint is for any two tuples

Page 247: dbms q&a

t1 and t2 in r if t1[X] = t2[X] then they have t1[Y]

Page 248: dbms q&a

= t2[Y]. This means the value of X componen

Page 249: dbms q&a

t of a tuple uniquely determines the

Page 250: dbms q&a

value of component Y.

Page 251: dbms q&a

QUESTION 41:When is a functional dependen

Page 252: dbms q&a

cy F said to be minimal?

Page 253: dbms q&a

ANSWER:? Every dependency in F has a single

Page 254: dbms q&a

attribute for its right hand side.

Page 255: dbms q&a

? We cannot replace any dependen

Page 256: dbms q&a

cy X A in F with a dependency Y A where Y is

Page 257: dbms q&a

a proper subset of X and still have a set of

Page 258: dbms q&a

dependency that is equivalent to F.

Page 259: dbms q&a

? We cannot remove any dependen

Page 260: dbms q&a

cy from F and still have set of dependen

Page 261: dbms q&a

cy that is equivalent to F.

Page 262: dbms q&a

QUESTION 42:What is Multivalued

Page 263: dbms q&a

dependency?

ANSWER:Multivalue

Page 264: dbms q&a

d dependency denoted by X Y

Page 265: dbms q&a

specified on relation schema R, where X and Y are

Page 266: dbms q&a

both subsets of R, specifies the

Page 267: dbms q&a

following constraint on any relation r of R: if two

Page 268: dbms q&a

tuples t1 and t2 exist in r such that t1[X] =

Page 269: dbms q&a

t2[X] then t3 and t4 should also exist in r with

Page 270: dbms q&a

the following properties

Page 271: dbms q&a

? t3[x] = t4[X] = t1[X] = t2[X]

Page 272: dbms q&a

? t3[Y] = t1[Y] and t4[Y] = t2[Y]

Page 273: dbms q&a

? t3[Z] = t2[Z] and t4[Z] = t1[Z]

Page 274: dbms q&a

where [Z = (R-(X U Y)) ]

Page 275: dbms q&a

QUESTION 43:What is Lossless

Page 276: dbms q&a

join property?

ANSWER:It

Page 277: dbms q&a

guarantees that the spurious tuple generatio

Page 278: dbms q&a

n does not occur with respect to relation schemas

Page 279: dbms q&a

after decomposition.

Page 280: dbms q&a

QUESTION 44:What is 1 NF

Page 281: dbms q&a

(Normal Form)?

ANSWER:The

Page 282: dbms q&a

domain of attribute must include only

Page 283: dbms q&a

atomic (simple, indivisible) values.

Page 284: dbms q&a

QUESTION 45:What is Fully Functional

Page 285: dbms q&a

dependency?

ANSWER:It is based

Page 286: dbms q&a

on concept of full functional dependen

Page 287: dbms q&a

cy. A functional dependency X Y is full

Page 288: dbms q&a

functional dependency if removal of any

Page 289: dbms q&a

attribute A from X means that the dependen

Page 290: dbms q&a

cy does not hold any more.

Page 291: dbms q&a

QUESTION 46:What is 2NF?

Page 292: dbms q&a

ANSWER:A relation schema R is in 2NF if it is in 1NF

Page 293: dbms q&a

and every non-prime attribute A in R is fully

Page 294: dbms q&a

functionally dependent on

Page 295: dbms q&a

primary key.

QUESTION 47:

Page 296: dbms q&a

What is 3NF?

ANSWER:A relation

Page 297: dbms q&a

schema R is in 3NF if it is in 2NF and for every FD

Page 298: dbms q&a

X A either of the following is true

Page 299: dbms q&a

? X is a Super-key of R.

Page 300: dbms q&a

? A is a prime attribute of R.

Page 301: dbms q&a

In other words, if every non prime attribute

Page 302: dbms q&a

is non-transitively dependent on

Page 303: dbms q&a

primary key.

QUESTION 48:

Page 304: dbms q&a

What is BCNF (Boyce-Codd

Page 305: dbms q&a

Normal Form)?

ANSWER:A relation

Page 306: dbms q&a

schema R is in BCNF if it is in 3NF and satisfies

Page 307: dbms q&a

an additional constraint that for every FD

Page 308: dbms q&a

X A, X must be a candidate key.

Page 309: dbms q&a

QUESTION 49:What is 4NF?

Page 310: dbms q&a

ANSWER:A relation schema R is said to be in 4NF

Page 311: dbms q&a

if for every Multivalued dependen

Page 312: dbms q&a

cy X Y that holds over R, one of

Page 313: dbms q&a

following is true

? X is subset or

Page 314: dbms q&a

equal to (or) XY = R.

Page 315: dbms q&a

? X is a super key.

QUESTION 50:

Page 316: dbms q&a

What is 5NF?

ANSWER:A Relation

Page 317: dbms q&a

schema R is said to be 5NF if for every join

Page 318: dbms q&a

dependency {R1, R2, ..., Rn} that holds R,

Page 319: dbms q&a

one the following is true

Page 320: dbms q&a

? Ri = R for some i.

? The join dependen

Page 321: dbms q&a

cy is implied by the set of FD, over R in which

Page 322: dbms q&a

the left side is key of R.