0% found this document useful (0 votes)
32 views36 pages

SMCMondayVer Introduction To Databases Week 2 Slides

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views36 pages

SMCMondayVer Introduction To Databases Week 2 Slides

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

ISM 211: Introduction to

Database Systems
Joshua Osah
History of Databases

2
History and Evolution of Databases
Attempts to replicate how physical manual files were stored
brought about the concept of file storage on computers (use
of an analogy).

The operating system of the computer was programmed to


understand stored information within files as blocks of bytes.

3
Concept of file storage on computers

4
History and Evolution of Databases
With computers, stored information is viewed as sequence of bytes using
File Allocation Tables (FAT).

FAT’s are logical tables that divide a disk into clusters.

The FAT tells the operating system where blocks of bytes related to a
particular file is located.

5
History and Evolution of Databases
Basic unit of data storage on a computers hard-disk is a sector.

A sector’s size is typically 512 bytes.

However, the basic unit of storage for a file on disk is a cluster.

In older hard-disks, a cluster was equivalent to 4 sectors (512 * 4) = (2048


bytes make up a cluster).

However, in modern disks, a cluster is equivalent to 8 sectors (still


consisting of 512 bytes).

The integration of sectors to make up clusters for file storage is done to


reduce bookkeeping overhead.

6
History and Evolution of Databases
There were no restrictions on
what data could be stored to a
particular file.

The file system was more


concerned with how
information was stored than
with what was stored.

When a file is selected the


operating systems kernel map’s
the file name to block of byte
numbers (unique addresses),
using the FAT.

7
History and Evolution of Databases
A created folder on the computer could constitute a file.

The file system does not predefine what data


types/formats can be stored in a file.

This form of storage was suitable for relatively small data


sets (not suitable for systematic analysis and queries).

With time, there was increasing realization that querying


large data sets and related data using the file system will
be time consuming.

The lack of the file systems ability to handle transactions


