Monday, June 15, 2020

DBMS Interview Questions & Answers

Question 1. What Is A Dbms?

Answer : DBMS stands for Database Management System. A DBMS receives requests from applications and translates those requests into actions on a specific database. A DBMS processes SQL statements or uses other functionality to create process and administer databases.

Question 2. What Is Relationship Set?

Answer : The collection (or set) of similar relationships.

Question 3. What Is Relationship Type?

Answer : Relationship type defines a set of associations or a relationship set among a given set of entity types.

Question 4. What Is Degree Of Relationship Type?

Answer : It is the number of entity type participating.

Question 5. What Is Ddl (data Definition Language)?

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

Question 6. What Is Vdl (view Definition Language)?

Answer :

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

Question 7. What Is Sdl (storage Definition Language)?

Answer : This language is to specify the internal schema. This language may specify the mapping between two schemas.

Question 8. What Is Data Storage - Definition Language?

Answer : The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language.

Question 9. What Is Dml (data Manipulation Language)?

Answer : This language that enable user to access or manipulate data as organised by appropriate data model.
1. Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data.
2. Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.

Question 10. What Is Dml Compiler?

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

Question 11. What Is Query Evaluation Engine?

Answer : It executes low-level instruction generated by compiler.

Question 12. What Is Ddl Interpreter?

Answer : It interprets DDL statements and record them in tables containing metadata.

Question 13. What Is Record-at-a-time?

Answer : The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time.

Question 14. What Is Set-at-a-time Or Set-oriented?

Answer : The High level or Non-procedural DML can specify and retrieve many records in a single DML statement. This retrieve of a record is said to be Set-at-a-time or Set-oriented.

Question 15. What Is Relational Algebra?

Answer : It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation.

Question 16. What Is Relational Calculus?

Answer : It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL.

Question 17. How Does Tuple-oriented Relational Calculus Differ From Domain-oriented Relational Calculus?

Answer :

1. The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. E.g. QUEL

2. The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. E.g. ILL, DEDUCE.

 Question 18. What Is Normalization?

Answer : 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.

Question 19. What Is Functional Dependency?

Answer : 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 ti and t2 in r if tl[XJ = t2[Xj then they have tl[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component V.

Question 20. What Is Lossless Join Property?

Answer : It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition.

Question 21. What Is 1 Nf (normal Form)?

Answer : The domain of attribute must include only atomic (simple, indivisible) values.

Question 22. What Is Fully Functional Dependency?

Answer : 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.

Question 23. What Is 2nf?

Answer : 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.

Question 24. What Is 3nf?

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

Question 25. What Is Bcnf (boyce-codd Normal Form)?

Answer : A relation schema R is in BCNF if it is in 3NF and satisfls an additional constraint that for every FD X A, X must be a candidate key.

Question 26. What Is 4nf?

Answer : 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.
1.) X is subset or equal to (or) XY = R.
2.) X is a super key.

Question 27. What Is 5nf?

Answer : 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 1.) Ri = R for some i.

Question 28. What Is Domain-key Normal Form?

Answer : 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.

Question 29. What Is System Catalog Or Catalog Relation? How Is Better Known As?

Answer : 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.

Question 30. What Is Meant By Query Optimization?

Answer : The phase that identifies an efficient execution plan for evaluating a query that has the least estimated cost is referred to as query optimization.

Question 31. What Is Durability In Dbms?

Answer : 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.

Question 32. What Do You Mean By Atomicity And Aggregation?

Answer :

1. 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.
2. 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.

Question 33. What Is A Phantom Deadlock?

Answer : 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.

DBMS+RDBMS Interview Questions

Question 34. What Is A Checkpoint And When Does It Occur?

Answer : 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.

Question 35. What Are The Different Phases Of Transaction?

Answer : Different phases are
1.) Analysis phase,
2.) Redo Phase,
3.) Undo phase.

Question 36. What Do You Mean By Flat File Database?

Answer : 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.

Question 37. What Is "transparent Dbms"?

Answer : It is one, which keeps its Physical Structure hidden from user.

Question 38. What Is A Query?

Answer : 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.

Question 39. What Do You Mean By Correlated Subquery?

Answer : 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.

Example:

Select’ From CUST Where ‘10/03/1990’ IN (Select ODATE From ORDER Where CUST.CNUM = ORDER.CNUM)

Question 40. What Are The Unary Operations In Relational Algebra?

Answer : PROJECTION and SELECTION.

Question 41. Are The Resulting Relations Of Product And Join Operation The Same?

Answer : No.
PRODUCT: Concatenation of every row in one relation with every row in another.
JOIN: Concatenation of rows from one relation and related rows from another.

Question 42. What Is Rdbms Kernel?

Answer : 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 You might think of an RDBMS as an operating system (or set of subsystems), designed specifically for controlling data access; its primary functions are storing, retrieving, and securing data. An RDBMS maintains its own list of authorized users and their associated privileges; manages memory caches and paging; controls locking for concurrent resource usage; dispatches and schedules user requests; and manages space usage within its table-space structures.

Question 43. Name The Sub-systems Of A Rdbms?

Answer : I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution Control, Transaction Control, Memory Management, Lock Management.

Question 44. Which Part Of The Rdbms Takes Care Of The Data Dictionary? How?

Answer : Data dictionary is a set of tables and database objects that is stored in a special area of the database and maintained exclusively by the kernel.

Question 45. What Is The Job Of The Information Stored In Data-dictionary?

Answer : The information in the data dictionary validates the existence of the objects, provides access to them, and maps the actual physical storage location.

Question 46. How Do You Communicate With An Rdbms?

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

Question 47. Define Sql And State The Differences Between Sql And Other Conventional Programming Languages?

Answer : SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements specify what data operations should be performed rather than how to perform them.

Question 48. Name The Three Major Set Of Files On Disk That Compose A Database In Oracle?

Answer : There are three major sets of files on disk that compose a database. All the files are binary. These are
1.) Database files
2.) Control files
3.) Redo logs
The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself. All three sets of files must be present, open, and available to Oracle for any data on the database to be useable. Without these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a backup, if there is one.

Question 49. What Is Database Trigger?

Answer : A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can e defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which you can define database triggers. A database trigger can call database procedures that are also written in PL/SQL.

Question 50. What Are Stored-procedures? And What Are The Advantages Of Using Them?

Answer : Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic.

Question 51. What Is Storage Manager?

Answer : It is a program module that provides the interface between the low-level data stored in database, application programs and queries submitted to the system.

Question 52. What Is Buffer Manager?

Answer : It is a program module, which is responsible for fetching data from disk storage into main memory and deciding what data to be cache in memory.

Question 53. What Is Transaction Manager?

Answer : It is a program module, which ensures that database, remains in a consistent state despite system failures and concurrent transaction execution proceeds without conflicting.

Question 54. What Is File Manager?

Answer : It is a program module, which manages the allocation of space on disk storage and data structure used to represent information stored on a disk.

Question 55. What Is Authorization And Integrity Manager?

Answer : It is the program module, which tests for the satisfaction of integrity constraint and checks the authority of user to access data.

Question 56. What Are Stand-alone Procedures?

Answer : Procedures that are not part of a package are known as stand-alone because they independently defined. A good example of a stand-alone procedure is one written in a SQL*Forms application. These types of procedures are not available for reference from other Oracle tools. Another limitation of stand-alone procedures is that they are compiled at run time, which slows execution.

Question 57. What Are Cursors Give Different Types Of Cursors?

Answer : PL/SQL uses cursors for all database information accesses statements. The language supports the use two types of cursors

1.)   Implicit

2.)   Explicit

Question 58. What Is Cold Backup And Hot Backup (in Case Of Oracle)?

Answer :

1. Cold Backup: It is copying the three sets of files (database files, redo logs, and control file) when the instance is shut down. This is a straight file copy, usually from the disk directly to tape. You must shut down the instance to guarantee a consistent copy. If a cold backup is performed, the only option available in the event of data file loss is restoring all the flies from the latest backup. All work performed on the database since the last backup is lost.

2. Hot Backup: Some sites (such as worldwide airline reservations systems) cannot shut down the database while making a backup copy of the files. The cold backup is not an available option. What is meant by Proactive, Retroactive and Simultaneous Update. Proactive Update: The updates that are applied to database before it becomes effective in real world. Retroactive Update: The updates that are applied to database after it becomes effective in real world. Simultaneous Update: The updates that are applied to database at the same time when it becomes effective in real world.

Question 59. What Are Data And Information, And How Are They Related In A Database?

Answer : Data is recorded facts and figures, and information is knowledge derived from data. A database stores data in such a way that information can be created.

Question 60. What Is Enterprise Resource Planning (erp), And What Kind Of A Database Is Used In An Erp Application?

Answer : 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.

Question 61. Why Is A Database Considered To Be "self-describing"?

Answer : In addition to the users’ data, a database contains a description of its own structure. This descriptive data is called “metadata.”

Question 62. Who Is E.f. Codd, And Why Is He Significant In The Development Of Modern Database Systems?

Answer : While working at IBM, E.F. Codd created the relational database model. A paper he published in 1970 presented his ideas to the world at large. His work is the foundation for most of the DBMSs currently in use, and thus forms the basis for database systems as we know and use them today.

Question 63. What Is Sql, And Why Is It Important?

Answer : SQL stands for Structured Query Language, and is the most important data processing language in use today. It is not a complete programming language like Java or C#, but a data sublanguage used for creating and processing database data and metadata. All DBMS products today use SQL.

Question 64. Write An Sql Select Statement To Display All The Columns Of The Student Table But Only Those Rows Where The Grade Column Is Greater Than Or Equal To 90?

Answer : SELECT * FROM STUDENT WHERE Grade >= 90;

Question 65. Name And Briefly Describe The Five Sql Built-in Functions?

Answer : COUNT: computes the number of rows in a table. SUM: totals numeric columns. AVG: computes the average value. MAX: obtains the maximum value of a column in a table. MIN: obtains the minimum value of a column in a table.

Question 66. Write An Sql Select Statement To Count The Number Of Rows In Student Table And Display The Result With The Label Num Students?

Answer : SELECT COUNT(*) AS NumStudents FROM STUDENT;

Question 67. What Is An Sql Subquery?

Answer : An SQL subquery is a means of querying two or more tables at the same time. The subquery itself is an SQL SELECT statement contained within the WHERE clause of another SQL SELECT statement, and separated by being enclosed in parenthesis. Some subqueries have equivalent SQL join structures, but correlated subqueries cannot be duplicated by a join..

Question 68. Discuss The Alternative Terminology That Is Used In The Relational Model?

Answer : Relations are also called tables, and sometimes by the older data processing term files. A row is known as a tuple in the relational model, but may also be referred to as a record. Finally, relational model attributes are known as table columns and sometimes as fields.

Question 69. Why Are Functional Dependencies Not Equations?

Answer : Equations deal with numerical relationships. A functional dependency deals with the existence of a determinant relationship between attributes, regardless of whether or not there is a numerical relationship between them. Thus, if we know that there is no hot water every Wednesday, No-Hot-Water is functionally dependent on Wednesday. So, if we know it is Wednesday, then we know we will have No-Hot-Water. This is a functional dependency, but not an equation.

Question 70. What Is A Foreign Key, And What Is It Used For?

Answer : A foreign key is used to establish relationships among relations in the relational model. Technically, a foreign key is a column (or columns) appearing in one relation that is (are) the primary key of another table. Although there may be exceptions, the values in the foreign key columns usually must correspond to values existing in the set of primary key values. This correspondence requirement is created in a database using a referential integrity constraint on the foreign key.

Question 71. What Are Insertion And Deletion Anomalies?

Answer : A deletion anomaly occurs when, by deleting the facts about one entity, we in advertently delete facts about another entity; with one deletion, we lose facts about two entities. For example, if we delete the tuple for Student 001289 from a table, we may lose not only the fact that Student 001289 is in Pierce Hall, but also the fact that he has $200 left in his security deposit. An insertion anomaly happens when we encounter the restriction that we cannot insert a fact about one entity until we have an additional fact about another entity. For example, we want to store the fact that the security deposit for Pierce Hall is $300, but we cannot enter this data into the Student relation until a student registers for Pierce Hall.

Question 72. You Have Been Given A Set Of Tables With Data And Asked To Create A New Database To Store Them. When You Examine The Data Values In The Tables, What Are You Looking For?

Answer :

Multivalued dependencies,

Functional dependencies,

Candidate keys,

Primary keys and

Foreign keys.

Question 73. Why Do Normalized Tables Require More Complex Sql When Sql Statements Are Used In Application Programs?

Answer : Tables that are normalized contain data that has been distributed among the tables, but which may need to be recombined to answer queries from an application. To recombine the data, the programmer will have to use subqueries and/or joins. These SQL structures are more complex to write than a simple SELECT statement.

Question 74. What Is The Inconsistent Values Problem? Include An Example Not Used In The Text?

Answer : The inconsistent values problem occurs when different users or data sources use slightly different forms of the same data value. One example is where automobiles are specified as “Ford, 2-door, Red” in one cell and “Red Ford 2-door’ in another.

Question 75. Explain The Relationship Between Entity, Entity Class, And Entity Instance?

Answer : An entity is something that can be identified in the users’ work environment, something that the users want to track. Entities of a given type are grouped into entity classes. An entity instance is the representation of a particular entity.

Question 76. Explain The Difference Between Attributes And Identifiers?

Answer : 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.

Question 77. Name And Describe Three Types Of Binary Relationships?

Answer :

1:1 - a single entity instance of one type is related to a single-entity instance of another type.
1:N - a single entity instance of one type is related to many-entity instances of another type.
M:N - many-entity instances of one type relate to many-entity instances of another type.

Question 78. What Are The Steps For Transforming An Entity Into A Table?

Answer : The steps are:

1.     specify the primary key,

2.     specify candidate keys,

3.     specify column properties including null status, data type, default value (if any), and data constraints (if any), and

4.     verifying normalization.

Question 79. Define A Surrogate Key, Describe The Ideal Primary Key And Explain How Surrogate Keys Meet This Ideal?

Answer : The ideal primary key is short, numeric and fixed. A surrogate key is a unique, DBMS-supplied identifier intended to be used as the primary key of a table. Further, the DBMS will not allow the value of a surrogate key to be changed. The values of a surrogate key have no meaning to the users and are usually hidden on forms and reports. By design, they are short, numeric and fixed and thus meet the definition of the ideal primary key.

Question 80. Define And Discuss Data Constraints?

Answer : Data constraints on a column are the limits put on the values the data can have.

There are four types of data constraints:

1.     domain constraints, which define a limited set of values for the column,

2.     range constraints, which specify that the values must fall within a certain range,

3.     intrarelation constraints, which define what values the column can have based on values of other columns in the same table, and

4.     interrelation constraints, which define values the column can have based on values of columns in other tables.

Question 81. In General, How Are Recursive Relationships Handled In A Database Design?

Answer : A recursive relationship is a relationship among entities of the same class, and is represented in the same way as other relationships are. The rows of the tables can take two different roles, however. Some are parent rows, and others are child rows. Further, the table will contain both its own primary key and the foreign key that links back to the table itself. If a row has no parent, then the value of the foreign key column in that row will be null. If the row has a parent, then there must be a foreign key value in that row that corresponds to the primary key value of another row in the table.

Question 82. What Is A Cascading Update?

Answer : Referential integrity constraints require that foreign key values in one table correspond to primary key values in another. If the value of the primary key is changed -- that is, updated -- the value of the foreign key must immediately be changed to match it. Cascading updates will set this change to be done automatically by the DBMS whenever necessary.

Question 83. What Is A Sql View? Briefly Explain The Use Of Views?

Answer : A SQL view is a virtual table built from other tables or views.

Views are used to:

·       hide columns or rows,

·       the results of computed columns,

·       hide complicated SQL syntax,

·       layer built-in functions,

·       provide a level of indirection between application programs and tables,

·       assign different sets of processing permissions to tables, and

·       to assign different sets of triggers to the same table.

Question 84. Explain The "paradigm Mismatch" Between Sql And Application Programming Languages?

Answer : 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.

Question 85. Name Four Applications For Triggers?

Answer :

providing default values,

enforcing data constraints,

updating views and

enforcing referential integrity.

Question 86. What Are Stored Procedures, And How Do They Differ From Triggers?

Answer : A stored procedure is a program that is stored within the database and is compiled when used. They can receive input parameters and they can return results. Unlike triggers, their scope is database-wide; they can be used by any process that has permission to use the database stored procedure.

Question 87. What Are The Advantages Of Using Stored Procedures?

Answer : The advantages of stored procedures are:

greater security,

decreased network traffic,

the fact that SQL can be optimized and

code sharing which leads to less work, standardized processing, and specialization among developers.

Question 88. Why Is Database Redesign Necessary?

Answer : Database redesign is necessary for two reasons. First, redesign is necessary both to fix mistakes made during the initial database design. Second, redesign is necessary to adapt the database to changes in system requirements. Such changes are common because information systems and organizations do not just influence each other they create each other. Thus, new information systems cause changes in systems requirements.

Question 89. What Is The Difference Between Sql Server 2000 Complete And Differential Backups?

Answer : A complete backup makes a copy of the entire database. A differential backup makes a copy of the changes that have been made to the database since the last complete backup. A complete backup must be made before the first differential backup. Because differential backups are faster, they can be taken more frequently and the chance of data loss is reduced. Complete backups take longer but are slightly simpler to use for recovery.

Question 90. Explain The Meaning Of Each Of The Transaction Levels Supported By Sql Server?

Answer : The strictest isolation level is SERIALIZABLE. With it, SQL Server places a range lock on the rows that have been read. This level is the most expensive to use and should only be used when absolutely required. The next most restrictive level is REPEATABLE READ, which means SQL Server places and holds locks on all rows that are read. It is possible to make dirty reads by setting the isolation level to READ UNCOMMITTED, which is the least restrictive level. READ COMMITTED is the default isolation level.

Question 91. Explain The Difference Between The Sql Server 2000 Simple, Full, And Bulk-logged Recovery Models?

Answer : With the simple recovery model, no logging is done. The only way to recover a database is to restore the database to the last backup. With full recovery, all database changes are logged. With bulk-logged database recovery, all changes are logged except those that cause large log entries.

