01 - Introduction to Database

Published on March 2017 | Categories: Documents | Downloads: 46 | Comments: 0 | Views: 359
of 17
Download PDF   Embed   Report

Comments

Content

 

9/9/2013

INTRODUCTION TO DATABASE  – Semester 1 2013/2014

  earning Objective At the end of this module, students should be able to define and  identif the followin s: •

Some common uses of database systems (db).



Characteristics, problems and differences between file-based approach and db approach.



Meaning of terms - db, Database Meaning Database Management Management System (DBMS), db application system, db system



Personnel involved in the DBMS environment.



Advantages and disadvantages of DBMSs



Three-Level ANSI-SPARC ANSI-SPARC Architecture

1

 

9/9/2013

Introduction •

The now an integral dayto to-da -dadatabase li life fe that thatisoft often en such we we ar are e no not t aw awar areepart we of aare reour u usi sin n one • We will examine some applications of database system • We will use so some me terminology in this chapter :  –  database

: a collection of related data (databasee management management system) : the software that  –  DBMS (databas manages & controls access to the database  –  database application : a program that interacts with the database at some point in its execution  –  database system : a collection of application programs that interact with the database along with the DBMS and database itself 

3

Overview of DB System DB SYSTEM

.... ....

.... ....

DBMS

DB

DB USER  APPL ICATION ICATIONS S 4

2

 

9/9/2013

Traditional File Based System •

An early attempt to computerize the manual filing



Definition  – Collection of application programs that perform services for the end users (e.g. reports). Each  program defines and manages its own data. • Works well while the number of items to be stored is small. However, However, it breaks down when we have to cross-reference or process the information in the files.

5

File Based Processing

6

3

 

9/9/2013

File Based Processing •

Figure shows each department accessing their own for them.



Each set of departmental application programs handles data entry, file maintenance, and the generation of a fixed set of specific reports.   records are defined in the application code

7

Limitations of File-Based Approach Approach •

Se ara aratio tion n and and isol isolati ation on of of data data  –  Each

program maintains its own set of data.

 –  Users

of one program may be unaware of potentially useful data held by other programs.



   –  Same

data is held by different programs.

 –  Wasted

space and a nd potentially different values and/or different formats for the same item. 8

4

 

9/9/2013

Limitations of File-Based Approach Limitations •

Data dependence    –   –  Changes



.

to an existing structure are difficult to make

Incompatible file formats  –  Programs

are written in different languages, and so cannot easily access each other’s files.

   programs  –  Programs  –  Any

are written to satisfy particular functions.

new requirement needs a new program. 9

Database Approach •

The limitations of the file-based approach can 1. Definition Definition of data data was embedd embedded ed in appli applicatio cation n  programs, rather than being stored separately and independently. 2. No control control over access and manipul manipulation ation of data data  beyond that imposed by application application programs.



Result, a new approach was required: – 

the database and Database Management System (DBMS). 10

5

 

9/9/2013

The Database •

Definition :  –  Shared

collection of logically related data (and a description o s a a , es e s gne o mee e n orma on nee s o an organization.



A database is also defined as a self-describing collection of integrated records  –  The

description of the data is known as the system catalogue (metadata) to enable program–data enable program–data independence. independence.  –  The definition of data is separated from the application  program. definiti on and  –  The users of an object only see the external definition unaware of how the object is defined and how it functioned  •

Logically related data comprises entities, attributes and relationships of an organization’ organization’ss information.

 ,

11

Database Management System (DBMS) •

DBMS is the software that interacts with the user’ user ’s



Definition  - A software system that enables users to define, create, and maintain the database and that  provides controlled access to this this database. 1. 2. 3.



Define  using Data Definition Language (DDL) Create  insert, update, delete & retrieve data using Data Mani ulation Lan ua e DML Contr tro olled ac accces esse sed  d  security, integrity, concurrency control, recovery & user-accessible catalog

Example of DBMS – Micro Example Microsoft soft Access Access,, Mic Microsoft rosoft SQL Server, Server, Oracle, Sybase and etc. 12

6

 

9/9/2013

Database Management System (DBMS) •

Data definition language (DDL).  –  Permits

specification of data types, structures and any data constraints.

 –  All



specifications are stored in the database.

Data manipulation language (DML).  –  General

enquiry facility (query language) of the data.

 –  Using

Structured Query Language (SQL) to produce required information.-

13

Database Application Programs •

   – A

computer program that interacts with the database  by issuing an appropriate request (typically (typically an SQL statement) to the DBMS



Users interact with the database through a number of application programs (used to create &   information) written in some programming language 14

7

 

9/9/2013

Database Application Programs •

Figure shows each department using their through the DBMS.  – Each

set of departmental application programs handles data entry, file maintenance, and the generation of a fixed set of specific reports.  – The physical structure & storage of the data are now   •

A view mechanism.  – Provides users with only the data they want or need to use. 15

Database Application Programs Application Appli cation Prog Program ram

DATABASE SYSTEM

16

8

 

9/9/2013

Components of DBMS Environment

17

Roles in the Database Environment Environment

 – responsible

for the management of the data

resource •

Database Databa se pla planni nning ng • Development and maintenance of standards,  po c es, proce ures • Con Concep ceptua tual/l l/logi ogical cal dat databa abase se desi design gn

18

9

 

9/9/2013

Roles in the Database Environment Environment • Database Administrator (DBA)  – responsible

for the physical realization of the

database • Physical database design and implementation •   • Maintenance of operational control • Ensuring satisfactory performance of applications for users 19

Roles in the Database Environment Environment • Database Designers (Logical and

Physical)  – Logical

: is concerned with identifying the data, the relationships between the data, & the constraint on the data that is to be stored

 – Physical

: decides how the logical database design is to be physically realized  20

10

 

9/9/2013

Environment Roles in the Database Environment •

pp ca on ro rogrammers  –   build

the application programs programs that provide the required functionality for the end-users

• End Users  – naive

and sophisticated 

21

File-based Approach































 Adv antag es of Dat abase Ap pro ach : Control of data redundancy Data consistency More information from the same amount of data Sharing of data Improved data integrity integrity & s ecurity Improved data accessibility and responsiveness Increased Increa sed productivit y Improved maintenance through data independence Increased Increa sed conc urrency 22 Improved backup and recovery services

Limitation of File Based Approach : Separation and isolation of data Separation Duplication of data Data dependence Incompatible file formats Fixed Queries/Proliferation Queries/Proliferation of application programs

Database Approach

11

 

9/9/2013

Three-Level Architecture •

All DBMS are built based on the 3-Level Architecture



All users should be able to access same data.



A user’ r’ss view is immune to chan es made in other views.



Users should not need to know physical database storage details.   23

Three-Level Architecture •

DBA should be able to change database

s orage s ruc ures w ou a ec ng e users’ views. • Internal structure of database should be unaffected by changes to physical aspects . • DBA should be able to change conceptual structure of database without affecting all users. 24

12

 

9/9/2013

ANSI-SPARC ARC Three-Level Architecture ANSI-SP

25

ANSI-SPARC ANSI-SP ARC Three-Level Architecture • External Level  – Users’ views of the

database.  – Describes that part of database that is relevant to a particular user user..

• Conceptual Level  – Community

view of the database.  – Describes what data is stored in database and relationships among the data. 26

13

 

9/9/2013

ANSI-SPARC ANSI-SP ARC Three-Level Architecture • Internal Level  – Physical

representation of the database on the computer.

 – Describes

how the data is stored in the

database.

27

ANSI-SPARC ANSI-SP ARC Three-Level Architecture • Physical Level  – Managed

by OS under directions of DBMS

 – Access

methods met hods varies varies - may follow follow fully OS access methods or its own file organizations with some basic OS access methods • •

mp ementat on o sequenc ng How fields of internal records are stored on disks

28

14

 

9/9/2013

ANSI-SPARC ARC Three-Level Architecture ANSI-SP

29 Pearson Education © 2009

Data Independence •

Referring to mapping between external,

• Logical Data Independence  – Refers

to immunity of external schemas to changes in conceptual schema.

 – 

  removal of entities). •

. .

Should not require changes to external schema or rewrites of application programs. 30

15

 

9/9/2013

Data Independence • Ph sical Data Inde endence  – Refers

to immunity of conceptual schema to changes in the internal schema.

 – Internal

schema changes (e.g. using different file organizations, storage structures/ devices).

 – Should

not require change to conceptual or external schemas. 31

ANSI-SPARC Data Independence and the ANSI-SPARC Three-Level Architecture

32

16

 

9/9/2013

Summary •

Importance of databases  – Database approach VS file-based approach



Important terms in database fields  – Database,

database applications, database systems, DBMS



  – levels and associations with data independence 33

17

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close