DFC20123 - Topic 2 - 1
DFC20123 - Topic 2 - 1
Database Design
[email protected]
2.0 Relational Data Model
RDBMS
Type of DBMS that stores data in the form of
related tables which promoting easier database
design, implementation, management and use.
[email protected]
3
RDBMS Packages
Microsoft
Oracle SQL Server IBM DB2
[email protected]
4
Relational database
components
RELATION Table composed of rows and columns
TUPLE Row of record in a relation
ATTRIBUTE Column or field in a relation
CARDINALITY Number of tuple in a relation
DEGREE Number of attributes in a relation
DOMAIN Pools of values of specific attributes of relation
PRIMARY KEY Unique identifier of tuple in a relation
[email protected]
5
Relational database
components
Attributes
Relation COURSE
CourseCode CourseName CourseCredit
DFC20123 Database Design 3 Tuples
Primary Key
DFC20113 Programming Fundamentals 3
Domain
[email protected]
6
Application areas of RDBMS
Airlines Banking
Universities Telecommunications
[email protected]
7
Properties of table in a
relational database
[email protected]
8
Relation scheme
What is
Relation A named of relation defined by set of Common convention:
Scheme? attributes and domain. Relation Name(attribute-1, attribute-2,…attribute-n);
[email protected]
9
Relation instance
What is
Relation Example:
Instance? A tuple at a specific moment of time. Branch (branchNo, street, city, postcode)
• Primary key is underlined
• The relation instance change when tuple is updated, The relation instance for branch is:
deleted or inserted. (B123, Jalan Merak, Sibu, 96000)
(B124, Jalan Oya, Mukah, 96400)
[email protected]
10
Relation key
Primary Key
Foreign Key
Candidate
Key
[email protected]
Relation key
Primary Key
Foreign Key
Candidate
Key
[email protected]
Relation key
Primary Key
Foreign Key
Candidate
Key
[email protected]
Integrity rules
Constraint or restriction that applies to all instances of the
database.
Entity Integrity Referential Integrity
[email protected]
THANKS!
Any questions?