Question 92. What Is The Difference Between Sql Server 2000 Clustered And Nonclustered Indexes?

Answer : With a clustered index, the data are stored in the bottom level of the index and in the same order as that index. With a nonclustered index, the bottom level of an index does not contain data; it contains pointers to the data. For data retrieval, clustered indexes are faster than nonclustered indexes.

Question 93. What Triggers Does Sql Server 2000 Support?

Answer : SQL Server 2000 supports INSTEAD OF and AFTER triggers only. There is no SQL Server support for BEFORE triggers. A table may have one or more AFTER triggers for insert, update and delete actions; AFTER triggers may not be assigned to views. A view or table may have at most one INSTEAD OF trigger for each triggering action of insert, update or delete.

Question 94. What Is The Relationship Of Odbc, Ole Db, And Ado?

Answer : Developed first, the ODBC standard is for relational databases; while the OLE DB standard provides functionality for both relational and other databases. Finally, ADO was developed to provide easier access to OLE DB data for the non-object-oriented programmer.

Question 95. What Are The Three Types Of Data Sources Used With Odbc?

Answer : An ODBC file data source is a file that can be shared among database users. A ODBC system data source is one that is local to a single computer. A ODBC user data source is only available to the user who created It.

Question 96. What Disadvantage Of Odbc Does Ole Db Overcome?

Answer : By breaking the features and the functions of a DBMS into COM objects, OLE DB characteristic overcomes a major disadvantage of ODBC. With ODBC, a vendor must create an ODBC driver for almost all DBMS features and functions in order to participate in ODBC at all. This is a large task that requires a substantial initial investment. With OLE DB, however, a DBMS vendor can implement portions of their product.

Question 97. What Are To Goals Of Ole Db?

Answer :

The major goals of OLE DB are to:

Create object interfaces for DBMS functionality pieces;

Increase flexibility for developers and users;

provide an object interface over any type of data; and

do not force data to be converted or moved from where it is.

Question 98. In Ole Db, What Is The Difference Between An Interface And An Implementation?

Answer : An OLE DB interface is specified by a set of objects, and the properties and methods that they expose, and OLE DB defines standardized interfaces. An object need not expose all of its properties and methods in a given interface. An OLE DB implementation defines how the object supports the interface. The implementation is completely hidden from the user. Thus developers of an object are free to change the implementation whenever they want, but they should not change the interface without consulting their users.

Question 99. Why Is Xml A Better Markup Language Than Html?

Answer : XML is a better markup language than HTML, primarily because XML provides a clear separation between document structure, content, and materialization. Symbols cannot be used ambiguously with XML.

Question 100. What Are The Two Means To Describe The Content Of Xml Documents?

Answer : DTD (Document Type Declarations) and XML Schemas. An XML document that conforms to its DTD is called type-valid. A document can be well-formed and not be type-valid, either because it violates the structure of its DTD or because it has no DTD. However, DTD5 have limitations and to overcome these limits XML Schemas were created. XML Schemas are XML documents that are the preferred method for defining document structure.

Question 101. What Is The Difference Between Simple Elements And Complextype Elements?

Answer : Simple elements have only one data value. ComplexType elements can have multiple elements nested within them. ComplexTypes may also have attributes. The elements contained in a complexType may be simple or other complexTypes. ComplexTypes may also define element sequences.

Question 102. How Are Surrogate Keys And Metadata Handled In Mysql?

Answer : MySQL uses integer data types combined with the property AUTO_INCREMENT to create surrogate keys. This creates a sequence that starts at one (1) and increases by one (2) for each new record. MySql maintain its metadata in a database named mysql. For example, this database maintains two tables named user and db.

Question 103. What Is A Data Mart?

Answer : A data mart Is a collection of data smaller In scope and size than a data warehouse. It is dedicated to data from a particular business component of business functional area. A data mart may function as a subset of a larger data warehouse. Users of a data mart are usually knowledgeable analysts in the business area using the data mart.

Question 104. What Are The Functions Of A Reporting System?

Answer : A reporting system has three functions: 1. Report authoring -- connecting to data sources, creating the report structure and formatting the report. 2. Report management -- defining who receives which reports, when they receive them and how the reports are delivered. 3. Report delivery -- based on report management metadata, either pushing the reports to the recipients or allowing them to be pulled by the recipients.

Question 105. What Is Olap?

Answer : OnLine Analytical Processing (OLAP) is a Business Intelligence (BI) reporting system. OLAP provides the user with the capability to sum, count, average and do other simple arithmetic operations on groups of data. An OLAP report has measures and dimensions. Measures are the data values to be displayed. Dimensions are characteristics of the measures. OLAP reports are called OLAP cubes, although such reports are not limited to three dimensions.

Question 106. What Is Market Basket Analysis?

Answer : Market basket analysis is a data mining technique that determines which sets of products tend to be purchased together. A common technique uses conditional probabilities. In addition to the basic probability that an item will be purchased, three results are of particular interest:
Support -- the probability of two items being purchased together. Confidence -- the probability of a second item being purchased GIVEN that another item has been purchased. Lift -- calculated as confidence divided by a basic probability, this shows the likelihood of a second item being purchased IF an item is purchased.

Question 107. Explain The Differences Between Structured Data And Unstructured Data?

Answer : Structured data are facts concerning objects and events. The most important structured data are numeric, character, and dates. 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.

Question 108. Explain Why It Is Still Necessary To Have At Least Some Familiarity With File Processing Systems Even Though It Has Become Evident That Traditional File Processing Systems Have A Number Of Shortcomings And Limitations?

Answer : Many businesses still use file processing systems today. This is especially true in the creation of backups for a database system. In addition, if you understand some of the limitations of a file processing system such as program-data dependence, duplication of data, limited data sharing, lengthy development times, and excessive program maintenance, you can try and avoid them as you design and develop a databases.

Question 109. What Are Some Of The Disadvantages Associated With Conventional File Processing Systems?

Answer : There are five disadvantages. Program-data dependence occurs when file descriptions need to be changed in all programs whenever a file description changes. Duplication of data is storing the data more than one time. Limited data sharing occurs when the files are private so no one outside of one application can access the data. Lengthy development times exist because file processing systems takes longer to develop. Lastly, excessive program maintenance exists since the effort to maintain a program is larger in this environment.

