DBA > Interview Resource

RDBMS FUNDAMENTALS Interview Questions and Answers

Part:   1  2  3  4  5  6 

(Continued from previous part...)

RDBMS FUNDAMENTALS


II. USING RELATIONAL DATABASE :

Basics of Relational Database :

Relational Database Management System (RDBMS) : RDBMS is the most popular form of DBMS used in the world. It uses a relational database to organize data. A relational database comprise relations, which are represented as tables.

Relation : A relation stores information about an object in the real world. A relation is represented as a table.

Attribute : Each attribute of a relation stores a piece of information about an object. Attributes are represented as columns in a tables and can be arranged in any order. Each attribute in a relation is unique and contain atomic values i.e. Atomic value contain a single value of data and Non-Atomic values contain a set of values. The number of attributes in a relation is called the degree of the relation.

Tuple : A row in a table is called a tuple of the relation. The number of tuples in a relation is known as the cardinality of the relation. Tuples in a table are unique and can be arranged in any order.

Domain : A domain is a set of valid atomic values that an attribute can take. Within a single database, an attribute cannot have different domains associated with it. A domain can include a null value, if the value for the domain is unknown or does not exist.

Identifiers for Relations :
Primary Key : An attribute that uniquely identifies a row in a table is called its primary key. A relation can have only one primary key. The primary key cannot have any null values. In case no unique key is found in a relation, two or more attributes can be treated as the primary key. Such keys are called Composite Keys.
Candidate Key : A relation can have more than one attribute that uniquely identifies a tuple. Any one of these keys can be selected as the primary key. All such attributes are called Candidate Keys. All candidate keys that are not primary keys are called Alternate Keys.
Foreign Key : An attribute that is not a candidate key is called a Nonkey. A nonkey attribute of a relation whose value matches the primary key in some other table is called Foreign Key OR is a column in a table that uniquely identifies rows from a different table.

(Continued on next part...)

Part:   1  2  3  4  5  6