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

DATABASE SYSTEMS_AL COM SCS

The module on Database Systems covers the nature, purpose, and functions of various database models, particularly focusing on relational database systems. It outlines competencies such as designing databases and using DBMS tools, and provides expected outcomes including the ability to analyze problems and implement database solutions. Additionally, it includes a case study on modeling a database for the KIMBO Police Credit Union, detailing the design and implementation phases.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DATABASE SYSTEMS_AL COM SCS

The module on Database Systems covers the nature, purpose, and functions of various database models, particularly focusing on relational database systems. It outlines competencies such as designing databases and using DBMS tools, and provides expected outcomes including the ability to analyze problems and implement database solutions. Additionally, it includes a case study on modeling a database for the KIMBO Police Credit Union, detailing the design and implementation phases.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

A/L COMPUTER SCIENCE

MODULE 10
DATABASE SYSTEMS

Presented by:
Mr. Ndumu
PRESENTATION OF MODULE

 The module describes the nature and purpose of database models,


 The functions of database tools and how they are used.
 Advantages of relational database systems over traditional file
systems are highlighted.
 How a relational database is designed, created, used, and
maintained.
 The module describes different types of databases in
organizations and how databases are used on the Web.
COMPETENCIES

 Understanding concept of databases

 Exploring Types of database systems

 Understanding Relational database management systems

 Designing databases

 Using DBMS (RDBMS) tools and packages

 Publishing on the Internet and other networks


EXPECTED OUTCOMES

At the end of this training you shall acquire resources to be able to

 Analyse a problem situation

 Designing databases as solution to the problem

 Using DBMS (RDBMS) tools and packages to implement the

design

 Host a website that runs a relational database locally and on the

internet.
CONTENT
UNDERSTANDING DATABASES
What is a database?
A storage container that keeps related information.

Fig 1: Computerized Fig 2: Manual


Databases Database
CONTENT
TYPES OF DATABASE
1. Hierarchical Database
Model
CONTENT
TYPES OF DATABASE CONT.
2. Network Database
Model
CONTENT
TYPES OF DATABASE CONT.
3. Relational Database Model
CONTENT

RELATIONAL DATABASE CONCEPTS

 The Relational Model (RM) represents the database as a


collection of relations.
 A relation is nothing but a table of values.
 Every row in the table represents a collection of related data
values.
 These rows in the table denote a real-world entity or
relationship.
CONTENT
RELATIONAL DATABASE CONCEPTS
Cont.
 Attribute: Each column in a Table. Attributes are the properties
which define a relation. e.g., Student_Rollno, NAME,etc.
 Tables – In the Relational model the, relations are saved in the
table format. It is stored along with its entities. A table has two
properties rows and columns. Rows represent records and
columns represent attributes.
 Tuple – It is nothing but a single row of a table, which contains a
single record.
 Relation Schema: A relation schema represents the name of
the relation with its attributes.
 Degree: The total number of attributes which in the relation is
CONTENT
RELATIONAL DATABASE CONCEPTS
Cont.

 Cardinality: Total number of rows present in the Table.


 Column: The column represents the set of values for a
specific attribute.
 Relation instance – Relation instance is a finite set of
tuples in the RDBMS system. Relation instances never
have duplicate tuples.
 Relation key – Every row has one, two or multiple
attributes, which is called relation key.
CONTENT
RELATIONAL DATABASE CONCEPTS
Cont.
CONTENT
RELATIONAL DATABASE
Relational Integrity Constraints

 Relational Integrity constraints in DBMS are referred to conditions


which must be present for a valid relation.

 These Relational constraints in DBMS are derived from the rules


in the mini-world that the database represents.

Constraints on the Relational database management system is


mostly divided into three main categories are:

 Domain Constraints
 Key Constraints
 Referential Integrity Constraints
CONTENT
RELATIONAL DATABASE
Relational Integrity Constraints

1. Domain Constraints
Domain constraints can be violated if an attribute value is not
appearing in the corresponding domain or it is not of the
appropriate data type. Data
type(Number)
Data
type(Text)
CONTENT
RELATIONAL DATABASE
Relational Integrity Constraints

2. Key Constraints
 An attribute that can uniquely identify a tuple in a relation is
called the key of the table.

PK (Primary
Key)
CONTENT
RELATIONAL DATABASE
Relational Integrity Constraints

