0% found this document useful (0 votes)
13 views4 pages

Dbms Assignment

Uploaded by

AIKO.J Breezy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

Dbms Assignment

Uploaded by

AIKO.J Breezy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

DatABASE MANAGEMENT SYSTEM

ASSIGNMENTS

NAME: Alex Koroma


ID: 23/CS/TEC/147
DEPARTMENT: Computer Science
LEVEL: Degree Year 2, 2nd Semester

RELATIONAL DATABASESE MANAGEMENT SYSTEMS

RELATIONAL DATABASE

In the relational model, data is organized in two-dimensional tables called


relations. The tables or
relations are related to each other.
Constraints are stored in a meta-data table.
This is a very simple model and most widely used data base model.
The relational model is based on the relational algebra.
Relation: Each table in a database is known as relation.
Attributes: Each column in a relation is called an attribute. The
attributes are the column
headings in the table .
Domain: The set of all possible value of an attribute is known as
domain of the attribute.
Name.: Each relation in a relational database should have
a name that is unique among other relations.
Tuples. Each row in a relation is called a tuple.

ADVANTAGES
Avoids data duplication.
Avoids inconsistent records.
Easier to change data and data format.
Easier to maintain security.
Data can be added and removed easily.

DISASVANTAGES
New relations can require considerable processing.
Sequential access is slow.
Method of storage on disk impacts processing time.

KEY
A key is an attribute or a set of attribute in a relation that uniquely
identifies a tuple in a relation.
Types of keys:
1. Super Key: A super key is an attribute or any set of attributes that
uniquely identifies a
row in a relation.
2. Composite Key: A composite key is a key that contains more than
one attribute.
3. Candidate Key: A candidate key is an attribute or set of attribute
that uniquely identifies
a row in a relation. In other words minimal super key is called candidate
key.
4. Primary Key: A primary key is a candidate key which can uniquely
identify a record or
tuple. Each table can have only one primary key. The primary key should
be selected in
the manner such that it is unique and not null. .
5. Alternate Key: The alternate keys of any table are those candidate
keys which are not
selected as the primary key.
AK(Alternate Key)=CK(Candidate Key)-PK(Primary Key)
6. Overlapping Key: The keys having common attributes are called
overlapping key.
7. Foreign Key: Foreign key is a referential key which must be a
primary key of another
table. This way we can link two tables for retrieving the data jointly. we
only insert those
values which are present in the base table. If we delete the base table
automatically the
the foreign key and primary key relationship is broken.

Relational Terminology
RELATION
Roughly a table in a relational database is called a relation.
A relation consist of
1. Relational scheme
2. Relational instances.
Attribute
The name of each column in a database is used to interpret its meaning is
called attribute.
Domain
Each attribute is defined over a set of values known as its domain.
Tuple
A tuple is a row in a relation\table.
Degree/Arity
The no. of attributes in the relation scheme is called its degree or arity.
Cardinality
No. of tuples present in a relation scheme is called cardinality of a relation.
Union Compatible
Two relation P[P] and Q[Q] are said to be union compatible, if both P & Q
are of same degree
and the domains of the corresponding attributes are equal.
i.e. if P={P1,P2 ………….Pn} & Q= {Q1,Q2……..Qn} then DOM(Pi) =
DOM(Qi) for
i={1,2,3,4…….n},
where DOM(Pi) represents the domain of attribute Pi.
RELATIONAL ALGEBRA
Relational algebra is a collection of operation used to manipulate the data
in relational model
NOTE: Result of each relation operation is also a relation.
The operation can be classified in two categories.
1. Basic set operation
a) Union
b) Intersection
c) Set difference
d) Cartesian product
2. Relational operation
a) Selection
b) Projection
c) Join
c) Division.
BASIC SET OPERATION
These are binary operations (i.e. each is applied to two relations)
These two relations should be union compatible expect in case of
Cartesian product.

You might also like