Relational Database

A relational database is a digital database based on the relational model of data, as proposed by E. F. Codd in 1970. A software system used to maintain relational databases is a relational database management system (RDBMS). Virtually all relational database systems use SQL (Structured Query Language) for querying and maintaining the database.

This model organizes data into one or more tables (or "relations") of columns and rows, with a unique key identifying each row. Rows are also called records or tuples. Columns are also called attributes. Generally, each table/relation represents one "entity type" (such as customer or product). The rows represent instances of that type of entity (such as "Lee" or "chair") and the columns representing values attributed to that instance (such as address or price).

What is key in RDBMS?
A Key is a data item that exclusively identifies a record. In other words, key is a set of column(s) that is used to uniquely identify the record in a table. It is used to fetch or retrieve records / data-rows from data table according to the condition/requirement. Key provide several types of constraints like column can’t store duplicate values or null values. Keys are also used to generate relationship among different database tables or views.

Types of Keys
Database supports the following types of keys.

  • Super Key
  • Minimal Super Key
  • Candidate Key
  • Primary Key
  • Unique Key
  • Alternate Key
  • Composite Key
  • Foreign Key
  • Natural Key
  • Surrogate Key

No comments:

Post a Comment