Jump to content

DBMS/Relational Database

From Wikibooks, open books for an open world

A database based on relational algebra or relation model is called relation database

Relational data model

[edit | edit source]
relation
a table in a relational database is called relation in the mathematical language of relational algebra. relations are unordered.
attribute
column of a table in database table is called attributes. columns or attributes have names.
domain
set of permissible values for an attribute ( or column) is called domain.
tuple
a row in the database table is called tuple in the mathematical language of relational algebra. order of tuples in a relation has no significance.
database
a database is a collection of multiple relations.
schema
a database design is called schema, alternatively, a schema can refer to namespace within a database.
cardinality of a relation
number of tuples in a relation is called cardinality of the relation.

Normalization theory deals with design of relational database schema.

key
any subset of a relation is called key.
super key
a key is called super key if it is sufficient to identify a unique tuple of a relation.
candidate key
a minimal super key is called candidate key i.e. no proper subset of a candidate key is super key.
primary key
a candidate key chosen as a principal to identify a unique tuple of a relation.It Restrict User Inputs like "Null Values" , "Duplicate Values" etc.
foreign key
a key of a relation which is a primary key of some other relation in the relational schema.