Relational databases

What is a relational database system? Basically, it is one where you can set up a set of tables, where each table has a name and a set of columns, and each column has an associated name and type. Each row (record) in the table has the same 'shape', and the value in each cell of the row is of the appropriate type for the column - or has a 'null' value. Each row in a table is uniquely identifiable - which is usually interpreted as meaning that a certain column or set of columns of the table are the 'primary key' for the table: the value in column(s) making up the primary key will not be null, and each row can be identified by the contents of the primary key.
a relation: a named table with named, typed columns
Relational databases are a result of theoretical work done in the 1970s, and attempt to abstract the representation and access of data away from the means of storing the data. It is based on the mathematical concept of relations, or typed sets - hence it would be more accurate to use the word relation rather than table, attribute instead of column, and tuple rather than row or record (but nobody does so). Relational database management systems - that is, the software that handles the data storage, and mediates access to the relational database(s) that are being managed - are supposed to obey...

Codd's Commandments

  1. Any RDBMS must be able to manage databases entirely through its relational capabilities. If a DBMS depends on record-by-record data-manipulation tools, it is not truly relational.

  2. All data in a relational database is explicitly represented as values in tables. Data cannot be stored in any other way.

  3. Every data element must be logically accessible through the use of a combination of its primary key value, table name and column name.

  4. Null values are explicitly supported. Nulls represent missing or inapplicable information.

  5. The database description, or catalogue, is also stored at the logical level as tabular values. The relational language - SQL, for instance - must be able to act on the database design in the same manner in which it acts on data stored in the structure.

  6. An RDBMS must support a clearly defined data-manipulation language that comprehensively supports data manipulation and definition, view definition, integrity constraints, transactional boundaries, and authorisation. SQL is the most well-known of these languages.

  7. All views that can be updated must be updateable by the system.

  8. An RDBMS must do more than just be able to retrieve relational data sets. It has to be capable of inserting, updating and deleting data as a relational set.

  9. Data must be physically independent of application programs. The underlying RDBMS program or "optimiser" should be able to track physical changes in the data. For instance, an RDBMS's application programs should not have to change when an index is added to a table.

  10. Whenever possible, applications software must be independent of changes made to the base tables. For example, no code should need to be rewritten when tables are combined into a view.

  11. Data integrity must be definable in a relational language and stored in the catalogue.

  12. An RDBMS has distribution independence.

  13. If an RDBMS has a single-record-at-a-time language, that language cannot be used to bypass the integrity rules or constraints of the relational language. Thus, not only must an RDBMS be governed by relational rules, but these rules also must be the primary laws.
For more on Codd's Commandments, which were introduced to be able to distinguish a proper relational DBMS from others that merely wrap a relational veneer around a non-relational system, see the Wikipedia article http://en.wikipedia.org/wiki/Codd%27s_12_rules.

Relational database systems are transactional, and most use SQL as the language for defining and manipulating the schema and the data.