12 Relational Databases
12 Relational Databases
DATA B A S E S
CHAP 12
W H AT I S A D ATA B A S E ?
T H E C O L L E C T I O N O F I N T E R R E A LT E D D ATA
S TO R E D TO S E RV E M U LT I P L E A P P L I C AT I O N S .
W H AT I S D ATA R E D U N D A N C Y ?
Krish Info Tech
W H AT I S D ATA I N C O N S I S T E N C Y ?
Mismatched
multiple copies
of same data is
known as data
inconsistency.
Byte
• a byte is a group of eight bits and is used to store a single
character
data item
• the smallest unit of named data, the value present in a single
cell is data item
Field
• a data item represents one type of information also called as
column
record
• record is a named collection of data items which represents
a complete unit of information
Table
• a table is surnamed collection of all
occurrences of a given type of logical
records
Krish Info Tech
Requires 1 Bytes
SAP Sybase
Microsoft adaptive
Oracle IBM
SQL MYSQL
database Informix server
software
enterprise
Domain • domain is a pool of values from which the actual values appearing in a given
column are drawn
Candidate key
Alternate key
• A candidate key that is not the primary key is called as alternate key
Foreign key
• A non key attribute whose values are derived from the primary key of
some other table
Krish Info Tech
M Y S Q L D ATA B A S E
• MySQL database system refers to the combination of a MySQL server instance
and a MySQL database.
• MySQL operates using client server architecture in which the server runs on the
main machine containing the databases in clients connect to the server over a
network.
• The server listens for client request coming in over the network and access
database contains according to those requests and provides that to the clients.
• Clients are the programs that connect to the database server and issue queries in
a pre specified format.
Data definition Interactive Data embedded data View definition Authorization Integrity transaction
language manipulation manipulation control
language language
provides comments for includes a query language embedded form of SQL SQL DDL also includes it includes comments for it provides forms of includes commands for
defining relations, based on both relational is a designed for use commands for defining specifying access rights to integrity checking specifying the beginning
deleting relations, algebra and the tuple within general purpose views which are tables. relations and views and ending of
creating indexes and relational calculus. programming languages transactions along with
modifying relations. like COBOL, Pascal, C, commands
C++, etc
SQL provides many different types of commands used for different purposes.
Data Transaction
Data definition
manipulation control Session control
language (DDL)
language (DML) language (TCL) commands
commands
commands commands