Relational Model

Only available on StudyMode
  • Download(s) : 175
  • Published : April 17, 2013
Open Document
Text Preview
Relational Model: Data Structure
The relational database model consists of three parts: data structure (this section), data integrity, and data manipulation. The data structure model defines how to represent data. Most basic to the data structure model is the relation which is illustrated below:

A relation, which is the most basic part of the data structure model, has two parts: relation heading and relation body: * Relation Heading
A relation heading is a set of (attribute, domain) pairs (i.e., (column, column-type) pairs). For the relation above, the relation heading is: { (ID, integer), (Name, string), (Dept, string) }. The number of these pairs is known as the relation degree, therefore, the relation above is a degree three relation. * Relation Body

A relation body is a set of tuples (i.e., rows). A tuple (row) can be thought of as an instance of the Employee relation. Formally, a tuple is a set of (attribute, value) pairs, in other words (column, value) pairs. The tuple represented by ID of 1, is actually this set { (ID, 1), (Name, Smith), (Dept, Sales) }. The number of tuples is known as the relation cardinality. For the relation above, it has a cardinality of 2. Being able to reference attributes (columns) by name and tuples (rows) by primary key values provides a data model that has no physical storage model associated with the data organization. The relational data model is the only one that achieves complete physical data independence. Applications do not need to know at all how data is organized as long as the database takes care of finding the right data when the application provides table and column names along with primary key values. Another fundamental part of the relation model data structure is the concept of a domain. Simply stated, a domain combines two pieces of information - the set (possibly infinite) of allowable values that an attribute (column can have), and the semantics (meaning) of the values.  In other words, a domain...
tracking img