3. Referential Integrity Constraints


 Referential Integrity constraints in DBMS are based on the
concept of Foreign Keys.
 A foreign key is an important attribute of a relation which should
be referred to in other relationships
RELATIONAL DATABASE
DATABASE DEVELOPMENT LIFECYCLE

DDL are stages a database developer follow to build a


database.
These stages are:
1. Requirements Specification
2. Design
Conceptual
Logical Stages of Database Design
Physical
3. Implementation
4. Testing
5. Maintenance
RELATIONAL DATABASE
MODELING RELATIONAL DATABASE USING ERD

 ER Diagram stands for Entity Relationship Diagram, also known


as ERD is a diagram that displays the relationship of entity sets
stored in a database.
 In other words, ER diagrams help to explain the logical structure
of databases.
 ER diagrams are created based on three basic concepts:
entities, attributes and relationships.
RELATIONAL DATABASE MODELING
CASE STUDY
PROBLEM SCENARIO
KIMBO Police Credit Union has been using a manual database
to keep records of the associations transactions. With the
challenges associated with running manual databases, there
is need to create a computer based database to manage her
transactions.
The task to the development team is as follows:
 Model the database for this micro finance using ERD
 Develop a stand-alone database system for the
Microfinance
RELATIONAL DATABASE MODELING
SOLUTION
MODELING THE DATABASE OF KIMBO Police
Credit Union
STEP 1: CONCEPTUAL
DESIGN
ENTITIES & ATTRIBUTES
CUSTOMER ACCOUNT
TRANSACTIONS
CID(pk) LOANS
AID(pk) TID(pk)
LID(pk)
First Name Type (D,S) Type(D,W,S,LP)
Amount
Last Name Date Opened Amount
Date
Date of Birth Class(N.VIP) Date
Interest Rate
Gender Time
Collateral
Telephone Reference Time
Email
RELATIONAL DATABASE MODELING
SOLUTION
MODELING THE DATABASE OF KIMBO
Police Credit Union
STEP 2:
RELATIONSHIPS
ACCOUNTS
m
has

CUSTOMER makes m
1 TRANSACTION

takes
m
LAON
RELATIONAL DATABASE MODELING
SOLUTION
MODELING THE DATABASE OF KIMBO
Police Credit Union
STEP 1: CONCEPTUAL
DESIGN
ENTITIES & ATTRIBUTES
CUSTOMER ACCOUNT
TRANSACTIONS
CID(pk) LOANS
AID(pk) TID(pk)
LID(pk)
First Name Type (D,S) Type(D,W,S,LP)
Amount
Last Name Date Opened Amount
Date
Date of Birth Class(N.VIP) Date
Interest Rate
Gender CID(fk) Time
Collateral
Telephone Reference Time
Email CID(fk)
RELATIONAL DATABASE MODELING
SOLUTION
MODELING THE DATABASE OF KIMBO
Police Credit Union
STEP 3: The ERD

ERD ERD
Version 1 Version 2
RELATIONAL DATABASE MODELING
SOLUTION
MODELING THE DATABASE OF KIMBO
Police Credit Union
STEP 3: The ERD Vs ACCOUN
2 TS
has

CUSTOM
ER TRANSACTI
ON
make
s

LOAN
takes
RELATIONAL DATABASE MODELING
SOLUTION
MODELING THE DATABASE OF KIMBO
Police Credit Union
STEP 4: Physical
Design
CID FN LS Gend DOB Tel Email
er Customer
Text Text Text Text Date/ Text Hyperlin Table
Time k
AID Type Date Opened Class CID
Accounts Table
Text Text Date/Time Text Text

TID Type Amou Date Time Ref CID Transaction


nt Table
Text Text Curren Date/ Date/ Text Text
cy Time Time
LID Amou Date Intere Collater Time CID Loan Table
nt st al
Rate
Text Curren Date/ Text Text Date/ Text
cy Time Time
RELATIONAL DATABASE MODELING
IMPLEMENTATION

BUILDING DATABASE OBJECTS:


 DATABASE SCHEMA
 TABLES
 RELATIONSHIPS
 QUERIES
 FORMS
 REPORTS
 MACROS
 SWITCH BOARD
RELATIONAL DATABASE MODELING
IMPLEMENTATION

PRACTICAL PHASE

SWITCH TO MACHINE
AND LETS BUILD
TOGETHER

You might also like