ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Relational Database Model

Updated on November 27, 2010

Brief history of the Relational Model

The relational model was first proposed by E. F. Codd in his seminal paper “A relational model of data for large shared data banks”. This paper is now generally accepted as a landmark in database systems, although a set-oriented model had been proposed previously. The relational model’s objectives were specified as follows:

· To allow a high degree of data independence. Application programs must not be affected by modifications to the internal data representation.

· To provide substantial grounds for dealing with data semantics, consistency, and redundancy problems.

· To enable the expansion of set-oriented data manipulation languages.

Although interest in the relational model came from several directions, the most significant research may be attributed to three projects with rather different perspective. These three projects where: Prototype relational DBMS System R, INGRES – Interactive Graphics Retrieval), Peterlee Relational Test Vehicle .

Relational Model

The relational model is based on the mathematical concept of a relation, which is physically represented as a table. Codd, used terminology taken from mathematics, principally set theory and predicate logic.

Relation is a table with columns and rows. Attribute is a named column of a relation. In relational model, relations are used to hold information about the objects to be represented in a database. Attributes can appear in any order and the relation will still be the same relation, and therefore convey the same meaning.

The relational model used the basic concept of a relation or table. The columns or fields in the table identify the attributes such as name, age, and so.

For example, the information on branch offices is represented by the Branch relation, with columns for attributes branchNo, street, city, and postcode.

Domains are an extremely powerful feature of the relational model. Every attribute in a relation is defined on a domain. Domains may be distinct for each attribute, or two or more attributes may be defined on the same domain.

Tuple is a row of a relation. The elements of a relation are the rows or tuples in the table. In the Branch relation, each row contains four values, one for each attribute. Tuples can appear in any order and the relation will still be the same relation. The structure of a relation, together with a specification of the domains and any other restrictions on possible values, is sometimes called its intension. The tuples are called the extension of a relation, which changes over time.

Degree of a relation is the number of attributes it contains. The Branch relation has four attributes or degree four. This means that each now of the table is a tuple containing four values. A relation with only one attribute would have degree one and be called a unary relation. A relation with two attributes is called binary, one with three attributes is called ternary, and after that the term n-ary is usually used.

Cardinality is the number of tuples it contains. The number of tuples is called the cardinality of the relation and this changes as tuples are added or deleted. The cardinality is a property of the extension of the relation and is determined from the particular instance of the relation at any given moment.

Relational database is a collection of normalized relations with distinct relation names. A relational database consists of relations that are appropriately structured. We refer to this appropriateness as normalization.

Formal Terms      Alternative 1       Alternative 2

Relation                  Table                          File

Tuple                        Row                       Record

Attribute                 Column                         Field

The terminology for the relational model can be quite confusing. A third set of terms is sometimes used: a relation may be referred to as a file, the tuples as records, and the attributes as fields.

Mathematical Relations

To understand the meaning of relation, we have to review some concepts from mathematics. Suppose that we have two sets, D1 and D2, where D1 = {2, 4} and D2 = {1, 3, 5}. The Cartesian product of these two sets, written D1xD2, is the set of all ordered pairs such that the first element is a member of D1, and the second element is a member of D2.

Relation Schema

One example of the tuples: {(B005, 22 Deer Rd, London, SW1 4EH)} Or more correctly: {(branchNo: B005, street: 22 Deer Rd, city: London, postcode: SW1 4EH)}.

Relational Database Schema

It is a set of relation schemas, each with a distinct name. If R1, R2, …,Rn are a set of relation schemas, then we can write the relational database schema, or simply relational schema, R, as: R = {R1, R2, …, Rn}.

Properties of Relations includes the relation has a name that is distinct from all other relation names in the relational schema. Each cell of the relation contains exactly one atomic (single) value. Each attribute has distinct name. The values of an attribute are all from the same domain. Each tuple is distinct; there is no duplicate tuple. The order of attributes has no significance. The order of tuples has no significance, theoretically.

Relational Keys

We need to be able to identify one or more attributes that uniquely identifies each tuple in relation. Superkey an attribute, or set of attributes, that uniquely identifies a tuple within a relation. Candidate key a superkey such that no proper subset is a superkey within the relation. A candidate key, K, for a relation R has two properties, Uniqueness and Irreducibility.

There may be several candidate keys for a relation. When a key consists of more than one attribute, we call it a composite key. Primary key – the candidate key that is selected to identify tuples uniquely within the relation. Foreign Key – an attribute, or set of attributes, within one relation that matches the candidate key of some relation.

Relational Integrity

Since every attribute has an associated domain, there are constraints that form restrictions on the set of values allowed for the attributes of relations. There are two rules in integrity for the relational model known as entity integrity and referential integrity.

Null represents a value for an attribute that is currently unknown or it is not applicable for this tuple. A null can be taken to mean the logical value ‘unknown’. It mean that a value is not applicable to a particular tuple, or it could merely mean that no value has yet been supplied.

Entity Integrity. In a base relation, no attribute of a primary key can be null. Referential Integrity. If a foreign key exists in a relation, either the foreign key value must match a candidate key value of some tuple in its home relation or the foreign key vale must be wholly null.


A view is virtual or derived relation: a relation that does not necessarily exist in its own right, but may be dynamically derived from one or more base relations. Base Relation is a named relation corresponding to an entity in the conceptual schema, whose tuples are physically stored in the database.

Purpose of views includes: It provides a powerful and flexible security mechanism. It permits users to access data in a way that is customized to their needs. And it can simplify complex operations on the base relations.


    0 of 8192 characters used
    Post Comment

    • profile image

      Plagiarism Sucks 

      4 years ago

      Plagiarized word for word from Chapter 4 of "Database Systems: A Practical Approach to Design, Implementation, and Management", by Thomas Connolly and Carolyn Begg. Editing it down doesn't make it any more OK, especially without giving credit to the authors while you have your picture and screen name essentially taking credit for it...

    • profile image

      Scott Levy 

      6 years ago

      Great post. Here’s a tutorial that shows how you can easily build an online database-driven web application with a parent-child table relationship, without coding


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)