You are on page 1of 31

Chapter 4:

DATABASE CONCEPTS
(Subject code: 201085)

Prepared by: Accounting department 3


Target of Chapter 4

 Understand the role of databases in decision


making and reporting systems

 Describe the components of database

 Describe database models

2
20/04/2016 201085 - Database concepts
Target of Chapter 4 (Cont)

 Identify data needed to collect

 Describe the relationship among the tables of


data

3
20/04/2016 201085 - Database concepts
Contents

4.1 The role of databases in decision making


and reporting systems

4.2 The concept of database

4.3 Database models

4.4 The relationships in database

4
20/04/2016 201085 - Database concepts
The Role of Databases in Decision
Making & Reporting Systems

 Database: a shared computerised structure


that captures, stores and relates data

 Database system: a system of hardware,


software, people, procedures and data that
allow the capture, storage, management and
use of data within a database environment

20/04/2016 201085 - Database concepts 5


Database Concepts

 Relational database: a database that stores


data in a number of tables
Database Concepts
 Table: a collection of columns (attributes) and
rows (objects) that describe an entity

 Record: a connected set of fields that describe


a person, place or thing

20/04/2016 201085 - Database concepts 6


Database Concepts (Cont)

 File: a file is a collection of records that are


related

 Primary key: an attribute (or column) that


uniquely identifies a particular object (or row)

 Composite key: a combination of more than


one primary key. It indicates an M:N
relationship between the columns

20/04/2016 201085 - Database concepts 7


Database Concepts (Cont)

20/04/2016 201085 - Database concepts 8


Data Redundancy

 Data redundancy: the situation where exactly


the same data is recorded and stored in different
location which can lead to data inconsistency
Data Redundancy
and anomalies

 Data integrity: data that provides a consistent


and correct representation regardless of where it
is sourced from within a file system

20/04/2016 201085 - Database concepts 9


Data Anomalies

 Data anomalies: inconsistencies or errors that


exist in a database because of entry or
changes
o
Data Anomalies
Modification anomalies
o Insertion anomalies
o Deletion anomalies

20/04/2016 201085 - Database concepts 10


Database Models

 Database management system (DBMS): a


group of programs that manipulate the
database and provide the interface between
the databaseDatabase Models
and the user as well as other
application programs

 Procedures: the instructions and rules that


govern the design and use of the software
outside programming

20/04/2016 201085 - Database concepts 11


The Database System

20/04/2016 201085 - Database concepts 12


Advantages of Database Systems

 Eliminates data repetition

 Eliminates inconsistent data

 Allows for organisational wide data sharing

 Reduced program maintenance

 Increased flexibility & speed

 Improves system security

20/04/2016 201085 - Database concepts 13


Dataflow in a Database System

20/04/2016 201085 - Database concepts 14


Database Functions

o Data dictionary o Backup and recovery


o Data storage management
management o Data integrity
o Data transformation management
and presentation o Access language
o Security and application
management programming
o Multi-user access interfaces
control o Communication
interfaces

20/04/2016 201085 - Database concepts 15


Types of Database Models

 Data base models are a collection of logical


constructs used to represent the data structure
and the data relationships found within the
database
Types of Database Models

 Two categories of models:


o Conceptual models focus on a logical view of what is
represented in the DB
o Implementation models show how the data are
represented in the DB including the structures
implemented.
20/04/2016 201085 - Database concepts 16
DB Modelling, Design &
Implementation of Relational

Databases
Data models are used to describe and represent
complex real-world data structures

 A good DB design is the foundation of good


applications

 Different people view data differently

 Starts with a conceptual model that provides a global


view of the data

 Entity relationship model most widely used model

20/04/2016 201085 - Database concepts 17


Entity Relationship Model

Incorporates:
 Entities: represent real-world things or
objects such as employees, customers
 Attributes: characteristics of entities e.g.
Entity
customer Relationship Model
name
 Relationships: are associations between
entities
o Cardinality expresses the number of entity
occurrences associated with one occurrence of a
related entity
o Connectivity describes the relationships among
entities
20/04/2016 201085 - Database concepts 18
Entity Relationship Model

Entity Relationship Model

20/04/2016 201085 - Database concepts 19


Developing E-R Diagrams

1. Develop a general narrative of the


organisation’s operations including the
business process, policies and business rules
Developing E-R Diagrams
2. Contrast the ERD by identifying the internal
and external entities and the relationships
among them from the narrative in Step 1.
Cardinalities and business rules can also be
assigned based on the narrative

20/04/2016 201085 - Database concepts 20


Developing E-R Diagrams (Cont)

3. Have the ERD reviewed by each area of the


company with ownership of the operations,
policies and processes

4. Make the necessary modifications to


incorporate any newly discovered entity
relationship components

20/04/2016 201085 - Database concepts 21


Database Design

 The table is the basic building block in


database design

Database
 Table structures must beDesign
efficient to allow fast,
error-free, and duplication-free flow of
information

 Tables are created to represent every internal


and external entity and their attributes

20/04/2016 201085 - Database concepts 22


Database Design (Cont)

 One-to-many relationship (1:M): a


relationship that relates one entity to many
attributes. One entity can have many attributes
but each attribute belongs to only one entity

 Many-to-many relationships (M:N): a


relationship that relates many entities to many
attributes. Many entities can have many
attributes and each attribute belongs to many
entities

20/04/2016 201085 - Database concepts 23


Possible Entity Relationships

20/04/2016 201085 - Database concepts 24


Top-Down V Bottom-Up DB
Design
 The E-R diagram is a strategic top down way of
developing a database model

 Normalisation is the bottom up view of


designing a database

 Once the table structure is defined,


normalisation is used to assign attributes to
entities

 Both techniques are used in the design


process

20/04/2016 201085 - Database concepts 25


Normalisation

 “a set of rules and a process of assigning


attributes to entities to eliminate repeating
Normalisation
groups and data redundancies, and to form
tables representing entities that promote
structural and data independence”

20/04/2016 201085 - Database concepts 26


Review of Chapter 3

 Considered the role of DBs in decision making

 Outlined the functionofofChapter


Review a database
3 as well as
key concepts

 Explored the concept of data redundancy and


the advantages of databases

20/04/2016 201085 - Database concepts 27


Review of Chapter 3 (Cont)

 Overviewed the relational database model

 Demonstrated how database models are


developed using E-R diagrams

 Introduced the concept of normalisation

20/04/2016 201085 - Database concepts 28


Key Terms

o Attributes
o Database system
o Cardinality
o Deletion anomalies
o Composite key
o Entities
o Conceptual models
o E-R model
o Key
Controlled redundancies Terms o Fields
o Data anomalies
o File
o Data integrity
o Foreign key
o DB models
o Insertion anomalies
o Data redundancy
o Logical representation
o DBMS
o Many-to-many
relationships

20/04/2016 201085 - Database concepts 29


Key Terms (Cont)

o Modification anomalies o Record


o Normalisation o Server
o One-to-many o Software
relationships o Structural independence
o Physical representation o Structured query
o Primary key language
o Relational database o Table

20/04/2016 201085 - Database concepts 30

You might also like