Question 110. The Range Of Database Applications Can Be Divided Into Five Categories. Explain The Five Different Categories?

Answer : Databases can support from a single user (personal database) up to supporting the requests of the world (internet database). In between, a database can support a workgroup (a relatively small group of people), department database (a functional unit in an organization such as marketing), or an enterprise database (entire organization).

Question 111. Explain The Differences Of The Two Principal Types Of Packaged Data Models?

Answer : Universal data models are common to many organizations. These models may be useful for similar functions that are used across companies or organizations such as purchasing and accounting. Industry-specific data models are used by specific industries.

Question 112. Briefly Explain An Erd?

Answer : An ERD is a detailed logical representation of the data for an organization. The ERD includes entities, attributes, relationships, and cardinalities. An ERD is the mechanism where an entity-relationship model is displayed.

Question 113. List Some Of The Chrematistics Of Good Data Definitions?

Answer : Definitions are gathered from the same sources and should be accompanied diagrams. A definition will include special conditions, examples, how the data is created, whether the data can change, who owns the data, whether the data is optional, and whether the data can be broken into something more atomic.

Question 114. Explain Minimum And Maximum Cardinality?

Answer : 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.

Question 115. Why Is Modeling Time-dependent Data With A Time Stamp Important?

Answer : The values of data may change. A time stamp helps to ensure that the previous value of the data stays in the database after it has changed so that you can see the before and after values through time. Without a time stamp, you will most likely lose some of the history.

Question 116. Explain The Difference Between Total Specialization And Partial Specialization?

Answer : Total specialization exists when every instance of a supertype must also be an instance of a subtype. Partial specialization exists when every instance of a supertype does not have to be an instance of a subtype.

Question 117. Explain The Difference Between An Erd And Eer?

Answer : An EER includes everything in an ERD and an EER allows for more complex relationships than an ERD. An EER allows for object-oriented data modeling and include supertypes and subtypes entities and inheritance.

Question 118. Explain The Difference Between The Disjoint And Overlap Rule?

Answer : The disjoint rule states an entity instance of a supertype can only be a member of one subtype. The overlap rule states an entity instance of a supertype can be a member of multiple subtypes.

Question 119. List The Three Types Of Business Rules And Define Each Of Them?

Answer : A derivation is a statement that is derived from other knowledge. A structured assertion is a statement that expresses some aspect of the static structure of an organization. An action assertion is a statement of a constraint on the actions of an organization.

Question 120. Explain How A Scenario Is Used For Business Rules?

Answer : A scenario is used to test business rules. It is a short script that describes how a business reacts to certain situations.

Question 121. Explain Some Of The Main Goals Of Normalization?

Answer : Normalization should minimize data redundancy. It should also simplify referential integrity constraints. Normalization will also make it easier to insert, update, and delete data. And finally, it provides better design.

Question 122. List Some Of The Properties Of A Relation?

Answer : 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.

Question 123. Explain What Needs To Happen To Convert A Relation To Third Normal Form?

Answer : 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.

Question 124. Describe How A Supertype/ Subtype Relationship Is Mapped Into A Relation?

Answer : A separate relation is created for each supertype and subtype. The attributes common for all of the subtypes are assigned to the supertype. Each subtype has the primary key from the supertype assigned to it. A subtype discriminator is added to the supertype.

Question 125. Describe Domain Constraints?

Answer : Domain constraints include entity integrity and referential integrity. The domain is a set of values that may be assigned to an attribute. The entity integrity rule states that no part of a primary key cannot be null. Referential integrity states that each foreign key value must match a primary key value or be null.

Question 126. What Are The Four Objectives Of The Selection Of A Data Type?

Answer : A data type should be selected so that all possible values are represented using minimal storage space. The data type should help to ensure data integrity and support all possible data manipulations (i.e., cannot place a letter in a field such as salary where a number is required).

Question 127. Describe The Differences Between Vertical And Horizontal Portioning?

Answer : Horizontal portioning is where the rows in a relation are separated by some criteria and placed into a new relation or file with the same layout as the original relation (in this case only the records in each file differ). Vertical portioning is where the columns in a relation are separated by some criteria and placed into a new relation or file with a different layout as the original relation.

Question 128. Explain The Difference Between A Dynamic And Materialized View?

Answer : 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).

Question 129. Discuss Some Of The Techniques That Can Be Used To Tune Operational Performance?

Answer : Choosing primary and secondary keys can increase the speed of row selection, joining, and row ordering. Selecting the appropriate file organization for base tables and indexes can also improve performance. Clustering related rows together and maintaining statistics about tables and indexes can lead to increased efficiency.

Question 130. Briefly Describe The Three Types Of Sql Commands?

Answer : 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.

Question 131. What Are The Steps To Follow When Preparing To Create A Table?

Answer :

·       Identify the data type, length, and precision for each attribute.

·       Identify the columns that can accept a null value.

·       Identify the columns that need to be unique.

·       Identify primary and related foreign keys with the parent table being created before the child.

·       Determine default values.

·       Determine where the domain values are that need to be constrained.

·       Create the indexes.

Question 132. What Are Some Disadvantages Of A Standard Language Such As Sql?

Answer : A standard language can hinder the effort to create a new language. One standard is never enough to meet all of the business needs. A standard can be a compromise among interested parties which can cause the standard to not be ideal. If a standard is altered by some, than portability between platforms could be hurt.

Question 133. Describe And Contrast A Trigger And A Procedure?

Answer : Triggers are stored and controlled in the DBMS. A trigger is executed automatically when a condition is met (INSERT, UPDATE, or DELETE). A procedure is also stored in a database. A procedure is not executed automatically.

Question 134. Briefly Describe An Outer Join?

Answer : An outer join includes the records that match and those that do not have a matching value in another table. Outer joins can be a LEFT outer join (includes all records from the first table listed) or a RIGHT outer join (includes all records from the second table listed). Outer joins are not easily used with more than two tables.

Question 135. Describe A Subquery?

Answer : 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). In some cases the inner query provides results for the outer query to process. In other cases, the outer query results provide results for the inner query (correlated subquery).

