Вы находитесь на странице: 1из 5

RDBMS FAQs

What is a Relational Database Management System (RDBMS)? A set of software that enables the user to create, review, update and delete information held in a relational database.

What are some popular RDBMSs which support SQL?


Oracle Sybase Microsoft SQL server Informix Ingress DB2 Centura SQLBase (bundled with SQLWindows) Sybase SQLAnywhere (bundled with PowerBuilder) Pervasive.SQL (bundled with many accounting packages) Borland Database Engine/InterBase (bundled with Delphi)

What is the history of RDBMSs? Dr E.F.Codd of IBM published "A Relational Model of Data for Large Shared Data Banks ", in the Communications of the ACM in 1970. This is the mathematically rigorous theoretical base of the relational databases. Subsequently, he published his famous 12 principles of relational databases in "The Relational Approach to Data Base Management: An Overview", at the Third Annual Texas Conference on Computing Systems in 1974.

What are the different kinds of database management systems?


Hierarchical Network Relational Object Object-Relational

While hierarchical and network databases are older than relational databases, object and object - relational databases are of relatively recent origin.

What are the features of a hierarchical database?

The main structures used by the hierarchical model are record types and parent-child relationship between a parent record type and a child record type. Access to lower level data elements must first access their parents. Relationships are strictly hierarchical in that a record type can participate as child in at most one parent-child relationship type. This restriction makes it difficult to represent a database where numerous relationships exist. While storage and retrieval are very fast, it is difficult to query a hierarchical database, and impossible to build decision support systems based on it. IMS is an example of a hierarchical database.

What are the features of a network database? The network model assumes a more complex interrelationship (many to many) between data elements. Relationships and access paths are still predetermined and usually fixed but less restrictive. A record type can participate as owner or member in any number of set types. This is the main distinction between the network model and the hierarchical model. So, the network model has a better modeling capability than does the hierarchical model.

What are the features of a relational database? The relational model makes no presumptions about the interrelationships between data elements. Relationships are represented by one table, containing key data extracted from another table. Relations are dynamic and determined as needed. In a relational database, everything is stored in tables. Tables contain columns and rows. In formal relational theory, first proposed by E.F.Codd, tables are known as relations and that is why these came to be known as relational databases. Creation of these tables and their columns is done using SQL. Similarly storage and retrieval of data is also done using SQL.

What are the features of an object database? Object databases allow you to store complex data types or objects. Further more, it supports inheritance, polymorphism, and encapsulation for full objectoriented development.

What are the features of an object-relational database? This is a hybrid type of database. The relational database server is usually extended to support objects as if they are new data types.

What are data types? At the time of creation of a column you need to say what type of data you intend storing in it. Such column type definitions are known as data types. Common data types that can be stored and manipulated are NUMBER, CHAR, or DATE. But many RDBMSs also provide the ability to store newer types such as TEXT, IMAGE, etc.

What is an Entity-Relationship (E-R) diagram? A useful technique in designing your database is to draw a picture of your tables showing the relationship between tables. This graphical display of a database is called an Entity-Relationship or an E-R diagram.

What is referential integrity? A feature provided by RDBMSs that prevents users or applications from entering inconsistent data. Most RDBMSs have various referential integrity rules that you can apply when you create a relationship between two tables. These rules help in preserving the integrity of the data. In simple terms referential integrity constraints make sure that there are no orphan records. Let us say you have an 'employee' table that has a foreign key that points to 'department_id', which is a key in the 'department' table. Referential integrity will prevent you from deleting a department that has employees assigned to it. This is known as a restriction. If you are dealing with 'order' table and multiple items contained in an order, it is possible for you set it up such a way that all items in an order get deleted when you delete an order. This is known as a cascading delete.

What is the primary key? The unique identifier for a row of data in a table is the primary key. This can be a single column or a combination of more than one column, in which case it is known as a composite key.

What is the foreign key? A key column in a table that identifies records in a different table is called a foreign key. Let us say that you have an 'order' table and an 'item' table. In the item table, let us say that your primary key is the combination of 'order_id' and

'item_number'. In this case, the 'order_id' which is the primary key of the 'order' table is a foreign key in the 'item' table.

What is an alternate key? Some tables in your database may have other columns which can be used as a key, which may or may not be unique. These are known as alternate keys. Let us say you have assigned each employee's Social Security Number as the primary key. The employee's last name would be an alternate key.

What is a composite key? When the rows of a table can be uniquely identified only by a combination of more than one column, it is said to have a composite key. 'course_id' and 'start_date' together may uniquely identify each row in a 'session' table. In this case, we will say that the 'course' table has a composite key.

What is normalization? Normalization is a series of rules that we apply on the preliminary database design to eliminate redundancy and inconsistency. Simply stated, normalization is the process of removing redundant data from relational tables by splitting a relational table into smaller tables. The new tables can be recombined by a natural join (using SQL) to recreate the original table without creating any spurious or redundant data. Though there can be more stages to normalizing a database, the basic process involves three stages.

What are the three normal forms? First normal form: Remove repeating groups. If, in the employee table, you have a column name_of_children, this will have more than one value for some of the employees. Second normal form: Remove columns that do not depend on the whole key. If, in the item table, you have some attributes of the order, then it will depend on only part of the key (namely, the order_number). Third normal form: Remove columns that do not depend only on the key.

If, in the order table, you have some attributes of the item, then it will not depend only on the key (it will depend on order_number and item_number). Here is an easy way to remember this: Columns must depend on the key, the whole key and nothing but the key! What do you do with all those columns that you removed? Make them into separate tables.

What is an index, and how is it used to improve performance? An index is information about the physical location of information on a storage device (for example, on a hard disk). Indexes tend to slow down data entry slightly, but speed-up locating the data.. In a library when a new book comes in, the librarian will assign a rack number to it and make an index card so that it can be looked up quickly by author or title. Database indexes play a similar role. Columns should generally be indexed in the following cases: 1. 2. 3. 4. when the column is a primary or foreign key when the column is sorted when joins will be used on the column When users will search for values in that column.

All of these operations can benefit with the help of indexes.

Вам также может понравиться