Summer Training with Eschool, Training, IT Training Courses, BCA MCA B. Tech Training, Java, PHP, Linux, Embedded Systems, CAD, AutoCAD, Technical, Bareilly
Menu


.

Relational Database

A relational database is a collection of data items organized as logically related tables.

Relational Database Management System

The software required to handle/manipulate the tables/relations is known as Relational Database Management System (RDBMS). Example - Oracle , Sybase, DB2, MSSQL, etc.

Table/Relation

A group of rows and columns form a table. The horizontal subset of the Table is known as a Row/Tuple. The vertical subset of the Table is known as a Column/an Attribute.

A relation in a database has the following characteristics:
• Names of columns are distinct and order of columns is immaterial
• The rows in the relation are not ordered

Degree

No.of columns of Table.

Cardinality

No.of rows of Table.

Domain

• Defination - The domain of a database attribute is the set of all allowable values that attribute may assume.

• Examples: A field for gender may have the domain {male, female, unknown} where those three values are the only permitted entries in that column.

Key

An Attribute/group of attributes in a table that identifies a tuple uniquely is known as a key. A table may have more than one such attribute/group of attributes that identifies a tuple uniquely, all such attributes(s) are known as Candidate Keys . Out of Candidate keys, one is selected as Primary key and others become Alternate Keys .

A Foreign Key is defined in a second table, but it refers to the primary key in the first table.

Relational algebra

Relational algebra is a formal system for manipulating relations. Set of operations that can be carried out on a relation:
Selection : To select a horizontal subset of a relation
Projection : To select vertical subset of a relation
Cartesian product: It operates on two relations and is denoted by X. for example Cartesian product of two relation R1 and R2 is represented by R=R1X R2. The degree of R is equal to sum of degrees of R1 and R2. The cardinality of R is product of cardinality of R1 and cardinality of R2 Example Cartesian Product

The table R1
The table R2
R1 X R2



Enjoy our courses Today