Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 62

1

INFORMATION

MSM-MBA 2020 Even Semester


MANAGEMENT

UNIT 3: DATA BASE


MANAGEMENT SYSTEM
Content 2

DBMS (Database Management System)

MSM-MBA 2020 Even Semester


1.

2. HDMBS (Hierarchy based Data base management system)

3. NDBMS (Network Database management system)

4. RDBMS (Relational Database Management System)

5. Query processing

6. SQL

7. Concurrency Management

8. Data Warehousing and data mart


File concepts 3

 A data element or field – logical collection of

MSM-MBA 2020 Even Semester


characters
 A record – collection of logically grouped data
elements
 A record – usually a collection of data elements
describes entity
 A file is a collection of records of one type (e.g.)
details of employee record –”Employee file”
File structure 4

MSM-MBA 2020 Even Semester


 The way you choose to store records on
magnetic media called “File structure”

1. Sequential file structure – one way to store


the employee records sequentially using an
ID. The retrieval of data is difficult. The
most inexpensive and economical one

Contd…
2. Direct file structure 5

MSM-MBA 2020 Even Semester


 Another way to store records is to store

randomly – allows direct access to data in

storage devices. Easy and direct retrieval.

But sometimes multiple storage slows down

the system
Contd…
3. Indexed sequential file 6

structure

MSM-MBA 2020 Even Semester


 Third way to store records is sequentially on a direct
access medium

 Index is maintained as records are added to the file

 This method is called “Indexed sequential access method”


ISAM

 But indexed files require maintenance of the indexes.

 The system lead to slow performance where direct access


saves time
Accessing records 7

MSM-MBA 2020 Even Semester


 Organization or manager need to:

1. Adding new record to a file

2. Deleting records from a file

3. Modifying records in a file

4. Viewing records in a file

5. Creating reports from records in a file


Inverted files 8

MSM-MBA 2020 Even Semester


 ID method uses primary key for finding

and identifying stored data.

 Secondary key used that have secondary

indexes called “Inverted Keys”.


Linked files 9

MSM-MBA 2020 Even Semester


 The set of data retrieved by the pointer

when the search of records called “Linked

lists”.

 The method use to store records, affect the

access/retrieval of data
File structures 10
 File structure not only affect the access to data or record but

MSM-MBA 2020 Even Semester


also processing of data or record.
1. File structures in online/real-time processing:
Here process is online/real time, so the direct
access of records either indexed sequential or direct
structure used.
2. File structures in batch processing:
Sequential access file structure – help in accessing
of records in the accumulated batch of files and the entire
batch is processed
Appropriate file structure should be used for the type of
processing requirement
Data base concepts 11

MSM-MBA 2020 Even Semester


Database – collection of related files; files is a
collection of records

Data independence – the lack of data independence –


any tie the record format of a file was changed. This
change will affect all corresponding files

Data redundancy – single record type file systems

Data consistency – update of data in file may not ensure


update in associated files/records. Data inconsistency
Database Management Systems 12
(DBMS)

MSM-MBA 2020 Even Semester


 DBMS – collection of software programs that

1. Store data in a uniform and consistent way

2. Organizes data into records in a uniform and


consistent way

3. Allows access to the data in a uniform and consistent


way

DBMS retrieves data from databases and provides them to


the application programs
Diagrammatic representation of 13
Process of DBMS

MSM-MBA 2020 Even Semester


Application
program

(DBMS) Database
Management System Database

Application
program
Components of DBMS 14

MSM-MBA 2020 Even Semester


- Organization mostly purchase Database
Management system software from vendors

1. Data dictionary/directory:

Contains the names and description of every data


element in the database

(e.g.) Data element name: “STOCKNUM” description:


No. of inventory item

Contd…
15
2. Data Language: Programmers use a special

MSM-MBA 2020 Even Semester


language uniformly called “Data

Description Language” (DDL) – describe

the characteristics of the data element

(e.g.) command language –

“FIND,GET&INSERT Contd…
16
3. Teleprocessing monitors:

MSM-MBA 2020 Even Semester


It is a communication software package that

manages communication between the database

and remote terminals.

(e.g.) customer orders processed in branch or store

and sent to the database located in Headquarters

Contd…
17
4. Application development tools:

MSM-MBA 2020 Even Semester


It is a program designated to help

programmers develop application programs

that use the database

(e.g.) CASE tools (Computer Aided Software

Engineering)
Contd…
18
5. Security software:

MSM-MBA 2020 Even Semester


A security software provides the

variety of tools to shield the

database from unauthorized

access and from unwanted viruses


Contd…
19
6. Archiving, Backup and recovering system:

MSM-MBA 2020 Even Semester


Archiving programs – database manager with tools to make

copies of the database – in case original records in database –

damaged or destroyed.

Restart/recovery systems – tools used to restart the database

and to recover lost data in event of a failure

Back up systems – making copies of data and store safer

Contd…
20

7. Report writers:

MSM-MBA 2020 Even Semester


-report writers – design of output

requirement needed by the end user

Contd…
8. Query Language:
21
It is a set of commands – primarily for accessing data from a database

MSM-MBA 2020 Even Semester


three tools – SQL (structured Query Language); NLQ(Natural

Language Queries) and QBE (Query by Example)

(e.g.) SQL queries SELECT NAME,ADDRESS,CITY

FROM CUSTOMER

WHERE

COUNTRY=“IN”

NLQ Queries “LIST THE NAMES AND ADDRESS OF ALL


Contd…
CUSTOMERS IN INDIA”

QBE queries – does not require statement – any text or picture


22
9. Multiple platform databases:

MSM-MBA 2020 Even Semester


Some vendors provide DBMS

software work on many different

hardware and OS platforms.

Contd…
23
10. Web server software:

MSM-MBA 2020 Even Semester


Vendors provide integrated WWW

server software with DBMS

The software turns the computer system

having the database into a web server and

enables users with web connectivity


The database administrator 24

MSM-MBA 2020 Even Semester


- Development of DBMS has created a need for organizational

changes within firms

- Focal point of changes – lead to position of the database

administrator

- The company’s functional database shared by other

department – no need of DBA

- Data base Administrator maintains data consistency and

security
View of data 25
 Any data base contains two types of data

MSM-MBA 2020 Even Semester


1. Actual data – such as employee names and so on…

2. Meta Data – how each data element relates to other data


element

Data in the database have 2 views

3. Logical View – Way user perceive records in the database

4. Physical view – records are actually organized and stores on


the storage media

Contd…
26
The schema – is a description of the logical

MSM-MBA 2020 Even Semester


view of a database

Common tool used to design schema in an


entity relationship diagram

Sub-system – A Less comprehensive logical


view of the database

- View used by an application programmer, an


application program or a user.
Database models 27
 Data in one record must have relationship with data in

MSM-MBA 2020 Even Semester


another record

Man power
Database

Payroll
Employee Data
Database base

 Finding the relationship in large organization is complex and

so some of models used in organization. These

organizational approaches called “Database models”.


Types of Data Base models 28

MSM-MBA 2020 Even Semester


 There are four types of database models:

1. Hierarchical database model

2. Network database model

3. Relational database model

4. Object Oriented database model


Hierarchical Database model 29

MSM-MBA 2020 Even Semester


records are organized into hierarchy of
relationships (i.e.) parent and child relationship.

- A parent record may have many child record. But


one child doesn’t have parent record

r2

r5
r1 r3
r6

r4
Network Database Model 30

MSM-MBA 2020 Even Semester


 Network database model advanced than
hierarchical model; a set of record may form
network with the another set of records

r2

r5
r1 r3
r6

r4
Relational Database model 31

MSM-MBA 2020 Even Semester


It is organized into a series of two dimensional
tables. The records are easy to access and
understand

R1 R5 R6 R7

R2 X Y Z

R3 X Y Z

R4 x y z
Object Oriented Database model 32

MSM-MBA 2020 Even Semester


 It is bound together with its own data and a set of instructions
that describes the behavior and attributes of the objects.

 Objects that have the same set of attributes and methods are
grouped into a class

 Objects use messages to interact with one another

 Object is described by a set of attributes

r1 r2 r3

Object 1 Object 2 Object 3


Advantages of Database Management 33
System

MSM-MBA 2020 Even Semester


1. Data sharing is easy and available

2. Data redundancy reduced significantly

3. Improved data consistency

4. Database system keeps description of data separate from

applications (data independence)

5. Increased application programmer and user productivity

6. Improved data administration and control

7. Increased emphasis on data as a resource


Problems of Database system 34

MSM-MBA 2020 Even Semester


1. Concurrency problems – Accessing the
database by multi-users simultaneously

2. Resource problems – requires extra


computing resources

3. Security problems – database must be


protected from the unauthorized access of
data
Query processing 35
 Query processing – procedure of transforming a high

MSM-MBA 2020 Even Semester


level query (like SQL) into correct and efficient
execution plan expressed in low level language

 Performs the retrieval and manipulation in the database

 A query processor select the most appropriate plan –


used in responding to a database

 SQL query processing requires DBMS to identify and


execute a strategy for retrieving the results of the query
Steps in Query processing 36

MSM-MBA 2020 Even Semester


 Step 1: Syntax analysis – SQL query

analyzed for syntax error

 Step 2: Query decomposition – phase of

query processing transform high level query

to machine level query


Pictorial diagram of query 37
processing

MSM-MBA 2020 Even Semester


High level Query Language

Query Decomposer

Query optimizer

Query code Generator/ Query


Interpreter

Run time database processor


38
 Query decomposer works in five stages:

MSM-MBA 2020 Even Semester


1. Query analysis

2. Query normalization

3. Semantic analysis

4. Query simplifier

5. Query restructuring

Query optimizer – choosing an efficient execution strategy

for processing a query


Structured Query Language 39

MSM-MBA 2020 Even Semester


 International standard language for creating or

manipulating relational databases

 SQL – special purpose programming Language

designed for managing data held in a relational

database management (RDBMS)


SQL Data Types 40

MSM-MBA 2020 Even Semester


 Data types are:

1. CHARACTER(n) 6. DECIMAL (p , q)

2. CHARACTER 7. INTEGER

VARYING(n) 8. SMALLINT

3. BIT 9. FLOAT (P)

4. BIT VARYING(n)

5. NUMERIC (p , q)
SQL commands 41
 Lines of SQL codes – SQL application to perform simple

MSM-MBA 2020 Even Semester


tasks against data inside of a database

Types of SQL commands:

1. Data definition language (DDL)

2. Data query Language (DQL)

3. Data Administration statements (DAS)

4. Data Manipulation Language (DML)

5. Data Control Language (DCL)

6. Transaction control statements (TCS)


1. Data Definition Language (DDL) 42
a. CREATE TABLE – statement used to create tables to store
data

MSM-MBA 2020 Even Semester


Syntax:
CREATE TABLE table_name
(
Column_name1 Data_type
Column_name2 Data_type
);
(e.g.)
CREATE TABLE employee
(
Employee code Integer,
Name char(20)
Gender char(1) Contd…
);
b. ALTER TABLE – used to change definitions of existing 43
tables

MSM-MBA 2020 Even Semester


Used to add a column, add an integrity constraint, to

redefine a column (data type, size, default value)

Syntax:

ALTER TABLE table_name

ADD Column_name Data_typesize [constraint_name]

(e.g.) ALTER TABLE Employee

ADD (tel_number integer);


Contd…
44
c. DROP TABLE: command used to remove an object

MSM-MBA 2020 Even Semester


from the database

once drop can’t get it back

Syntax:

DROP TABLE table_name

(e.g.) DROP TABLE Employee


Data Manipulation Language 45
 Users to insert data into database, modify and delete the data in the

MSM-MBA 2020 Even Semester


database

 3 data manipulation commands:

a. INSERT statement – 2 ways to insert data into a table

1. Inserting data directly into a table

syntax:

INSERT INTO table-name[col-1,col-2,col-3… col-n]

VALUES (value-1,value-2,value-3….value-n);

(e.g.) INSERT INTO Employee


Contd…
VALUES (015, ‘srinath’, ‘Aeronautics’)
b. UPDATE Statement: UPDATE command specify the rows to be changed 46
using the WHERE clause and the new data using the SET keyword.

MSM-MBA 2020 Even Semester


syntax:

UPDATE table-name

SET Column_name = new-value

WHERE Column_name = some-value

(e.g.) UPDATE weather

SET average temp = 20 degree Celsius

WHERE City = ‘Madurai’

Contd…
 DELETE statement:
47

The SQL DELETE statement allows to delete a single

MSM-MBA 2020 Even Semester


record or multiple records from a table

Syntax:

DELETE FROM table_name

WHERE Column_name = some_value

(e.g.)

DELETE FROM weather

WHERE city = ‘Nagpur’


Data query Language (DQL) 48

(c) This SQL statement enables the user to query one

MSM-MBA 2020 Even Semester


or more table to get information they want.

1. SELECT Statement – used to select data from a


table.

Syntax: SELECT Column_name(s) FROM


table_name;

(e.g.) SELECT ______ FROM ______;

SELECT city FROM weather; Contd…


49
(d) (DCL) Data control language:

MSM-MBA 2020 Even Semester


- to prevent unauthorized access to data

1. GRANT 2.REVOKE

(e) Data Administration Statements (DAS):

- allows the user to platform audits and analysis on


operations within the database

(1) START AUDIT (2) STOP AUDIT

(f) Transaction control statements (TCS):

- manage all the changes made by the DML statements

(1) COMMIT (2) ROLLBACK (3) SAVEPOINT


Contd…
Aggregate functions 50

MSM-MBA 2020 Even Semester


1. SUM() function – returns the total sum of a numeric column

2. COUNT() function – allows to count the number of row in a

certain table

3. MIN() function – returns the smallest value of the selected

column

4. MAX() function – returns the largest value of the selected

column
51
 Advantages: Programming

MSM-MBA 2020 Even Semester


1. Portable • Disadvantages

2. Easy to learn and 1. Vendor variation

understand 2. Join inconsistencies

3. Used with any DBMS 3. Misconstructions in

4. Interactive Language WHERE

5. Support Object based 4. Complex grammar


Concurrency Management 52

MSM-MBA 2020 Even Semester


 (Parallel) concurrency is a property of
systems in which several computations are
executing simultaneously
 When more than one user utilizes a DBMS,
problems can occur if the system is not
designed for multi users
 Concurrency problem –concurrency control
Reasons for concurrency Management 53

MSM-MBA 2020 Even Semester


1. To improved throughput and resource utilization

2. To reduce waiting time

 Methods to avoid concurrency:

1. Locking file

2. Locking record

3. Locking data field

4. Versioning
Data Warehousing 54

MSM-MBA 2020 Even Semester


 A data warehouse is a collection of corporate
information, derived directly from
operational system and some external data
sources.
 A data warehousing is subject oriented
integrated non volatile, time carrying
collection of data in support of its decision
making process.
55
Feature of data warehousing

MSM-MBA 2020 Even Semester


1. Subject oriented

2. Integrity

3. Time variant

4. Non volatile
Architecture/structure of data 56
warehouse

MSM-MBA 2020 Even Semester


 Data warehouse 3 tier:

1. Bottom tier – transaction processing

2. Middle tier – Analytical processing

3. Top tier – reporting, analysis and data


mining tools
57
Components of data warehouse

MSM-MBA 2020 Even Semester


1. Data warehouse database:

a. Parallel relational database design

b. New indexed structure to bypass relational table

c. Multidimensional database

2. Sourcing, acquisition, clean up and transforming tools

d. Removing unwanted data

e. Converting to common data name and identification

f. Calculating summary and drive data

g. Establishing default for missing data

h. Accommodating source data definition changes Contd…


58
3. Meta data:

data that describes the data warehouse

MSM-MBA 2020 Even Semester


4. Access tools:

a. Query and reporting tools

b. Applications

c. Online analytical processing (OLAP)

d. Data mining

e. Data marts

f. Data warehouse administration and management

g. Information delivery system


Data Mart 59

MSM-MBA 2020 Even Semester


 Partitions of overall data warehouse

 Data marts provide the easiest

possible access to information

required by its user community


Characteristics: 60
1. Data mart aims to meet a department needs

MSM-MBA 2020 Even Semester


2. A data warehouse spans the entire organization –designed using
enterprise data model
3. The data mart is easy to design, build and test
4. Contains only a small part of an organization’s data
5. Data warehouse needs to be planned and implemented as huge projects
6. An organization can build many data marts independently
7. An organization can have different data marts – using different design
8. No uniformity in data mart
9. Data mart source can be a data warehouse, data mart or OLTP (Online
transaction processing)
Types of data marts 61

MSM-MBA 2020 Even Semester


1. Multidimensional database data

mart

2. Relational OLAP
62

MSM-MBA 2020 Even Semester


The End

You might also like