properly was also viewed as an impedance to its
continued use for effective data storage.
Inability to aggregate data from multiple sources (e.g. Example of file system of
carry out JOINs between unique data elements. storage

8
Introduction of Databases
With some of the challenges presented by the file system, the database
system of storage was introduced.
File system vs Database:
File System Database System
Arbitrary storage (random) Structured schema to support
structured data storage
Well suited for relatively small Well suited for large data sets.
data sets.
Not well suited for transaction Well suited for transaction handling
handling. with the integration of its ACID
properties.
Suited for carrying out simple Appropriate for handling complex data
queries or searches sets (queries that require data/record
joins).
Data and program inter- Data and program independence
dependence
Moderate Cost. More
9 expensive than the file system.
Database Management System
(DBMS)
The DBMS is a system software employed for creating and managing a
database. It provides database users with a systematic way of creating,
retrieving, updating, and managing data.

The DBMS serves as an interface between the database and the end users
or application programs that make use of the database.

10
Database Management System
(DBMS)

Ultimately, the DBMS serves the purpose of providing a centralized view of


data that can be accessed by multiple users situated in various locations in a
controlled manner.

This means that the DBMS is employed to determine what data a user has
access to, as well as how this data is presented to the user.

11
Database Management System
(DBMS)
Specific services provided by the DBMS:
Data abstraction and independence
Data security.
A locking mechanism to support concurrent user access.
The ability to swiftly recover from crashes and errors.
Allows querying using a query language/system of commands (e.g.
Structured Query Language (SQL)).
Ensures uniform administration procedures.
Moves data to and from the physical data files as needed.

12
Database Management System
(DBMS)

Interface structure between the database and end user


13
Examples of DBMS’s

14
Classwork
Mention and briefly describe 4 services provided by the DBMS?

Describe 2 benefits of having a database as opposed to ordinarily storing


data using the file system?

15
Database representation/abstraction and data
independence

16
Database Abstraction levels
The DBMS provides three levels of abstraction:

The external/view level of abstraction


The logical level of abstraction
The internal level of abstraction

This three level abstraction was officially proposed by the American National
Standards Institute/Standards Planning and Requirements Committee
(ANSI/SPARC) in 1978.

17
Watch video on data abstraction:

https://www.youtube.com/watch?v=LOgfAWwai
r4

18
Database Abstraction levels
External level: This is the level with which the database end user
interacts. This level includes variations of end user views.

19
Database Abstraction levels
Logical level of abstraction: This view depicts how the database designer
sees the database. It is a definition of the database schema, which
illustrates the structure of the database for a community of users.

20
Database Abstraction levels
Internal/Physical level of abstraction: This level of abstraction is
concerned with how data is physically stored in the database. At this level,
data is represented as bits and bytes.

The DBMS works with a computer’s operating system to manage data files
automatically, including all file opening, closing, reading, and writing
operations (Oppel, 2009).

21
Data Abstraction Illustration

DBMS three layers of abstraction

22
Data Abstraction Mapping
The three levels of abstraction provided by the DBMS are connected. In
concert they enable the interfacing of the end user and the database.

This is achieved through a concept referred to as mapping.

Two forms of levels of mapping exist:


➢ An external-conceptual mapping: Specifies how external records are
specified at the conceptual level.

➢ A conceptual-internal mapping: Specifies how conceptual records are


specified at the internal level.

23
Data Independence
Scenarios may occur, where change to one of the abstraction levels is
required. The DBMS in anticipation takes this into cognizance by providing
data independence at the logical and internal/physical levels.

Data independence ensures that changes made at one abstraction level do


not affect the abstraction level with which it corresponds or interacts with.

Logical data independence: Ensures that changes at the logical level,


do not affect a users view level.

Physical data independence: Ensures that changes at the physical level


do not affect the conceptual, as well as the views levels of abstraction.

24
Classification of DBMS

25
Classification types of DBMS
DBMS’s can be classified based on a number of characteristics. More
commonly, they can be classified based on:
➢ Classification based on data model

➢ Classification based on number of users

➢ Classification based on number of sites

➢ Classification based on cost.

26
Classification based on data model:
DBMS classification based on data model is considered to be the most
common form of classification.
A data model is the use of data to illustrate reality
Common data models, which DBMS’s support include:
✓ The hierarchical model

✓ The network model

✓ The relational model

✓ Object oriented model

✓ Object relational model

27
Classification types of DBMS
Classification based on data model:
Hierarchical model:
✓ Data is organized into treelike structures.
✓ It is depicted in the form a parent/child relationship. Each parent or child

represents a record.
✓ Modelling rule demands that there is a single parent, with possibly many
children (one-to-many relationship).
✓ To access a child record, the parent record must be accessed (The topmost

parent node is known as the root node).


✓ These models were used with mainframes.

Example of this model is the Information Management System developed by


IBM and North American Aviation.

28
Classification types of DBMS
Classification based on data model:
The Network Model:
✓ Thought to be an improvement of the hierarchical model.

✓ Used with mainframe systems.

✓ Allowed a many parent to many children relationship unlike the


hierarchical model.
✓ Employed a concept of owner-member. (here a member record can
belong to several owner records).
✓ The concept is based on a mathematical structure termed directed-
graphs.
✓ It was developed by the conference on data systems language (CODASYL)
consortium.

29
Classification types of DBMS
Classification based on data model:
The relational model:
✓ The most commonly used data modelling approach.

✓ Represents a database as a collection of related tables.

✓ Tables are made up of columns and rows.


✓ Tables are related through primary and foreign keys.

✓ The concept of constraints are employed to limit entries into a table.

30
Classification type of DBMS
Classification based on data model:
Object oriented data models:
✓ Defines a database in terms of objects, properties, and operations.

✓ Objects containing the same structure and behavior belong to a class.

✓ Classes are organized into hierarchies (the concept of super-classes and

subclasses apply).
✓ Properties can only be accessed through methods (encapsulation).

✓ Suited for handling complex objects.

✓ Lacks ad-hoc query ability.

✓ Commonly used in computer aided design (e.g. software to aid digital


architectural drawing and data about this drawing) to store data.

31
Classification type of DBMS
Classification based on data model:
Object relational data model:
✓ Defines a database in terms of objects, properties, and operations.

✓ Well suited for handing complex objects.

✓ Provides a blend of object oriented and relational capabilities.

32
Classification type of DBMS
Classification based on number of users:
With this classification category, DBMSs can either belong to the single user
system group or the multiuser system group.

✓ Single-user systems: As the name implies, these DBMSs are designed to


support only one user. They are commonly associated with personal
computers.
✓ Multiuser systems: These DBMSs are designed to support multiple users.
Here concurrency mechanisms are put in place to ensure that data
integrity is not compromised by multiple users possessing write privileges.

33
Classification type of DBMS
Classification based on number of sites:
A site here relates to the number of locations where the DBMS is present.

This classification category is based on the number of sites over which the
DBMS and database set-up is distributed. DBMSs may either be centralized or
distributed.

✓ Centralized DBMSs: A DBMS that is centralized can support multiple users,


however with this design the database and DBMS reside at a single
computer site.
✓ Distributed DBMSs: A distributed DBMS provides more flexibility, as the
DBMS and the database are distributed over many sites – nonetheless
connected by a computer network. Distributed DBMSs are further
classified into homogenous and heterogeneous sub classes.

34
Classification type of DBMS
Classification based on number of sites:
Distributed DBMS (contd)

✓ Homogenous distribution: This involves a set-up whereby the same DBMS


software is used at all the different sites. An example of a homogenous
distributed DBMS is a library information system developed by a particular
vendor. The use of the same DBMS software, allows easy data exchange
between various libraries that make use of the software.

✓ Heterogeneous distribution: Here different DBMS software's can be used


at a number of distributed sites. Middleware software however can
integrate the various DBMS software’s. An example of this is a machine
readable cataloging format, which allows libraries using different DBMSs
to engage in bibliographic data exchange.

35
Classification type of DBMS
Classification based on cost:
DBMS’s may either be free or paid for. For instance, currently open-source
oriented DBMSs exist which are free. In contrast, there are DBMSs which
need to be paid for.

36

You might also like