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.
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...
- 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.
All data in a relational database is explicitly represented as values in tables. Data cannot be stored in any other way.
Every data element must be logically accessible through the use of a combination of its primary key value, table name and column name.
- Null values are explicitly supported. Nulls represent missing or inapplicable information.
- 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.
- 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.
- All views that can be updated must be updateable by the system.
- 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.
- 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.
- 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.
- Data integrity must be definable in a relational language and stored in the catalogue.
- An RDBMS has distribution independence.
- 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.