Question 136. Describe The Difference Between Embedded And Dynamic Sql?

Answer : 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.

Question 137. Explain The Difference Between Two And Three-tier Architectures?

Answer : A three-tier architecture includes a client and two server layers. 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.

Question 138. Describe And Contrast Sql And Qbe?

Answer : QBE is a direct-manipulation database language that uses a graphical approach to query construction. Some database systems translate QBE queries into SQL. QBE does not adhere to a standard but SQL does. Both SQL and QBE are relational database languages.

Question 139. Describe Odbc?

Answer : ODBC is a standard that contains an interface that provides a common language for application programs to access and process SQL databases. In order to use ODBC, a driver, server name, database name, user id, and password are required. ODBC is important for Internet applications and has gained wide acceptance.

Question 140. Compare A Thin And A Fat Client?

Answer : A fat client is a PC that is responsible where most processing occurs on the client rather than the server. Some of the fat client activities include processing, presentation logic, and business rules logic. A thin client is a PC where only limited processing occurs. In these cases, more processing should occur on the application server.

Question 141. Describe Some Reasons That Someone Familiar With Microsoft Access Will Want To Learn Vba?

Answer : You can perform more complex functions and error handling can be accommodated by VBA. VBA code will execute faster since code runs faster than macros and maintenance is easier because VBA modules are stored with the forms and reports. Reading VBA is easier because you can see the entire code. Finally, you can pass parameters and use OLE automation better.

Question 142. Describe Middleware Applications That Ease The Connection Of Databases To Web Applications?

Answer : Both ASP and ColdFusion are middleware that ease the connection of databases to Web applications. Both require the use of several files. Both use tags and are executed on the server. Both Internet Explorer and Netscape can access these files. The programmer does not need to be concerned with the client when they work with this middleware.

Question 143. Describe Web Services?

Answer : Web Services are improving the ability of computers to communicate over the Internet. These services use XML programs and usually run in the background. Easier integration of applications may be possible because developers do not need to be familiar with the technical details with applications that are being integrated. UDDI is a technical specification for creating a distributed registry of Web services and businesses that are open to communicating through Web services.

Question 144. Provide An Overview Of Xml?

Answer : XML Is used to structure and manipulate data involved with a browser and is becoming the standard for ec ommerce. XML uses tags that are similar to HTML in that they use the angle brackets, but XML describes the content whereas HTML describes the appearance. The XML schema standard was published in May 2001 by W3C.

Question 145. Describe Website Security Issues?

Answer : Website security issues include unauthorized access to the several aspects of one’s Website. Security measures should include all aspects of the system such as the network, operating level, database, and Web server. Regular monitoring and security testing by a company should help to avoid intrusion into one’s system.

Question 146. Describe A Data Warehouse?

Answer : A data warehouse is organized around specific subjects. The data is defined using consistent naming, format, and encoding structure standards. The data contains a time element, so that the data can be studied for trends. No data in a data warehouse can be updated by end users.

Question 147. Explain Why An Information Gap Exists In Most Organizations?

Answer : One reason that an information gap exists is the fact that systems have been developed in separate, segmented efforts. This has helped the data from being stored in an integrated database and thus the data is in an inconsistent structure. The other reason for the gap is that most systems are created to support the operational aspect of an organization. The systems were not developed for decision making.

Question 148. Describe The Differences Between A Data Warehouse And Data Mart?

Answer : A data warehouse is for the enterprise and contains multiple subjects. A data mart is for a specific functional area and focuses on one subject. A data warehouse is flexible and data-oriented and contains detailed historical data. A data mart is restrictive and project-oriented and contains some historical data.

Question 149. Describe The Difference Between Data And Database Administration?

Answer : Data administration is responsible for the overall management of data resources. Some of the core roles include the creation of data polices, procedures and standards, resolve data ownership issues, and manage the information repository. Database administration is physical database oversight. Some of the core duties include the selection of the DBMS and software tools, the installation and upgrade of the DBMS, and database performance tuning.

Question 150. What Are Some Of The Important Security Features Of A Dbms?

Answer : One of the features includes the use of views which allows the presentation of only data needed by someone and limits the capability of database updates. The use of integrity controls includes such things as domains, assertions, and checks. Also authorization rules, user-defined procedures, encryption, authentication schemes, and backups are important.

Question 151. Describe Concurrency Control?

Answer : Concurrency control is the process managing simultaneous operations against a database so that database integrity is not compromised. There are two approaches to concurrency control. The pessimistic approach involves locking and the optimistic approach involves versioning.

Question 152. Explain Locking?

Answer : Locking is denying others the ability to update a record until someone completes the update or releases the record. Locking can occur on many different levels in a database. It can occur at the database, table, record, or field level. A lock can be shared (another can read the record while an update is in progress) or exclusive (no one can read the record while an update is in progress).

Question 153. Explain Issues For Database Performance?

Answer : The installation of the database is an important issue since the better the installation, the better the performance could be. Memory usage is learning how the DBMS uses main memory and then using that knowledge to enable better performance. I/O is usually very intense in a DB, so understanding how users will use the data will help to prepare the database better. CPU usage and application tuning are also important considerations.

Question 154. Explain Snapshot Replication?

Answer : Snapshot replication can be used when an application does not require that the data always be current. These applications can be updated by periodic table copying or snapshots. As part of the snapshot effort, all of the data to be included in the snapshot is collected at a primary point. Then a read-only snapshot is taken and the snapshot is sent to each site so that the update can be made.

Question 155. Explain Concurrency Transparency?

Answer : Concurrency transparency is where each transaction in a distributed database is treated as if it is the only one in the system. Therefore If several transactions are running at one time, the results will be the same as If each transaction was run in serial order. The transaction manager helps to provide concurrency control. The three methods that may be used are locking, versioning, and time stamping.

Question 156. What Is The Difference Between Horizontal And Vertical Partitioning?

Answer : Horizontal partitioning is where some rows of a table are placed into the base relations at one site and other rows are placed at another site. Vertical partitioning is where some columns of a table are placed into the base relations at one site and other columns are placed at another site but each all of these relations must share a common domain.

Question 157. What Is A Distributed Database?

