Showing posts with label RDBMS. Show all posts
Showing posts with label RDBMS. Show all posts

Monday, 4 February 2013

Why is allowing this redundancy a bad practice that one should avoid whenever possible?

Q) Consider an E-R diagram in which the same entity set appears several times. Why is allowing this redundancy a bad practice that one should avoid whenever possible?


Answer: By using one entity set many times we are missing relationships in the model.

Thursday, 31 January 2013

Define the concept of aggregation. Give two examples of where this concept is useful.

Q) Define the concept of aggregation. Give two examples of where this concept is useful.


Answer: Aggregation is an abstraction through which relationships are treated as higher-level entities. Thus the relationship between entities A and B is treated as if it were an entity C. Some examples of this are:

a. Employees work for projects. An employee working for a particular project uses various

Friday, 25 January 2013

Explain the difference between a weak and a strong entity set.

Q) Explain the difference between a weak and a strong entity set.


Answer :

A strong entity set has a primary key. All tuples in the set are distinguishable by that key. A weak entity set has no primary key unless attributes of the strong entity set on which it depends are included. Tuples in a weak entity set are partitioned according to their relationship with

Tuesday, 22 January 2013

E-R diagram for favourite sports team statistics

Q) Design an E-R diagramfor keeping track of the exploits of your favourite sports team. You should store the matches played, the scores in eachmatch, the players in each match and individual player statistics for each match. Summary statistics should be modeled as

Saturday, 19 January 2013

E-R diagram for marks database

Consider a database used to record the marks that students get in different exams of different course offerings.

a) Construct an E-R diagram that models exams as entities, and uses a ternary relationship, for the above database.

Answer :

Wednesday, 9 January 2013

E-R diagram for a university

A university registrar’s office maintains data about the following entities:

(a) courses, including number, title, credits, syllabus, and prerequisites;

(b) course offerings, including course number, year, semester, section number, instructor(s), timings, and

Thursday, 3 January 2013

Explain the distinctions among the terms primary key, candidate key, and superkey.

Answer: A superkey is a set of one or more attributes that, taken collectively, allows us to identify uniquely an entity in the entity set. A superkey may contain extraneous attributes. If K is a superkey, then so is any superset of K. A superkey for which no proper subset is also a superkey is called a candidate

Saturday, 22 December 2012

List six major steps that you would take in setting up a database for a particular enterprise.

Answer: Six major steps in setting up a database for a particular enterprise are:

  •  Define the high level requirements of the enterprise (this step generates a document known as the system requirements specification.)

  •  Define a model containing all appropriate types of data and data relationships.

Sunday, 16 December 2012

List five responsibilities of a database management system.

Q) List five responsibilities of a database management system. For each responsibility, explain the problems that would arise if the responsibility were not discharged.

Answer: A general purpose database manager (DBM) has five responsibilities:

a. interaction with the file manager.


b. integrity enforcement.


c. security enforcement.


d. backup and recovery.


e. concurrency control.


If these responsibilities were not met by a given DBM

Saturday, 15 December 2012

List four significant differences between a file-processing system and a DBMS.

Answer: Some main differences between a database management system and a file-processing system are:

  • Both systems contain a collection of data and a set of programs which access that data. A database management system coordinates both the physical and the logical access to the data, whereas a file-processing system coordinates only the physical

Thursday, 20 October 2011

Does PL/SQL support "overloading"? Explain

The concept of overloading in PL/SQL relates to the idea that you can define procedures and functions with the same name. PL/SQL does not look only at the referenced name, however, to resolve a procedure or function call. The count and data types of formal parameters are also considered.

PL/SQL also attempts to resolve any procedure or function calls in locally defined packages before looking at globally defined packages or

Wednesday, 19 October 2011

How are exceptions handled in PL/SQL?

PL/SQL exception handling is a mechanism for dealing with run-time errors encountered during procedure execution. Use of this mechanism enables execution to continue if the error is not severe enough to cause procedure termination.

The exception handler must be defined within a subprogram specification. Errors cause the program to raise an exception with a transfer of control to the exception-handler block. After the

Tuesday, 18 October 2011

Name two utilities that Oracle provides, which are use for backup and recovery.

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

Sunday, 16 October 2011

What is database Trigger?

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 be defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table,

Friday, 23 September 2011

What is a view? How it is related to data independence?

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,

Describe the three levels of data abstraction?

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.