Fundamentals of Database Systems
Fundamentals of Database Systems
m
PRESENTED BY-
SRIDHAR
SANTHOSH HP
ANIL KUMAR
SADIQ
M
USERS
QUERIES
SOFTWARE TO
PROCESS QUERIES
DBMS
SOFTWARE SOFTWARE TO ACCESS DATA
STORED
DATABASE
6 6
6
6
6
6
6
Hierarchical database
Network database
Relational database
BOSS
WORKER 1 WORKER 2
BOSS
W1 W2
Is composed of relations
Each column of the relation represents a
different domain
Any particular row of the relation is called a
tuple
The number of domains in a relation indicates
the degree of the relation
Primary key
MIS 22 September 2010 16
$!%) '$!
6
413 BANGALORE
611 MYSORE
642 MANGALORE
So, if we are to create the customer table specified as
above, we would type in
"
#
6
6
66
13 JPN KAR 33 112
44 JAYNGR KAR 40 105
66 BSK KAR 47 68
MIS 22 September 2010 20
!
!
UPDATE STATION SET CITY = RT NGR
WHERE ID=66;
13 JPN KAR
44 JAYNGR KAR
66 RT NGR KAR
/ 0!1 .
%&! ((
A relation r may have more than one candidate key, one of these candidate keys
should be designated as the primary key of the relation. The value of the primary
key can then be used as the identification and addressing mechanism of the
relation.
A RDBMS allows only one primary key per table.
None of the attributes containing a primary key may be NULL.
Primary keys are defined using Data Definition Language (DDL)
Primary keys are generally defined at the time the tables are created.
:
PL/SQL supports
Variables
conditions
loops
Exceptions
Arrays
number1 6(2);
number2 6(2) := 17; -- value default
text1 % (12) := 'Hello world';
text2 := ; -- current date and time
6
street_number
6 number1
# address
G name = 'BILLA';
6;