Basic Structure of realtional Database

Posted By on October 3, 2014

Download PDF
Relational Algebra Queries
Database Scheme

Basic Structure

  1. Figure 3.1 shows the deposit and customer tables for our banking example. 
    Figure 3.1:   The deposit and customer relations.
    • It has four attributes.
    • For each attribute there is a permitted set of values, called the domain of that attribute.
    • E.g. the domain of bname is the set of all branch names.

    Let denote the domain of bname, and , and the remaining attributes’ domains respectively.Then, any row of deposit consists of a four-tuple where

    In general, deposit contains a subset of the set of all possible rows.

    That is, deposit is a subset of

    In general, a table of n columns must be a subset of

  2. Mathematicians define a relation to be a subset of a Cartesian product of a list of domains. You can see the correspondence with our tables.We will use the terms relation and tuple in place of table and row from now on.
  3. Some more formalities:
    • let the tuple variable refer to a tuple of the relation .
    • We say to denote that the tuple is in relation .
    • Then [bname] = [1] = the value of on the bname attribute.
    • So [bname] = [1] = “Downtown”,
    • and [cname] = [3] = “Johnson”.
  4. We’ll also require that the domains of all attributes be indivisible units.
    • A domain is atomic if its elements are indivisible units.
    • For example, the set of integers is an atomic domain.
    • The set of all sets of integers is not.
    • Why? Integers do not have subparts, but sets do – the integers comprising them.
    • We could consider integers non-atomic if we thought of them as ordered lists of digits.


Relational Algebra Queries
Database Scheme

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby