Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lesson01 Introduction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1 Lesson 1: Introduction to Database Systems

Introduction

A file system is basically a way of arranging the files in a storage medium like hard disk. File system
organizes the files and helps in retrieval of files when they are required. File systems consists of
different files which are grouped into directories. The directories further contain other folders and files.
File system performs basic operations like management, file naming, giving access rules etc. Examples
of Files systems are FAT, NTFS, EXT, and others.

On the other hand, a database is an organized collection of structured information, or data,


typically stored electronically in a computer system. Databases make the task of data management
easy. Examples of databases are covered in section 1.4.

Database Management System (DBMS) is a collection of programs that enable its users to create
and access databases, manipulate data, reports, and represent data. It also helps to control access to the
database. The main functions of a DBMS are discussed in more detail in section 1.6

Key differences between a File System and a DBMS

FILE SYSTEM DBMS

It is a software that manages and organizes files in It is a software for managing the database.
a storage medium within a computer.

File systems are prone to data redundancy. There is no redundant data in DBMS.

Does not provide backup and recovery of lost data. It provides backup and recovery of data even
if it is lost.

There is no efficient query processing mechanism DBMS features an efficient query processing
mechanism

There is less data consistency in a file system. There is more data consistency because of the
process of normalization.

It is less complex as compared to DBMS. It has more complexity in handling as


compared to file system.

File systems provide less security in comparison to DBMS has more security mechanisms as
DBMS. compared to file system.

It is less expensive than DBMS. It has a comparatively higher cost than a file
system.

Application of DBMS

Banking, Insurance, aviation, Education, Telecommunication, Finance, Sales, Manufacturing,


Warehousing, Transport, HR, etc

1
Types of DBMS

The main types of DBMS are hierarchical databases, network databases, relational databases, and
object-oriented databases

Hierarchical Model
In a Hierarchical database, model data is organized in a tree-like structure. Data is Stored
Hierarchically (top down or bottom up) format. Data is represented using a parent-child relationship.
In Hierarchical DBMS parent may have many children, but a child has only one parent. Eg. Windows
OS registry

MUST

SCI SPAS

CS IT MATH PHY BIO

BIT BIS

Network Model

The network database model allows each child to have multiple parents. It helps you to address the
need to model more complex relationships like as the orders/parts many-to-many relationship. In this
model, entities are organized in a graph which can be accessed through several paths.

This was the most widely used database model, before the introduction of the Relational Model.

Relational model

Relational DBMS is the most popular DBMS model because it is one of the easiest. This model is
based on normalizing data in the rows and columns of the tables. Relational model stored in fixed
structures and manipulated using SQL. Examples of DBMS using relational model are IBM DB2,
Microsoft Access, LibreOffice Base, Microsoft SQL Server, Oracle, MySQL, MariaDB,
PostgreSQL, SQLite

In the next lesson we shall have a detailed look at entity relationship model and relational model.

Object-Oriented Model

2
In Object-oriented Model data is stored in the form of objects. The model is based on object-oriented
programming (OOP). The database is defined as a collection of objects. Objects have members such
as properties and methods. Objects also have a life cycle that includes the creation of an object, use of
an object, and deletion of an object. The key characteristics of OOP are encapsulation, inheritance, and
polymorphism.

Examples of DBMS using this model are Cache, ConceptBase, Db4o, ObjectDB, ObjectDatabase++,
Objectivity/DB, ObjectStore, Versant Object Database, WakandaDB

Components of a DBMS

There are five main components of a database:

i. Hardware:

The hardware consists of physical, electronic devices like computers, I/O devices, storage devices, etc.
This offers the interface between computers and real-world systems.

ii. Software:

This is a set of programs used to manage and control the overall database. This includes the database
software itself, the Operating System, the network software used to share the data among users, and
the application programs for accessing data in the database.

iii. Data:

Data is a raw and unorganized fact that is required to be processed to make it meaningful. Data can be
simple at the same time unorganized unless it is organized. Generally, data comprises facts,
observations, perceptions, numbers, characters, symbols, images, etc.

iv. Procedure:

Procedure are a set of instructions and rules that help you to use the DBMS. It is designing and running
the database using documented methods, which allows you to guide the users who operate and manage
it.

v. Database Access Language:

Database Access language is used to access the data to and from the database, enter new data, update
already existing data, or retrieve required data from DBMS. The user writes some specific commands
in a database access language and submits these to the database.

DBMS Functions

There are several functions that a DBMS performs to ensure data integrity and consistency of data in
the database. The ten functions in the DBMS are: data dictionary management, data storage
management, data transformation and presentation, security management, multiuser access control,
backup and recovery management, data integrity management, database access languages and
application programming interfaces, database communication interfaces, and transaction management.

1. Data Dictionary Management

3
Data Dictionary is where the DBMS stores definitions of the data elements and their
relationships (metadata). The DBMS uses this function to look up the required data component
structures and relationships. When programs access data in a database they are basically going through
the DBMS. This function removes structural and data dependency and provides the user with data
abstraction. The data dictionary is often hidden from the user and is used by database administrators
and programmers.

2. Storage Management

This particular function is used for the storage of data and any related data entry forms or screen
definitions, report definitions, data validation rules, procedural code, and structures that can handle
video and picture formats. Users do not need to know how data is stored or manipulated. Also
involved with this structure is a term called performance tuning that relates to a database’s efficiency
in relation to storage and access speed.

3. Data Transformation and Presentation

This function exists to transform any data entered into required data structures. By using the data
transformation and presentation function the DBMS can determine the difference between logical and
physical data formats.

4. Security Management

Security management sets rules that determine specific users that are allowed to access the
database. Users are given a username and password or sometimes through biometric authentication.
This function also sets restraints on what specific data any user can see or manage.

5. Multiuser Access Control

Data integrity and data consistency are the basis of this function. Multiuser access control enables
multiple users to access the database simultaneously without affecting the integrity of the database.

6. Backup and Recovery Management

Whenever there are potential threats to a database eg. power outage, recovery management deals with
how long it takes to recover the database after the outage. Backup management function refers to the
data safety and integrity.

7. Data Integrity Management

The DBMS enforces integrity constraints to reduce data redundancy, maximize data consistency,
ensure that database queries returns the correct/same answer each time for same query.

8. Database Access Languages and Application Programming Interfaces

A query language is a nonprocedural language. An example of this is SQL (structured query language).
SQL is the most common query language supported by the majority of DBMS. The use of this
language makes it easy for user to specify what they want done without the headache of explaining
how to specifically do it.

9. Database Communication Interfaces

4
A DBMS can accept different end user requests through different network environments. An example
of this can be easily over intranets and internet. A DBMS can provide access to the database over the
Internet using browsers

10. Transaction Management

A DBMS must provide a mechanism to guarantee that all the updates in a given transaction are
made or not made. All transactions must follow what is called the ACID properties.

A – Atomicity: states a transaction is an indivisible unit that is either performed as a whole and not by
its parts, or not performed at all.

C – Consistency: A transaction must alter the database from one consistent state to another consistent
state.

I – Isolation: Transactions must be executed independently of one another. Part of a transaction in


progress should not affected by another transaction.

D – Durability: A successfully completed transaction is recorded permanently in the database and must
not be lost due to failures.

Lab 1: Setting up the Lab environment

1. Download and install MySQL server. ( XAMPP)


2. Download and install the MySQL Workbench.
3. Test and ensure that the database server is running

You might also like