What is a relational database Define the characteristic of
.
What is a relational database? Define the characteristic of a primary key, foreign key, a candidate key, and an alternate key? Why need these keys?
Solution
A relational database (RDB) is a collective set of multiple data sets organized by tables, records and columns. A Relational DataBase Management System is a database management system (DBMS) that is based on the relational model as invented by E. F. Codd. RDBMS is used to manage Relational database. Relational database is a collection of organized set of tables from which data can be accessed easily. Relational Database is most commonly used database. It consists of number of tables and each table has its own primary key.
Primary Key :
Primary key is a candidate key that is most appropriate to become main key of the table. It is a key that uniquely identify each record in a table.
Foreign key : An attribute or combination of attributes in one table whose values must either match the primary key in another table or be NULL..
Candidate key:It is similar to a superkey, but does not contain a subset of attributes that is itself a superkey. In other words, a \"minimal superkey\".
Alternate key: An alternate key is a key associated with one or more columns whose values uniquely identify every row in the table, but which is not the primary key. For example, where the primary key for a table may be the employee id, the alternate key might combine the first, middle, and last names of the employee.
