You are on page 1of 10

DBMS Questions

1. What is a database?
Ans: A database is a collection of related data. A database is a logically coherent
collection of data with some inherent meaning.
2. What is DBMS?
Ans: Database Management system is a collection of programs that enables user to
create and maintain a database.
3. How is the data stored in a database?
Ans: Data is stored in the form of tables.
4. What is a table?
Ans: A table is a collection of records. Record is also known as a Row.
5. What is a olu!n"#ield?
Ans: It is known as an attribute which is a property of a table.
$. What are the a%%liations o# databases?
Ans: Airlines, banking, universities, credit card transactions, tele communications,
Finance, ales etc.
&. 'n ()* Model what does the ter! ( and * !ean?
Ans: ( means !ntity and * means Relation.
+. 'n ()* !odel attributes are re%resented usin, -.al s/!bol.
0. 'n ()* !odel relations are re%resented usin, *ho!bus s/!bol.
11. What is data *edundan/?
Ans: Duplication of data is called data redundancy.
11. What is real ti!e database tehnolo,/?
Ans: "hese are all the techni#ues used in controlling industrial and manufacturing
processes.
12. What is a .iew?
Ans: A view may be a subset of the database or it may contain virtual data that is
derived from the database files but is not e$plicitly stored.
13. What is -234?
Ans: %nline transaction processing is an application that involve multiple database
accesses from different parts of the world. %&"' needs a multi(user D)M s*w to
ensure that concurrent transactions operate correctly.
SVIT 1
14. What is the 5ob o# DBA?
Ans: A database administrator is a person or a group responsible for authori+ing
access to the database, for coordinating and monitoring its use, and for ac#uiring s*w
and h*w resources as needed.
15. Who are db desi,ner?
Ans: Data base designers are responsible for identifying the data to be stored in the
database and for choosing appropriate structure to represent and store this data.
1$. What are di##erent t/%es o# end users?
Ans:
,asual end(users
-aive or parametric end users
ophisticated end users
tand alone users.
1&. What is she!a.
Ans/ "he description of a data base is called the database schema, which is specified
during database design and is not e$pected to change fre#uently. A displayed schema
is called schema diagram.
1+. What is 'nstane o# Database?
Ans: "he collection of information stored in the database at a particular movement is
called the 'nstane of the Database.
10. What are t/%es o# she!a?
Ans:
Internal schema defines physical storage structures.
,onceptual schema integrates e$ternal schema.
!$ternal schemas or user views.
21. What is Data inde%enden/?
Ans: Data independency is defined as the capacity to change the conceptual schema
without having to change the schema at the ne$t higher level.
21. What is an entit/?
Ans: An entity is a thing in the real world with an independent e$istence.
22. What are attributes?
Ans: "hese are the particular properties that describe an entity.
23. What is di##erene between entit/ set and entit/ t/%e?
Ans:(ntit/ t/%e/ An entity type defines a collection of entities that have the same
attributes.(ntit/ set: the collection of all entities of a particular entity type in the
database at any point of time is called !ntity set.
SVIT 2
24. What is do!ain .alue or .alue set o# an attribute?
Ans: It is the set of values that may be assigned to that attribute for each individual
entities.
25. What is de,ree o# a relationshi%?
Ans: "he no of entities participating in that relation.
2$. What is reursi.e relationshi%?
Ans: It is the relationship where both the participating entities belong to same entity
type
2&. What is ardinalit/ ratio in DBMS?
Ans: "he ration between total 'articipation and partial participation is called as
,ardinality ration.
2+. What is an (* Dia,ra!?
Ans: "his data model is based on real world that consists of basic ob0ects called
entities and of relationship among these ob0ects. !ntities are described in a database
by a set of attributes.
20. What is !eta data?
Ans: Data about the data is called meta data.
31. What is s%eiali6ation?
Ans: It is the process of defining a set of subclasses of an entity type where each
subclass contain all the attributes and relationships of the parent entity and may have
additional attributes and relationships which are specific to itself.
31. What is ,enerali6ation?
Ans: It is the process of finding common attributes and relations of a number of
entities and defining a common super class for them.
32. What is a ternar/ relationshi%?
Ans: A relationship with a degree 1 is called a ternary relationship.
33. What is a,,re,ation and assoiation?
Ans: Aggregation is an abstraction concept for building composite ob0ects from their
component ob0ects. "he abstraction of association is used to associate ob0ects from
several independent classes.
34. What is a su%er 7e/?
Ans: A su%er7e/ is defined as a set of attributes of a relation variable for which it
holds that in all relations assigned to that variable, there are no two distinct tuples
2rows3 that have the same values for the attributes in this set.
SVIT 3
35. What is a 8andidate 9e/?
Ans: ,andidate key ( A candidate key is a field or combination of fields that can act as
a primary key field for that table to uni#uely identify each record in that table.
3$. What is a 8o!%ound 7e/?
Ans: 8ompound key 2also called a composite key or concatenated key3 is a key that
consists of 4 or more attributes.
3&. What is a %ri!ar/ 7e/?
Ans: A primary key is a value that can be used to identify a uni#ue row in a table.
3+. What is a #orei,n 7e/?
Ans: A key of a relation schema is called as a foreign key if it is the primary key of
some other relation to which it is related to.
30. What is a transation?
Ans: A transaction is a logical unit of database processing that includes one or more
database access operations.
41. What are the %ro%erties o# transation?
Ans:
Atomicity
,onsistency preservation
Isolation
Durability 2permanence3
41. What is a lo7?
Ans/ A lock is a variable associated with a data item that describes the status of the
item with respect to the possible operations that can be applied to it.
42. What is shared or e:lusi.e lo7?
Ans: It implements multiple(mode lock. Allowing multiple accesses for read operations
but e$clusive access for write operation.
43. What is a deadlo7?
Ans: Dead lock occurs when each transaction " in a set of two or more transactions is
waiting for some item that is locked by some other transaction "5 in the set. 6ence
each transaction is in a waiting #ueue, waiting for one of the other transactions to
release the lock on them.
44. What are tri,,ers?
Ans: "riggers are the '&*7& blocks defining an action the database should take
when some database related event occurs. "riggers may be used to supplement
declarative referential integrity, to enforce comple$ business rules, or to audit changes
to data.
SVIT 4
45. What is *elationshi%?
Ans: It is an association among two or more entities.
4$. What is *elationshi% set?
Ans: "he collection 2or set3 of similar relationships.
4&. What is *elationshi% t/%e?
Ans: Relationship type defines a set of associations or a relationship set among a
given set of entity types.
4+. What is DM2?
Ans: "his language that enable user to access or manipulate data as organi+ed by
appropriate data model.
40. What is DD2?
Ans: Data Definition language deals with the structure of the table.
51. What is ;D2 <;iew De#inition 2an,ua,e=?
Ans: It specifies user views and their mappings to the conceptual schema.
51. What is DM2 8o!%iler?
Ans: It translates DM& statements in a #uery language into low(level instruction that
the #uery evaluation engine can understand.
52. What is Quer/ e.aluation en,ine?
Ans: 't e$ecutes low(level instruction generated by compiler.
53. What is DD2 'nter%reter?
Ans: It interprets DD& statements and records them in tables containing metadata.
54. What is nor!ali6ation?
Ans: It is a process of analy+ing the given relation schemas based on their Functional
Dependencies 2FDs3 and primary key to achieve the properties.
(Minimi+ing redundancy
Minimi+ing insertion, deletion and update anomalies.
55. What is 1st nor!al #or!?
Ans: First normal form 28-F3 sets the very basic rules for an organi+ed database/
!liminate duplicative columns from the same table.
,reate separate tables for each group of related data and identify each row with a
uni#ue column or set of columns 2the primary key3.
5$. What is 2nd >or!al #or!?
Ans: In order to be in econd -ormal Form, a relation must first fulfill the
re#uirements to be in First -ormal Form. Additionally, each non(key attribute in the
relation must be functionally dependent upon the primary key.
SVIT 5
5&. What is 3rd >or!al #or!?
Ans: In order to be in "hird -ormal Form, a relation must first fulfill the re#uirements
to be in econd -ormal Form. Additionally, all attributes that are not dependent upon
the primary key must be eliminated.
5+. What Bo/e)8odd >or!al ?or! <B8>?=?
Ans: A relation is in )oyce(,odd -ormal Form 2),-F3 if every determinant is a
candidate key.
50. What is 4th >or!al #or!?
Ans: "o be in Fourth -ormal Form, a relation must first be in )oyce(,odd -ormal
Form. Additionally, a given relation may not contain more than one multi(valued
dependency.
$1. What is denor!ali6ation and wh/ would so!eone onsider doin, so?
Ans: Denormali+ation is the process of taking normali+ed relations and changing them
so that they are not longer normali+ed. "his process may lead to anomalies and
create data redundancy as negative conse#uences. 6owever, the revised relations
should improve database performance.
$1. What is #untional de%enden/?
Ans: A functional dependency 2FD3 is a constraint between two sets of attributes in a
relation from a database.
$2. What is 2ossless 5oin %ro%ert/?
Ans: It guarantees that the spurious tuple generation does not occur with respect to
relation schemas after decomposition.
$3. What is SQ2?
Ans: 7& 2tructured 7uery &anguage3 is a standard language for accessing
databases.
$4. How do /ou insert reords into a table? Show with an e:a!%le.
Ans: insert into student values29smith5 8::, 9I"53;
$5. What is trunate in DBMS?
Ans: It deletes all the records in the table. It results in an empty table.
$$. What is dro%?
Ans: It removes records and table.
$&. What is delete state!ent?
Ans: "he D!&!"! statement is used to delete rows in a table.
$+. What is A23(* state!ent used #or?
SVIT 6
Ans: It is used to modify a table.
$0. What are the .arious DD2 o%erations?
Ans: create, alter, truncate, drop
&1. What are the .arious DM2 o%erations?
Ans: insert, delete, update
&1. What is 382 and what are its o%erations?
Ans: ",& stands fore "ransaction ,ontrol &anguage. Its operations are Sa.e%oint@
*ollba7 and 8o!!it.
&2. What is a Sa.e%oint state!ent?
Ans: "he A<!'%I-" statement names and marks the current point in the
processing of a transaction.
&3. What is 8o!!it state!ent?
Ans: "he ,%MMI" statement makes permanent any changes made to the database
during the current transaction.
&4. What is *ollba7 State!ent?
Ans: "he R%&&)A,= statement is the inverse of the ,%MMI" statement. It undoes
some or all database changes made during the current transaction.
&5. What is ,rou%b/ state!ent?
Ans: "he >R%?' )@ statement is used in con0unction with the aggregate functions to
group the resultset by one or more columns.
&$. What is orderb/ state!ent?
Ans: "he >R%?' )@ statement is used in con0unction with the aggregate functions to
group the resultset by one or more columns.
&&. What is a SQ2 5oin?
Ans: "he A%I- keyword is used in an 7& statement to #uery data from two or more
tables, based on a relationship between certain columns in these tables.
&+. What are di##erent SQ2 5oins?
Ans:
A-'>/ Return rows when there is at least one match in both tables
2(?3 A-'>/ Return all rows from the left table, even if there are no matches in the
right table
*'BH3 A-'>/ Return all rows from the right table, even if there are no matches in the
left table
?C22 A-'>/ Return rows when there is a match in one of the tables
&0. What is inner 5oin?
SVIT 7
Ans: "he I--!R A%I- keyword return rows when there is at least one match in both
tables.
+1. Brie#l/ desribe an outer 5oin?
Ans: An outer 0oin includes the records that match and those that do not have a
matching value in another table. %uter 0oins can be a &!F" outer 0oin 2includes all
records from the first table listed3 or a RI>6" outer 0oin 2includes all records from the
second table listed3. %uter 0oins are not easily used with more than two tables.
+1. What is distributed database?
Ans: A distributed database is defined as collection of logically distributed database
which are connected with each other through a network. A distributed database
management system is used for managing distributed database. !ach side has its
own database and operating system.
+2. What is entrali6ed database?
Ans: A centrali+ed database has all its data on one place. As it is totally different from
distributed database which has data on different places. In centrali+ed database as all
the data reside on one place so problem of bottle(neck can occur, and data availability
is not efficient as in distributed database.
+3. What is onurren/ ontrol?
Ans: 8onurren/ ontrol mechanism ensures that correct results for concurrent
operations are generated, while getting those results as #uickly as possible.
+4. What is 3wo)4hase 8o!!it?
Ans: "wo(phase commit is mechanism that guarantees a distributed transaction either
commits on all involved nodes or rolls back on all involved nodes to maintain data
consistency across the global distributed database. It has two phases, a 'repare
'hase and a ,ommit 'hase.
+5. What is a Quer/?
Ans: A 7uery with respect to D)M relates to user commands that are used to
interact with a Data)ase.
+$. Desribe a subDuer/?
Ans: A sub#uery is a #uery that is composed of two #ueries. "he first #uery 2inner
#uery3 is within the B6!R! clause of the other #uery 2outer #uery3. In some cases
the inner #uery provides results for the outer #uery to process. In other cases, the
outer #uery results provide results for the inner #uery 2correlated sub#uery3.
+&. What are stored %roedures@ and how do the/ di##er #ro! tri,,ers?
Ans: A stored procedure is a program that is stored within the database and is
compiled when used. "hey can receive input parameters and they can return results.
?nlike triggers, their scope is databasewide; they can be used by any process that
has permission to use the database stored procedure.
SVIT 8
++. What is *elational Al,ebra?
Ans: It is procedural #uery language. It consists of a set of operations that take one or
two relations as input and produce a new relation.
+0. What is *elational 8alulus?
Ans: It is an applied predicate calculus specifically tailored for relational databases
proposed by !.F. ,odd.
01. What is the di##erene between delete and dro%?
Ans: After performing a D(2(3( operation you need to ,%MMI" or R%&&)A,= the
transaction to make the change permanent or to undo it.
"he D*-4 command removes a table from the database. All the tablesC rows, inde$es
and privileges will also be removed. -o DM& triggers will be fired. "he operation
cannot be rolled back.
01. What is D82 and what are its o%erations?
Ans: D82 stands #or Data control language. Its operations are ,rant and re.o7e.
02. What is Brant?
Ans: >RA-" is a command used to provide access or privileges on the database
ob0ects to the users.
03. What is re.o7e?
Ans: "he R!<%=! command removes user access rights or privileges to the
database ob0ects.
04. What are SQ2 A,,re,ate #untions?
Ans: 7& aggregate functions return a single value, calculated from values in a
column.
Cse#ul a,,re,ate #untions:
A<>23 ( Returns the average value
,%?-"23 ( Returns the number of rows
FIR"23 ( Returns the first value
&A"23 ( Returns the last value
MAD23 ( Returns the largest value
MI-23 ( Returns the smallest value
?M23 ( Returns the sum
05. What is a onstraint? And what are the le.els o# onstraints?
Ans: ,onstraint is the restriction on values that can be entered in a table. "here are
two levels of constraints. 8. ,olumn level 4. "able level.
0$. What is olu!n le.el onstraint?
Ans: "he constraint that is based on a single column and is applicable to that column
only. All types of constraints can be placed at column level.
SVIT 9
0&. What is table le.el onstraint?
Ans: In table level constraint, the constraints can be placed on more than one column.
All types of constraints can be placed at "able level e:e%t >-3 >C22.
0+. What is the need #or 2o7s in DBMS?
Ans: &ocking is needed to allow only one user at a time to access the table. %ther
users are made to wait until the lock is released.
00. What is Data #ra,!entation?
Ans: Data fragmentation occurs when a piece of data is not able to fit in 2available3
memory(slot as a whole and is broken up into many pieces 2that are not close
together3 so that each piece is able to fit the available memory locations.
111. Write an SQ2 S(2(83 state!ent to ount the nu!ber o# rows in S3CD(>3
table and
dis%la/ the result with the label >u!Students.
Ans: !&!," ,%?-"2E3 A -umtudents FR%M "?D!-";
SVIT 10

You might also like