Home >> Computers >> Software >> Databases >> Relational >> Model




A relational model for management of the database is a data model based on predicate logic and set theory. The model
A fundamental assumption of the relational model is that 100% data are represented as mathematical relations, i.e., the subset of the Cartesian product of n sets. In the mathematical model, reasoning about such data is liquidate 2-valued predicate logic (that is, without NULLs), meaning there are two conceivable evaluations for each proposition: either true or even faithlessly. Information come operated upon by means of the relational calculus and algebra.

A relational information model permits a designer to create the uniform logical model of information, to be refined across database normalization. A access plans & other implementation and operation details come handled per DBMS engine, and should non exist as reflected in the logical model. This contrasts using most common practice for SQL DBMSs where performance tuning often requires changes to the logical model.

A basic relational building prevent is the domain, or data type. The tuple is an ordered multiset of attributes, which are ordered pairs of domain & value. The relvar (relation variable) is a placed of ordered pairs of domain and title, which serves when a header for a relation. The relation is a set of tuples. Although these relational concepts are mathematically defined, it map loosely to traditional database construct. The table is an accepted visual representation of the relation; the tuple is similar to the conception of row.

A basic principle of the relational model is the Information Principle: all information is represented by data values in relations. So, a relvars are non related every more at design time: rather, designers have a equivalent domain in several relvars, and whenever 1 attribute is depending on an additional, this dependency is enforced through referential integrity.

Competition
More models are a hierarchical model and network model. A select few systems using these older architectures are however around have within todays world in data centers with high information volume needs or even in which existent systems come then complex & abstract it would exist as prices prohibitory to migrate to systems using a relational model; besides of note come fresh object-oriented databases, even though numerous of the children come DBMS-construction kits, like than proper DBMSs.

A relational model was a 1st formal database model. Fallowing it was defined, informal system were manufactured to describe hierarchal databases (a hierarchal model) & network databases (a network model). Beatification & network databases existed prior to relational databases, however were lone described when system fallowing the relational model was defined, sequentially to establish a basis for comparison.

History
A relational model was invented by Dr. Ted Codd as a general model of data, and subsequently maintained and developed by Chris Date and Hugh Darwen among others. In The Third Manifesto (1995) they indicate how else a relational model may be extended sustaining object-oriented features without compromising its basic principle.

Misimplementation
SQL, initially pushed when a standard language for relational databases, was actually always within violation of it. SQL DBMS's come so non actually RDBMS's, and a todays ISO SQL standard doesn't mention the relational model or even even utilise relational terms or conception.

Implementation
There develop been many tries to garden truck the confessedly implementation of the relational database model originally developed by Codd, Date, Darwen and others, but none have been popular successes so far. [http://dbappbuilder.sourceforge.net/Rel.html Rel] is one of a further recent tries to clean this. SQL utilizes conception "table", "column", "row" instead of "relvar", "attribute", "tuple".

Controversies
Codd himself proposed the 3-valued logic version of the relational model, & the 4-valued logic version has as well been proposed, sequentially to treat using missing references. However these develop never been implemented, presumptively because of attending complexness. SQL NULLs were meant to exist as section of the 3-valued logic formulas, however fell short of that due to logical errors within the standard & in its implementations.

Design
Database normalization is usually performed whilst designing the relational database, to improve the logical consistency of the database design and the transactional performance.

There are 2 usually utilized systems of diagramming to aid in the visual representation of the relational model: the entity-relationship diagram (ERD), and a related IDEF diagram used in the IDEF1X method created by the U.S. Air Force based on ERDs.

Example database

An idealised, super elementary lesson of the description of a few relvars & their attributes:

Client(Client ID, Taxation ID, Title, Location, City, State, Zip, Phone)

Sequentially(Sequentially There are no, Client ID, Account There is no, Date Positioned, Date Promised, Terms, Status)

Sequentially Line(Choose There are no, Sequentially Line There is no, Product Code, Qty)

Account(Invoice There is no, Client ID, Choose There are no, Date, Status)

Bill Line(Bill There is no, Line There is no, Product Code, Qty Shipped)

Product(Product Code, Product Description)

Therein design we have six relvars: Customer, The correct sequence, The correct sequence Line, Account, Bill Line & Product. A bold, underlined attributes come candidate keys. A non-bold, underlined attributes come foreign keys.

Normally 1 candidate key is arbitrarily chosen to become known as a primary key and used around preference over the more candidate keys, which are known as alternate keys.

The candidate key occurs as unique identifier enforcing that no tuple will be duplicated; this would make a relation into something else, namely the bag, by violating the basic definition of the set. The key can be composite, that is, can be composed of many attributes. In the image below occurs as tabular depiction of the relation of my case Client relvar; the relation may be thought of as the value that may be attributed to a relvar.

Set Theory Formulation

Basic notions in the relational model come relation list & attribute list. I personally might represent these when strings like "Person" & "name" & i personally may commonly utilize a variables r, s, t, ... & the, b, 100 to range all over the babies. An additional basic notion is the placed of atomlike values that contains values like amounts & strings.

My number one definition concerns a notion of tuple, which formalizes the notion of row or even record inside a table:

A next definition defines relation which formalizes the contents of a table when these are defined in the relational model.

Such the relation closely corresponds to what is usually known as the extension of a predicate within first-order logic except that here you identify a site in the predicate by having attribute list. Commonly in the relational model the database schema is said to consist of a placed of relation list, a headers that come associated by using these list & a constraints that should hold for each time of the database schema.

Key constraints and functional dependencies
One of a simplest & first types of relation constraints is the key constraint. It tells a states that within each time of the certain relational schema the tuples may be identified by their values certainly attributes.

the completion of an attribute placed may be utilized to compute in case the certain dependency is in the closure of a placed of FDs.

INPUT: the placed S of FDs that contain simply subsets of the header H OUTPUT: a placed Hundred of superkeys that hang on to when candidate keys in everthing relation universes across H where completely FDs inside S hold begin C := ∅; // incurred candidate keys Q := ; // superkeys that contain candidate keys spell Q <> ∅ do let K become occasionally element from either Q; Q := Q - ; minimum := avowedly; for every X->Y within S do ''K' := (K - Y) ∪ X; // derive freshly superkey whenever M' K then minimum := treasonably; Q := Q ∪ ; fi od in case minimum & there exists non the subset of K around C then dislodge a lot supersets of K from either C; C := One hundred'' ∪ ; fi od end

The Third Manifesto
This is a proposal for a strictly relational system. It is intended to be more powerful than SQL or object DBMSs. File in PostScript format.

Database Debunkings
Analysis of various systems and ideas floating in the database scene, against the standards set by the relational model for database management.

FirstSQL Issue Papers
Opinions fundamented on the relational model about NULLs, SQL and DBMS

Dilip's Brief Introduction to Relational Databases
Provides a basic introduction to relational databases theory.

Dr EF "Ted" Codd's 12 Rules
12 rules for a relational database management system, by the relational model's author. Outdated but still useful.

Extending the Database Relational Model to Capture More Meaning
RM/T: semantics modeling in the relational model for database management.

According to Date: recent.
Articles by Christohper J Date with emphasis on foundations. Web published by DBPD after the print magazine folded.

According to Date: online.
Articles by Christopher J Date about how the relational model can fulfill all OO needs. Web-only articles from DBPD that never made to print.

Introduction to Relational Databases
Concentrating on the 12 Rules from EF Codd and a succint, informal definition of normalisation with examples.

Chracteristics of a Relational Database
Succint, itemized explanation of 12 Rules by EF Codd.






© 2005 GeneralAnswers.org