Answer : 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. It requires multiple DBMSs, running at each remote site. A distributed database can be either homogenous (same DBMS at each node) or heterogeneous (different DBMS at some nodes).

Question 158. Describe The Difference Between Homogeneous And Heterogeneous Distributed Database?

Answer : A homogenous database is one that uses the same DBMS at each node. Either each node can work independently or a central DBMS may coordinate database activities. A heterogeneous database is one that may have a different DBMS at each node. It may support some or all of the functionality of one logical database. It may support full Distributed DBMS functionality or partial Distributed DBMS functionality.

Question 159. What Is Database?

Answer : A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

Question 160. What Is Dbms?

Answer : It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.

Question 161. What Is A Database System?

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

Question 162. Advantages Of Dbms?

Answer :

·       Redundancy is controlled.

·       Unauthorised access is restricted.

·       Providing multiple user interfaces.

·       Enforcing integrity constraints.

·       Providing backup and recovery.

Question 163. Disadvantage In File Processing System?

Answer :

·       Data redundancy & inconsistency.

·       Difficult in accessing data.

·       Data isolation.

·       Data integrity.

·       Concurrent access is not possible.

·       Security Problems.

Question 164. Describe The Three Levels Of Data Abstraction?

Answer :The are three levels of abstraction:

•Physical level: The lowest level of abstraction describes how data are stored.
• Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.

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

Question 165. Define The "integrity Rules"?

Answer : There are two Integrity rules.

• Entity Integrity: States that “Primary key cannot have NULL value”

• Referential Integrity: States that “Foreign Key can be either a NULL value or should be Primary Key value of other relation.

Question 166. What Is Extension And Intension?

Answer : Extension –

It is the number of tuples present in a table at any instance. This is time dependent.
Intension –

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

Question 167. What Is System R? What Are Its Two Major Subsystems?

Answer : System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center. It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system. Its two subsystems are

• Research Storage

• System Relational Data System.

Question 168. How Is The Data Structure Of System R Different From The Relational Structure?

Answer :Unlike Relational systems in System R

• Domains are not supported

• Enforcement of candidate key uniqueness is optional

• Enforcement of entity integrity is optional

• Referential integrity is not enforced

Question 169. What Is Data Independence?

Answer : Data independence means that “the application is independent of the storage structure and access strategy of data”. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level. Two types of Data Independence:

• Physical Data Independence: Modification in physical level should not affect the logical level.
• Logical Data Independence: Modification in logical level should affect the view level.

Question 170. What Is A View? How It Is Related To Data Independence?

Answer : A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary. Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence.

Question 171. What Is Data Model?

Answer : A collection of conceptual tools for describing data, data relationships data semantics and constraints.

Question 172. What Is E-r Model?

Answer : 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.

Question 173. What Is Object Oriented Model?

Answer :

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.

Question 174. What Is An Entity?

Answer : It is a 'thing' in the real world with an independent existence.

Question 175. What Is An Entity Type?

Answer : It is a collection (set) of entities that have same attributes.

Question 176. What Is An Entity Set?

Answer : It is a collection of all entities of particular entity type in the database.

Question 177. What Is An Extension Of Entity Type?

Answer : The collections of entities of a particular entity type are grouped together into an entity set.

Question 178. What Is Weak Entity Set?

Answer : An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.

Question 179. What Is An Attribute?

Answer : It is a particular property, which describes the entity.

Question 180. What Is A Relation Schema And A Relation?

Answer : A relation Schema denoted by R(A1, A2, …, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn).

Question 181. What Is Degree Of A Relation?

Answer : It is the number of attribute of its relation schema.

Question 182. What Is Relationship?

Answer : It is an association among two or more entities.

Question 183. What Do You Understand By Dependency Preservation?

Answer : Given a relation R and a set of FDs F, dependency preservation states that the closure of the union of the projection of F on each decomposed relation Ri is equal to the closure of F. i.e.,
((PR1(F)) U … U (PRn(F)))+ = F+

if decomposition is not dependency preserving, then some dependency is lost in the decomposition.

Question 184. How Can You Find The Minimal Key Of Relational Schema?

Answer : Minimal key is one which can identify each tuple of the given relation schema uniquely. For finding the minimal key it is required to find the closure that is the set of all attributes that are dependent on any given set of attributes under the given set of functional dependency.

Algo. I Determining X+, closure for X, given set of FDs F

1.     Set X+ = X

2.     Set Old X+ = X+

3.     For each FD Y Z in F and if Y belongs to X+ then add Z to X+

4.     Repeat steps 2 and 3 until Old X+ = X+

Algo.II Determining minimal K for relation schema R, given set of FDs F

1.     Set K to R that is making K a set of all attributes in R

2.     For each attribute A in K

3.    
a. Compute (K – A)+ with respect to F

b. If (K – A)+ = R then set K = (K – A)+

Question 185. What Are Armstrong Rules? How Do We Say That They Are Complete And/or Sound?

Answer :

The well-known inference rules for FDs
• Reflexive rule :
If Y is subset or equal to X then X Y.
• Augmentation rule:
If X Y then XZ YZ.
• Transitive rule:
If {X Y, Y Z} then X Z.
• Decomposition rule :
If X YZ then X Y.
• Union or Additive rule:
If {X Y, X Z} then X YZ.
• Pseudo Transitive rule :
If {X Y, WY Z} then WX Z.
Of these the first three are known as Amstrong Rules. They are sound because it is enough if a set of FDs satisfy these three. They are called complete because using these three rules we can generate the rest all inference rules.

Question 186. What Are Stored-procedures? And What Are The Advantages Of Using Them?

Answer : Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic.

Question 187. Name Two Utilities That Oracle Provides, Which Are Use For Backup And Recovery?

Answer : Along with the RDBMS software, Oracle provides two utilities that you can use to back up and restore the database. These utilities are Export and Import.

The Export utility dumps the definitions and data for the specified part of the database to an operating system binary file. The Import utility reads the file produced by an export, recreates the definitions of objects, and inserts the data.

If Export and Import are used as a means of backing up and recovering the database, all the changes made to the database cannot be recovered since the export was performed. The best you can do is recover the database to the time when the export was last performed.

Question 188. What Is Oracle Block? Can Two Oracle Blocks Have The Same Address?

