0% found this document useful (0 votes)
5 views

ITP311 Relational Databases

Uploaded by

bsahulga
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

ITP311 Relational Databases

Uploaded by

bsahulga
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

RELATIONAL

DATABASES
RELATIONAL DATABASES

■ Dr. E.F. Codd


– Was a British scientist who worked for IBM
– Invented the relational model for database management
■ Relational Model
– Represents the database as a collection of relations, with relations pertaining to
tables with rows and columns.
RELATIONAL DATABASES

■ Is a type of database management system that stores information in tables-


rows and columns of data
■ Conducts searches by using data in specified columns of one table to find
additional in another table
– The rows of a table represent records
– The columns represent the fields

Emp-no Emp-name Emp-add Emp-age


001 Vega Norway 24
002 Honda Japan 25
003 Ryu America 27
004 Blanka Brazil 23
RELATIONAL DATABASES

■ Tuple
– Corresponds to a row of a table and an attribute or field to a column
■ Relation
– Is composed of fields (attributes) and tuples
– Are stored as tables in a relational database system
■ Attributes
– Are individual characteristics, and tuples form the unordered set of
characteristics that describe a particular entity
RELATIONAL DATABASES

■ Primary key
– is also called a major key
– Is the key field that serves as the unique identifier of a specific tuple in a relation
– Is the field which occupies the first column within a certain relation
■ Domain
– Is a pool of legal values for a given attribute
■ Foreign key
– Is a field in one table whose values are constrained to be values of the primary key in
another table.
– Is an attribute or a field of one relation whose values are required to match those of
the primary key of another location.
RELATIONAL DATABASES
Attribut
es

Primary Emp-no Emp-name Emp-add Emp-age


Key
001 Vega Norway 24
002 Honda Japan 25
Tuple
s 003 Ryu America 27
004 Blanka Brazil 23

Relatio
n
RELATIONAL DATABASES
Emp_No Emp_Name Emp_Add Emp_Age
0001 Hagar Norway 24
Employee Foreign
0002 Honda Japan 25 Keys
Relation
0003 Ryu America 27
0004 Blanka Brazil 23 Emp_No Item_No Qty_Sold
0001 001 2
Item_No Item_Desc Qty_On_Hand 0001 007 1
001 Floor polisher 20 0002 005 2
005 Hair Dryer 12 0002 008 2
Items
007 Flat Iron 20 0002 009 1
Relation
008 Knife Set 5
009 Blender 20
DATA INTEGRITY RULES

■ Data integrity
– Refers to the trustworthiness of system resources over their entire life cycle
– Is “the representational faithfulness of information to the true state of the object
that the information represents, where representational faithfulness is composed
of four essential qualities or attributes: completeness, currency / timeliness,
accuracy / correctness and validity / authorization
Types of Data Integrity Rules

■ Specific Integrity Rules


– Are rules that apply to a particular database
■ General Integrity Rules
– Are rules that apply to all relational database
Types of Integrity Constraints

■ Entity Integrity Constraint


– Concerns the concept of primary key
– Is an integrity rule which states that every table must have a primary key
and that the column or columns chosen to be the primary key should be
unique and not null.
■ Referential Integrity Constraint
– Concerns that the concept of a foreign key
– States that any foreign key value can only in one of two states
■ The database must not contain any unmatched foreign key

You might also like