16
1. ALL DBMS QUESTIONS AND ANSWERS 2. 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. 3. What is DBMS? Ans: Database Management system is a collection of programs that enables user to create and maintain a database. Thus a DBMS is a general purposed s/w system that facilitates the process of defining constructing and manipulating a database for various applications. (Defining a data base involves specifying the data types, structures and constraints for the data to be stored in the data database. Constructing a data base is the process of storing data itself on some storage medium that is controlled by DBMS. Manipulating a database includes such functions as querying the data base to retrieve specific data, updating the database to reflect the changes in the mini-world. 4. What is a Catalog? Ans: A catalog is a table that contain the information such as structure of each file , the type and storage format of each data item and various constraints on the data . The information stored in the catalog is called Metadata . Whenever a request is made to access a particular data, the DBMS s/w refers to the catalog to determine the structure of the file. 5. What is data ware housing & OLAP? Ans: Data warehousing and OLAP (online analytical processing ) systems are the techniques used in many companies to extract and analyze useful information from very large databases for decision making . 6. What is real time database technology? Ans: These are all the techniques used in controlling industrial and manufacturing processes. 7. What is program-data independence? Ans: Unlike in the traditional file sys. the structure of the data files is stored in the DBMS catalog separately from the access programs . This property is called program-data independence.i.e. We needn’t to change the code of the DBMS if the structure of the data is changed .Which is not supported by traditional file sys . 8. What is ORDBMS? Ans: Object oriented RDBMS is a relational DBMS in which every thing is treated as objects. User can define operations on data as a part of the database definition. 9. What is program-operation independence? Ans: An operation is specified in two parts . 1. Interface (operation name and data types of its arguments). 2. Implementation (the code part) The implementation part can be changed without affecting the interface. This is called program-operation independence. 10. What is a view? 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 explicitly stored . 11. What is OLTP? Ans: Online transaction processing is an application that involve multiple database accesses from different parts of the world . OLTP needs a multi-user DBMS s/w to ensure that concurrent transactions operate correctly. 12. 11. What is the job of DBA? Ans: A database administrator is a person or a group responsible for authorizing access to the database, for coordinating and monitoring its use, and for acquiring s/w and h/w resources as needed. 13. Who are db designer? 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. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

1. ALL DBMS QUESTIONS AND ANSWERS 2. 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.

3. What is DBMS? Ans: Database Management system is a collection of programs that enables user to create and maintain a database. Thus a DBMS is a general purposed s/w system that facilitates the process of defining constructing and manipulating a database for various applications. (Defining a data base involves specifying the data types, structures and constraints for the data to be stored in the data database. Constructing a data base is the process of storing data itself on some storage medium that is controlled by DBMS. Manipulating a database includes such functions as querying the data base to retrieve specific data, updating the database to reflect the changes in the mini-world.

4. What is a Catalog? Ans: A catalog is a table that contain the information such as structure of each file , the type and storage format of each data item and various constraints on the data . The information stored in the catalog is called Metadata . Whenever a request is made to access a particular data, the DBMS s/w refers to the catalog to determine the structure of the file.

5. What is data ware housing & OLAP? Ans: Data warehousing and OLAP (online analytical processing ) systems are the techniques used in many companies to extract and analyze useful information from very large databases for decision making .

6. What is real time database technology? Ans: These are all the techniques used in controlling industrial and manufacturing processes.

7. What is program-data independence? Ans: Unlike in the traditional file sys. the structure of the data files is stored in the DBMS catalog separately from the access programs . This property is called program-data independence.i.e. We needn’t to change the code of the DBMS if the structure of the data is changed .Which is not supported by traditional file sys .

8. What is ORDBMS? Ans: Object oriented RDBMS is a relational DBMS in which every thing is treated as objects. User can define operations on data as a part of the database definition.

9. What is program-operation independence? Ans: An operation is specified in two parts . 1. Interface (operation name and data types of its arguments). 2. Implementation (the code part) The implementation part can be changed without affecting the interface. This is called program-operation independence.

10. What is a view? 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 explicitly stored .

11. What is OLTP? Ans: Online transaction processing is an application that involve multiple database accesses from different parts of the world . OLTP needs a multi-user DBMS s/w to ensure that concurrent transactions operate correctly.

12. 11. What is the job of DBA? Ans: A database administrator is a person or a group responsible for authorizing access to the database, for coordinating and monitoring its use, and for acquiring s/w and h/w resources as needed.

13. Who are db designer? 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 .

Page 2: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

14. What are different types of end users? Ans: 1. Casual end-users 2. Naive or parametric end users 3. Sophisticated end users 4. Stand alone users.

15. What are the advantages of using a dbms? Ans: 1. Controlling redundancy. 2. Restricting unauthorized access. 3. Providing persistent storage for program objects and data structures. 4. Permitting inferencing and actions using rules. 5. Providing multi-user interfaces. 6. Representing complex relationships among data. 7. Enforcing integrity constraints. 8. Providing backups and recovery.

16. What are the disadvantages of using a dbms? Ans: 1. High initial investments in h/w, s/w, and training. 2. Generality that a DBMS provides for defining and processing data. 3. Overhead for providing security, concurrency control, recovery, and integrity functions.

17. What is a data model? Ans: It is a collection of concepts that can be used to describe the structure of a database. It provides necessary means to achieve this abstraction. By structure of a database we mean the data types, relations, and constraints that should hold on the data.

18. What are different categories of data models? Ans: 1. High-level or conceptual data models. 2. Representational data models. 3. Low-level or physical data models. High level data models provide the concepts that are close to the way many users perceive data. Representational data models are provide concepts that provide the concepts that may be understood by end users but that are not too far removed from organization of data in the database. Physical data models describe the details of how data is stored in the computers.

19. What is schema? Ans: The description of a data base is called the database schema , which is specified during database design and is not expected to change frequently . A displayed schema is called schema diagram .We call each object in the schema as schema construct.

20. What are types of schema? Ans: 1. internal schema. 2. Conceptual schema. 3. External schemas or user views.

21. What is Data independency? Ans: Data independency is defined as the capacity to change the conceptual schema without having to change the schema at the next higher level. We can define two types of data independence: 1. Logical data independence. 2. Physical data independence. LDI is the capacity to change the conceptual schema without having to change external schemas or application programs. PDI is the capacity to change the internal schema without having to change conceptual (or external) schemas.

22. 21. What are different DBMS languages? Ans: 1. DDL (Data definition language)

Page 3: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

2. SDL (Storage definition language) 3. VDL (View definition language) 4. DML (Data manipulation language)

23. What are different types of DBMS? Ans: 1. DBMS 2. RDBMS (Relational) 3. ORDBMS (Object Relational) 4. DDBMS (Distributed) 5. FDBMS (Federated) 6. HDDBMS (Homogeneous) 7. HDBMS (Hierarchical) 8. NDBMS (Networked)

24. What is an entity? Ans: An entity is a thing in the real world with an independent existence.

25. What are attributes? Ans: These are the particular properties that describe an entity.

26. What are diff. types of attributes? Ans: 1. Composite Vs simple attributes. 2. Single valued Vs multi-valued attributes. 3. Stored Vs derived attribute. 4. Null valued attributes. 5. Complex attributes.

27. What is difference between entity set and entity type? 28. What is domain value or value set of an attribute?

Ans: It is the set of values that may be assigned to that attribute for each individual entities . 29. What is degree of a relationship?

Ans: The no of entities participating in that relation . 30. What is recursive relationship?

Ans: It is the relationship where both the participating entities belong to same entity type . 31. What are relationship constraints?

Ans: 1. Cardinality ratio. 2. Participation constraints.

32. 31. What is Cardinality ratio? Ans: The cardinality ratio for a binary relationship specifies the number of relationship instances that an entity can participate in.

33. What is a Participation constraint? Ans: The participation constraint specifies whether the existence of an entity depends on its being related to another entity via the relationship type. This is of two types: 1. Total participation. 2. Partial participation.

34. What is a weak entity types? Ans: The entity types that do not have key attributes of their own are called weak entity types. Rests are called strong entity types .The entity that gives identity to a weak entity is called owner entity. And the relationship is called identifying relationship. A weak entity type always has a total participation constraint with respect to its identifying relationship.

35. What is an ER Diagram? Ans: This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.

36. What is an EER? Ans: ==

37. What is specialization? Ans: It is the process of defining a set of subclasses of an entity type where each subclass

Page 4: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

contain all the attributes and relationships of the parent entity and may have additional attributes and relationships which are specific to itself.

38. What is generalization? Ans: It is the process of finding common attributes and relations of a number of entities and defining a common super class for them.

39. What are constraints on generalization and specialization? Ans: 1. disjoint ness constraints. 2. Completeness constraints. Disjointness constraint specifies that the subclasses of the specialization must be disjoint .i.e. an entity can be a member of at most one of the subclasses of the specialization. The reverse of it is overlapping. Completeness constraint is a participation constraint which may be 1. Total 2. Partial Total specialization constraint tells that each entity in the super class must be a member of some subclass in the specialization. And partial specialization constraint allows an entity not to belong to any of the subclasses .Thus we do have the following 4 types of constraints on specialization: 1. Disjoint, total 2. Disjoint, partial 3. Overlapping, total 4. Overlapping, partial

40. What is a ternary relationship? Ans: A relationship with a degree 3 is called a ternary relationship.

41. What is aggregation and association? Ans: Aggregation is an abstraction concept for building composite objects from their component objects. The abstraction of association is used to associate objects from several independent classes.

42. 41. What is RAID Technology? Ans: Redundant array of inexpensive (or independent) disks. The main goal of raid technology is to even out the widely different rates of performance improvement of disks against those in memory and microprocessor. Raid technology employs the technique of data striping to achieve higher transfer rates. 42. What is Hashing technique? Ans: This is a primary file organization technique that provides very fast access to records on certain search conditions. The search condition must be an equality condition on a single field, called hash field of the file. 1. Internal hashing 2. External hashing 3. Extendible hashing 4. Linear hashing 5. Partitioned hashing

43. What are different types of relational constraints? Ans: 1. Domain constraints 2. Key constraints 3. Entity integrity constraints 4. Referential integrity constraints Domain constraints specify that the value of each attribute must be an atomic value from the domain of the attributes. Key constraints tell that no two tuples can have the same combination of values for all their attributes. Entity integrity constraint states that no primary key value can be null. Referential integrity constraints states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation it is specified between two relations and is used to maintain the consistency among tuples of the two relations.

Page 5: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

44. What is difference between a super key, a key, a candidate key and a primary key? Ans: A super key specifies a uniqueness constrain that no two distinct tuples in a state can have the same value for the super key. Every relation has at least one default super key. A key is a minimal super key or the subset of the super key which is obtained after removing redundancy. A relation schema may have more than one key .In this case each key is called a candidate key. One of the candidate key with minimum number of attributes is chosen as primary key.

45. What is a foreign key? 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.

46. What is a transaction? Ans: A transaction is a logical unit of database processing that includes one or more database access operations.

47. What are the properties of transaction? Ans: 1. Atomicity 2. Consistency preservation 3. Isolation 4. Durability (permanence)

48. What are the basic data base operations? Ans: 1. Write_item(x) 2. Read_item(x)

49. What are the disadvantages of not controlling concurrency? Ans: 1. Lost update problem 2. Temporary update(Dirty read) problem 3. Incorrect summary problem

50. What are serial, non serial? Ans: A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule, otherwise, the schedule is called non-serial schedule.

51. 51. What are conflict serializable schedules? Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the same n transactions. 52. What is result equivalent? Ans: Two schedules are called result equivalent if they produce the same final state of the data base.

52. What are conflict equivalent schedules? Ans: Two schedules are said to be conflict equivalent if the order of any two conflicting operations is the same in both schedules.

53. What is a conflict serializable schedule? Ans: A schedule is called conflict serializable if it is conflict equivalent to some serial schedule.

54. What is view equivalence? Ans: Two schedules S and S’ are said to be view equivalent if the following three conditions hold : 1. Both S and S’ contain same set of transactions with same operations in them. 2. If any read operation read(x) reads a value written by a write operation or the original value of x the same conditions must hold in the other schedule for the same read(x) operation. 3. If an operation write1(y) is the last operation to write the value of y in schedule S then the same operation must be the last operation in schedule S’.

55. What is view serializable? Ans: A schedule is said to be view serializable if it is view equivalent with some serial schedule.

56. What are the various methods of controlling concurrency? Ans:

Page 6: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

1. Locking 2. Time stamp Locking data item to prevent multiple transactions from accessing the item concurrently. A time stamp is a unique identifier for each transaction, generated by the system.

57. What is a lock? 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.

58. What are various types of locking techniques? Ans: 1. a binary lock 2. Shared/Exclusive lock 3. Two phase locking

59. What is a binary lock? Ans: A binary lock can have two states or values: 1. locked (1) 2. unlocked(0) If locked it cannot be accessed by any other operations, else can be.

60. What is shared or exclusive lock? Ans: It implements multiple-mode lock. Allowing multiple accesses for read operations but exclusive access for write operation.

61. Explain two phase locking? Ans: All the locking operations must precede the first unlock operation in the transaction .It does have two phases: 1. expanding phase (Locks are issued) 2. Shrinking phase (Locks are released)

62. What are different types of two phase lockings (2pl)? Ans: 1. Basic 2. Conservative 3. Strict 4. Rigorous this is the basic technique of 2pl described above. Conservative 2pl requires a transaction to lock all the items it accesses before the transaction begins its execution, by pre-declaring it’s read-set and write-set. Strict 2pl guarantees that a transaction doesn’t release any of its exclusive locks until after it commits or aborts. Rigorous guarantees that a transaction doesn’t release any of its locks (including shared locks) until after it commits or aborts.

63. What is a deadlock? Ans: Dead lock 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. Hence each transaction is in a waiting queue, waiting for one of the other transactions to release the lock on them.

64. What are triggers? Ans: Triggers are the PL/SQL blocks defining an action the database should take when some database related event occurs. Triggers may be used to supplement declarative referential integrity, to enforce complex business rules, or to audit changes to data.

65. What is database?

66. A database is a collection of information that is organized. So that it can easily be accessed, managed, and updated.

67. What is DBMS?

68. DBMS stands for Database Management System. It is a collection of programs that enables user to create and

maintain a database.

69. What is a Database system?

70. The database and DBMS software together is called as Database system.

Page 7: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

71. What are the advantages of DBMS?

a. Redundancy is controlled.

b. Providing multiple user interfaces.

c. Providing backup and recovery

d. Unauthorized access is restricted.

e. Enforcing integrity constraints.

72. What is normalization?

73. It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary

key to achieve the properties

(1).Minimizing redundancy, (2). Minimizing insertion, deletion and update anomalies.

74. What is Data Model? A collection of conceptual tools for describing data, data relationships data semantics and constraints.

75. What is E-R model?

76. This data model is based on real world that consists of basic objects called entities and of relationship among

these objects. Entities are described in a database by a set of attributes.

77. What is Object Oriented model?

78. This model is based on collection of objects. An object contains values stored in instance variables with in the

object. An object also contains bodies of code that operate on the object. These bodies of code are called methods.

Objects that contain same types of values and the same methods are grouped together into classes.

79. What is an Entity? An entity is a thing or object of importance about which data must be captured.

80. What is DDL (Data Definition Language)?

81. A data base schema is specifies by a set of definitions expressed by a special language called DDL.

82. What is DML (Data Manipulation Language)?

83. This language that enable user to access or manipulate data as organised by appropriate data model. Procedural

DML or Low level: DML requires a user to specify what data are needed and how to get those data. Non-

Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to

get those data

84. What is DML Compiler?

85. It translates DML statements in a query language into low-level instruction that the query evaluation engine can

understand.

86. What is Query evaluation engine?

87. It executes low-level instruction generated by compiler.

88. What is Functional Dependency?

Page 8: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

89. Functional Dependency is the starting point of normalization. Functional Dependency exists when a relation

between two attributes allows you to uniquely determine the corresponding attribute’s value.

90. What is 1 NF (Normal Form)?

91. The first normal form or 1NF is the first and the simplest type of normalization that can be implemented in a

database. The main aims of 1NF are to:

92. Eliminate duplicative columns from the same table.

93. Create separate tables for each group of related data and identify each row with a unique column (the primary

key).

94. What is Fully Functional dependency?

95. 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.

96. What is 2NF?

97. 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.

98. What is 3NF?

99. A relation is in third normal form if it is in Second Normal Form and there are no functional (transitive)

dependencies between two (or more) non-primary key attributes.

100. What is BCNF (Boyce-Codd Normal Form)?

101. A table is in Boyce-Codd normal form (BCNF) if and only if it is in 3NF and every determinant is a candidate key.

102. What is 4NF?

103. Fourth normal form requires that a table be BCNF and contain no multi-valued dependencies.

104. What is 5NF?

105. A table is in fifth normal form (5NF) or Project-Join Normal Form (PJNF) if it is in 4NF and it cannot have a

lossless decomposition into any number of smaller tables.

106. What is a query?

107. A query with respect to DBMS relates to user commands that are used to interact with a data base.

108. What is meant by query optimization?

109. The phase that identifies an efficient execution plan for evaluating a query that has the least estimated cost is

referred to as query optimization.

110. What is an attribute? It is a particular property, which describes the entity.

111. What is RDBMS?

Page 9: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

112. Relational Data Base Management Systems (RDBMS) are database management systems that maintain data

records and indices in tables.

113. What’s difference between DBMS and RDBMS?

114. DBMS provides a systematic and organized way of storing, managing and retrieving from collection of logically

related information. RDBMS also provides what DBMS provides but above that it provides relationship integrity.

115. What is SQL?

116. SQL stands for Structured Query Language. SQL is an ANSI (American National Standards Institute) standard

computer language for accessing and manipulating database systems. SQL statements are used to retrieve and

update data in a database.

117. What is Stored Procedure?

118. A stored procedure is a named group of SQL statements that have been previously created and stored in the server

database.

119. What is a view?

120. 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 explicitly stored.

121. What is Trigger?

122. A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs.

123. What is Index?

124. An index is a physical structure containing pointers to the data.

125. What is extension and intension?

126. Extension -It is the number of tuples present in a table at any instance. This is time dependent.

127. Intension -It is a constant value that gives the name, structure of table and the constraints laid on it.

128. What do you mean by atomicity and aggregation?

129. Atomicity-Atomicity states that database modifications must follow an “all or nothing” rule. Each transaction is

said to be “atomic.” If one part of the transaction fails, the entire transaction fails.

130. Aggregation - A feature of the entity relationship model that allows a relationship set to participate in another

relationship set. This is indicated on an ER diagram by drawing a dashed box around the aggregation.

131. What is RDBMS KERNEL?

132. Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which

consists of the system- level data structures used by the kernel to manage the database.

133. Name the sub-systems of a RDBMS?

134. I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution

Control, Transaction Control, Memory Management, Lock Management.

Page 10: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

135. How do you communicate with an RDBMS?

136. You communicate with an RDBMS using Structured Query Language (SQL)

137. Disadvantage in File Processing System?

i. Data redundancy & inconsistency.

ii. Difficult in accessing data.

iii. Data isolation.

iv. Data integrity.

v. Concurrent access is not possible.

vi. Security Problems.

138. What is VDL (View Definition Language)?

139. It specifies user views and their mappings to the conceptual schema.

140. What is SDL (Storage Definition Language)?

141. This language is to specify the internal schema. This language may Specify the mapping between two schemas.

142. Describe concurrency control?

143. Concurrency control is the process managing simultaneous operations against a database so that database integrity

is no compromised. There are two approaches to concurrency control.

144. The pessimistic approach involves locking and the optimistic approach involves versioning.

145. Describe the difference between homogeneous and heterogeneous distributed database?

146. A homogenous database is one that uses the same DBMS at each node. A heterogeneous database is one that may

have a different DBMS at each node.

147. What is a distributed database?

148. A distributed database is a single logical database that is spread across more than one node or locations that are all

connected via some communication link.

149. Explain the difference between two and three-tier architectures?

150. Three-tier architecture includes a client and two server layers.

151. The application code is stored on the application server and the database is stored on the database server. A two-

tier architecture includes a client and one server layer. The database is stored on the database server.

152. Briefly describe the three types of SQL commands?

153. Data definition language commands are used to create, alter, and drop tables. Data manipulation commands are

used to insert, modify, update, and query data in the database. Data control language commands help the DBA to

control the database.

154. List some of the properties of a relation?

155. Relations in a database have a unique name and no multivalued attributes exist. Each row is unique and each

attribute within a relation has a unique name. The sequence of both columns and rows is irrelevant.

Page 11: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

156. Explain the differences between an intranet and an extranet?

157. An Internet database is accessible by everyone who has access to a Web site. An intranet database limits access to

only people within a given organization.

158. What is SQL Deadlock?

159. Deadlock is a unique situation in a multi user system that causes two or more users to wait indefinitely for a locked

resource.

160. What is a Catalog?

161. A catalog is a table that contains the information such as structure of each file, the type and storage format of each

data item and various constraints on the data .The information stored in the catalog is called Metadata.

162. What is data ware housing & OLAP?

163. Data warehousing and OLAP (online analytical processing) systems are the techniques used in many companies to

extract and analyze useful information from very large databases for decision making .

164. Describe the three levels of data abstraction?

165. Physical level: The lowest level of abstraction describes how data are stored.

166. Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship

among those data.

167. View level: The highest level of abstraction describes only part of entire database.

168. What is Data Independence?

169. Data independence means that the application is independent of the storage structure and access strategy of data.

170. How many types of relationship exist in database designing?

171. There are three major relationship models:-

172. One-to-one

173. One-to-many

174. Many-to-many

175. What is order by clause?

176. ORDER BY clause helps to sort the data in either ascending order to descending

177. What is the use of DBCC commands?

178. DBCC stands for database consistency checker. We use these commands to check the consistency of the

databases, i.e., maintenance, validation task and status checks.

179. What is Collation?

180. Collation refers to a set of rules that determine how data is sorted and compared.

Page 12: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

181. What is difference between DELETE & TRUNCATE commands?

182. Delete command removes the rows from a table based on the condition that we provide with a WHERE clause.

Truncate will actually remove all the rows from a table and there will be no data in the table after we run the

truncate command.

183. What is Hashing technique?

184. This is a primary file organization technique that provides very fast access to records on certain search conditions.

185. What is a transaction?

186. A transaction is a logical unit of database processing that includes one or more database access operations.

187. What are the different phases of Transaction?

188. Analysis phase

189. Redo phase

190. Undo phase

191. What is “transparent dbms”?

192. It is one, which keeps its physical structure hidden from user.

193. What are the primitive operations common to all record management System?

194. Addition, deletion and modification.

195. Explain the differences between structured data and unstructured data.

196. Structured data are facts concerning objects and events. The most important structured data are numeric, character,

and dates.

197. Structured data are stored in tabular form. Unstructured data are multimedia data such as documents, photographs,

maps, images, sound, and video clips. Unstructured data are most commonly found on Web servers and Web-

enabled databases.

198. What are the major functions of the database administrator?

199. Managing database structure, controlling concurrent processing, managing processing rights and responsibilities,

developing database security, providing for database recovery, managing the DBMS and maintaining the data

repository.

200. What is a dependency graph?

201. A dependency graph is a diagram that is used to portray the connections between database elements.

202. Explain the difference between an exclusive lock and a shared lock?

203. An exclusive lock prohibits other users from reading the locked resource; a shared lock allows other users to read

the locked resource, but they cannot update it.

204. Explain the "paradigm mismatch" between SQL and application programming languages.

Page 13: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

205. SQL statements return a set of rows, while an application program works on one row at a time. To resolve this

mismatch the results of SQL statements are processed as pseudofiles, using a cursor or pointer to specify which

row is being processed.

206. Name four applications for triggers.

207. (1)Providing default values, (2) enforcing data constraints,

208. (3) Updating views and (4) enforcing referential integrity

209. What are the advantages of using stored procedures?

210. The advantages of stored procedures are (1) greater security, (2) decreased network traffic, (3) the fact that SQL

can be optimized and (4) code sharing which leads to less work, standardized processing, and specialization among

developers.

211. Explain the difference between attributes and identifiers.

212. Entities have attributes. Attributes are properties that describe the entity's characteristics. Entity instances have

identifiers. Identifiers are attributes that name, or identify, entity instances.

213. What is Enterprise Resource Planning (ERP), and what kind of a database is used in an ERP application?

214. Enterprise Resource Planning (ERP) is an information system used in manufacturing companies and includes

sales, inventory, production planning, purchasing and other business functions. An ERP system typically uses a

multiuser database.

215. Describe the difference between embedded and dynamic SQL?

216. Embedded SQL is the process of including hard coded SQL statements. These statements do not change unless the

source code is modified. Dynamic SQL is the process of generating SQL on the fly.The statements generated do

not have to be the same each time.

217. Explain a join between tables

218. A join allows tables to be linked to other tables when a relationship between the tables exists. The relationships are

established by using a common column in the tables and often uses the primary/foreign key relationship.

219. Describe a subquery.

220. A subquery is a query that is composed of two queries. The first query (inner query) is within the WHERE clause

of the other query (outer query).

221. Compare a hierarchical and network database model?

222. The hierarchical model is a top-down structure where each parent may have many children but each child can have

only one parent. This model supports one-to-one and one-to-many relationships.

223. The network model can be much more flexible than the hierarchical model since each parent can have multiple

children but each child can also have multiple parents. This model supports one-to-one, one-to-many, and many-

to-many relationships.

224. Explain the difference between a dynamic and materialized view.

225. A dynamic view may be created every time that a specific view is requested by a user. A materialized view is

created and or updated infrequently and it must be synchronized with its associated base table(s).

Page 14: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

226. Explain what needs to happen to convert a relation to third normal form.

227. First you must verify that a relation is in both first normal form and second normal form. If the relation is not, you

must convert into second normal form. After a relation is in second normal form, you must remove all transitive

dependencies.

228. Describe the four types of indexes?

229. A unique primary index is unique and is used to find and store a row. A nonunique primary index is not unique and

is used to find a row but also where to store a row (based on its unique primary index). A unique secondary index

is unique for each row and used to find table rows. A nonunique secondary index is not unique and used to find

table rows.

230. Explain minimum and maximum cardinality?

231. Minimum cardinality is the minimum number of instances of an entity that can be associated with each instance of

another entity. Maximum cardinality is the maximum number of instances of an entity that can be associated with

each instance of another entity.

232. What is deadlock? How can it be avoided? How can it be resolved once it occurs?

233. Deadlock occurs when two transactions are each waiting on a resource that the other transaction holds. Deadlock

can be prevented by requiring transactions to acquire all locks at the same time; once it occurs, the only way to

cure it is to abort one of the transactions and back out of partially completed work.

234. Explain what we mean by an ACID transaction.

235. An ACID transaction is one that is atomic, consistent, isolated, and durable. Durable means that database changes

are permanent. Consistency can mean either statement level or transaction level consistency. With transaction level

consistency, a transaction may not see its own changes.Atomic means it is performed as a unit.

236. Under what conditions should indexes be used?

237. Indexes can be created to enforce uniqueness, to facilitate sorting, and to enable fast retrieval by column values. A

good candidate for an index is a column that is frequently used with equal conditions in WHERE clauses.

238. What is difference between SQL and SQL SERVER?

239. SQL is a language that provides an interface to RDBMS, developed by IBM. SQL SERVER is a RDBMS just like

Oracle, DB2.

240. What is Specialization?

241. 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.

242. What is generalization?

243. It is the process of finding common attributes and relations of a number of entities and defining a common super

class for them.

244. What is meant by Proactive, Retroactive and Simultaneous Update?

245. Proactive Update: The updates that are applied to database before it becomes effective in real world.

246. Retroactive Update: The updates that are applied to database after it becomes effective in real world.

247. Simultaneous Update: The updates that are applied to database at the same time when it becomes effective in real

world.

Page 15: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database

248. What is RAID Technology?

249. Redundant array of inexpensive (or independent) disks. The main goal of raid technology is to even out the widely

different rates of performance improvement of disks against those in memory and microprocessor. Raid

technology employs the technique of data striping to achieve higher transfer rates.

250. What are serial, non serial schedule?

251. A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed

consecutively in the schedule, otherwise, the schedule is called non-serial schedule.

252. What are conflict serializable schedules?

253. A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the same n transactions.

254. What is view serializable?

255. A schedule is said to be view serializable if it is view equivalent with some serial schedule.

256. What is a foreign key?

257. 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.

258. What are the disadvantages of using a dbms?

1. High initial investments in h/w, s/w, and training.

2) Generality that a DBMS provides for defining and processing data.

3) Overhead for providing security, concurrency control, recovery, and integrity

functions.

259. What is Lossless join property? It guarantees that the spurious tuple generation does not occur with respect to relation schemas after

decomposition.

260. 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.

261. 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.

262. What is schema? The description of a data base is called the database schema , which is specified during database design and is not

expected to change frequently . A displayed schema is called schema diagram .We call each object in the schema

as schema construct.

Page 16: 1. ALL DBMS QUESTIONS AND ANSWERS 1.What is a Database