Answer :

Oracle "formats" the database files into a number of Oracle blocks when they are first created—making it easier for the RDBMS software to manage the files and easier to read data into the memory areas.

The block size should be a multiple of the operating system block size. Regardless of the block size, the entire block is not available for holding data; Oracle takes up some space to manage the contents of the block. This block header has a minimum size, but it can grow. These Oracle blocks are the smallest unit of storage. Increasing the Oracle block size can improve performance, but it should be done only when the database is first created. Each Oracle block is numbered sequentially for each database file starting at 1. Two blocks can have the same block address if they are in different database files.

Question 189. What Is Rowid?

Answer : The ROWID is a unique database-wide physical address for every row on every table. Once assigned (when the row is first inserted into the database), it never changes until the row is deleted or the table is dropped.

The ROWID consists of the following three components, the combination of which uniquely identifies the physical storage location of the row.

• Oracle database file number, which contains the block with the rows
• Oracle block address, which contains the row
• The row within the block (because each block can hold many rows)
The ROWID is used internally in indexes as a quick means of retrieving rows with a particular key value. Application developers also use it in SQL statements as a quick way to access a row once they know the ROWID.

Question 190. What Are The Four Oracle System Processes That Must Always Be Up And Running For The Database To Be Useable?

Answer : The four Oracle system processes that must always be up and running for the database to be useable include DBWR (Database Writer), LGWR (Log Writer), SMON (System Monitor), and PMON (Process Monitor).

Question 191. What Is An Oracle Instance?

Answer : The Oracle system processes, also known as Oracle background processes, provide functions for the user processes—functions that would otherwise be done by the user processes themselves Oracle database-wide system memory is known as the SGA, the system global area or shared global area. The data and control structures in the SGA are shareable, and all the Oracle background processes and user processes can use them.

The combination of the SGA and the Oracle background processes is known as an Oracle instance.

Question 192. Name The Three Major Set Of Files On Disk That Compose A Database In Oracle?

Answer : There are three major sets of files on disk that compose a database. All the files are binary. These are
• Database files
• Control files
• Redo logs

The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself.

All three sets of files must be present, open, and available to Oracle for any data on the database to be useable. Without these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a backup, if there is one.

Question 193. Define Sql And State The Differences Between Sql And Other Conventional Programming Languages?

Answer : SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements specify what data operations should be performed rather than how to perform them.

Question 194. Name The Sub-systems Of A Rdbms?

Answer : I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution Control, Transaction Control, Memory Management, Lock Management.

Question 195. Which Part Of The Rdbms Takes Care Of The Data Dictionary? How?

Answer :

Data dictionary is a set of tables and database objects that is stored in a special area of the database and maintained exclusively by the kernel.

Question 196. What Are The Primitive Operations Common To All Record Management Systems ?

Answer : Addition, deletion and modification.

Question 197. What Is A Candidate Key?

Answer : candidate key is a column in a table which has the ability to become a primary key.

Question 198. What Is The Foreign Key?

Answer : A foreign key is a field in a table that refers to parent records in another table. The references are represented by the primary key values of the corresponding parent records. A foreign key field is the same data type as the primary key field of the referenced table. Usually, a foreign key field is named the same as the primary key field of the parent table. This very beneficial convention is called key migration in data modeling terminology. Child table foreign key references to parent table primary keys embody database relationships.

Question 199. What Is Union,union All?

Answer :

UNION retrieves a single set of rows and columns removing the duplicated row.

UNION ALL retrieves all the rows including duplication.

Question 200. Explain The Difference Between A Database Administrator And A Data Administrator?

Answer :

Database Administrator :- A person (or group of people) responsible for the maintenance and performance of a database and responsible for the planning, implementation, configuration, and administration of relational database management systems.

Data Administrator :- The individual or organization responsible for the specification, acquisition, and maintenance of data management software and the design, validation, and security of files or databases. The DA is in charge of the data dictionary and data model.

Question 201. Why Is It Important To Write To The Log Before Changing The Database Values?

Answer : The most important objective to write the log before the database is changed is if there is any need to rollback or rollforward any transaction then if the log are not present then the rollback rollforward cannot be done accurately.

Question 202. Define Rollback And Roll Forward?

Answer :

Rollback :- Undoing the changes made by a transaction before it commits or to cancel any changes to a database made during the current transaction.

RollForward :- Re-doing the changes made by a transaction after it commits or to overwrite the chnaged calue again to ensure consistency.

Question 203. Explain How A Database Could Be Recovered Via Reprocessing. Why Is This Generally Not Feasible?

Answer : If we reprocess the transaction then the database can be made to come to a state where the database is consistent and so reprocessing the log can recover the database. Reprocessing is not very feasible for a very simple reason that its very costly from time point of view and requires lots of rework and many transaction are even rollback giving more and more rework.

Question 204. Explain The Necessity Of Defining Processing Rights And Responsibilities. How Are Such Responsibilities Enforced?

Answer : One of the reason to define rights is the security in the database system. If any user is allowed to define the data or alter the data then the database would just be of no use and so processing rights and responsibilities are clearly defined in any database system. The resposibilities are enforced using the table space provided by the database system.

Question 205. Explain The Meaning Of The Expression Acid Transaction?

Answer : ACID means Atomic, Consistency, Isolation, Durability, so when any transaction happen it should be Atomic that is it should either be complete or fully incomplete. There should not be anything like Semi complete. The Database State should remain consistent after the completion of the transaction. If there are more than one Transaction then the transaction should be scheduled in such a fashion that they remain in Isolation of one another.Durability means that Once a transaction commits, its effects will persist even if there are system failures.

Question 206. In General, How Should The Boundaries Of A Transaction Be Defined?

Answer : transaction ensures that one or more operations execute as an atomic unit of work. If one of the operations within a transaction fails, then all of them are rolled-back so that the application is returned to its prior state. The boundaries that define a group of operations done within a single transaction.

Question 207. What Is Lock Granularity?

Answer : There are many locks available for the database system to have likeIntent Shared, Shared, Intent exclusive, exclusive and Shared Intent exclusive.

Locking granularity refers to the size and hence the number of locks used to ensure the consistency of a database during multiple concurrent updates.