Database SSK3408-Chapter01

May 28, 2016 | Author: rockers91 | Category: Types, School Work
Share Embed Donate


Short Description

Database...

Description

1

Database Application Development SSK 3408 CHAPTER 1: INTRODUCTION

Learning Objectives 2



Define the following key terms:  Data,

database and Database Management System (DBMS), metadata.







Describe the advantages of using database approach Describe components of database environment Briefly describe the evolution of database systems.

Introduction 3



Over the past two decades, there has been enormous growth in the number and the importance of database applications. To store, manipulate and retrieve data in nearly every type of organization – business, health care, education, government and libraries.  Database technology can be used by an individual up to large number of users accessing databases.  The knowledge derived from databases can be used: 

Competitive advantage  Customer support 

Introduction ..cont. 4







DataBase Management System (DBMS) is one of the most powerful tools that can be used in building business database application. Provide many features that represent significant advantages over traditional programming methods. Understand the concepts of database design, queries and application building will reduce the time for developing complex applications

Build a Business Application 5

Program

SQL

Design

Program

SQL

Design

Tools: Database Design SQL (queries) Programming

Best: Spend your time on design and SQL.

Worst: Compensate for poor design and limited SQL with programming.

Basic Concepts and Definitions 6 







Database: 

A collection of data stored in a standardized format, designed to be shared by multiple users.



It may be of any size and complexity.

Data: 

Stored representation of objects and events that have meaning and importance in the user’s environment.



Structured data or Unstructured/Multimedia data

Information: 

Data that have been processed in such a way as to increase knowledge of the person who uses the data.



Databases today may contain either data or information.

Metadata: 

Data that describes the properties and context of user data

Example of Data 7

Figure 1-1a Converting Data into Information

Context helps users understand data

8

Graphical displays turn data into useful information that managers can use for decision making and interpretation 9

Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context 10

Drawbacks of File Processing Systems 11

 

Program-Data Dependence Duplication of Data 

  

Inconsistent data

Limited data sharing Lengthy development times Excessive program maintenance

Program-data Dependency 12

13

Problems with Data Dependency 









File description are stored within each application program that access a given file. Consequently, any changes to a file structure requires changes to the file description for all programs that access to the file. It is often difficult to locate all programs affected by such changes and consequently errors are often introduced when making such changes. Each application program must have its own processing routines for reading, inserting, updating and deleting data. Lack of coordination and central control.

Duplicate Data

14

15

Problems with Data Redundancy 

 

Waste of space to have duplicate data Causes more maintenance headaches The biggest problem:  When

data changes in one file, could cause inconsistencies  Compromises data integrity.

File Processing Method 16

Programs Payroll Data Definition File 1 … File 2 … Benefits Data Definition File A File 2 File C …

Files Pay History

Benefits Employee Employee Choices

Example of File Method 17

COBOL File Division 01 Employees 02 ID 02 Name 02 Address 02 Cell Phone 01 Department 02 ID 02 . . .

Employee File 112 Davy Jones 999 Elm Street . . . 113 Peter Smith 101 Oak St . . .



Add to file (e.g. Cell phone) 



More programs File Division 01 Employees ...

Write code to copy employee file and add empty cell phone slot. Find all programs that use employee file.   



Modify file definitions. Modify reports (as needed) Recompile, fix new bugs.

Easier: Keep two employee files?

18

Solution: The Database Approach Central repository of shared data  Data is managed by a controlling agent  Stored in a standardized, convenient form. 



Therefore, requires a database management system (DBMS) Order Filing System Invoicing System Payroll System

Central database DBMS Contains employee, order, inventory, pricing, and customer data

DBMS 19









A software system that is used to create, maintain, and provide controlled access to user databases. It provides systematic method of creating, updating, storing, and retrieving data in a database. It enables end users and application programmers to share data and it enables data to be shared among multiple application rather than propagated and stored in new files for every new application. It also provides facilities for controlling data access, enforcing data integrity, managing concurrency control, and restoring a database.

DBMS 20

• It provides interface between the various database applications for organizational users and database • It allows users to share data and to query, access and update the stored data.

21

Elements of Database Approach 

Enterprise Data Model 



Relational Databases 



Database technology involving tables (relations) representing entities and primary/foreign keys representing relationships

Use of Internet Technology 



Graphical model showing high-level entities and its relationships used by the organization.

Networks and telecommunications, distributed databases, clientserver and 3-tier architectures

Database Applications 

Application programs used to perform database activities (create, read, update, and delete) for database users

One customer may place many orders, but each order is placed by a single customer  One-to-many relationship

One order has many order lines; each order line is associated with a single order

 One-to-many relationship

One product can be in many order lines, each order line refers to a single product  One-to-many relationship

Therefore, one order involves many products and one product is involved in many orders  Many-to-many relationship

Relationships established in special columns that provide links between tables

Client/server system architecture

Application program functions: • inserting new data, •updating existing data, • deleting existing data, •reading data for display

29

30

The Range of Database Applications

Two-Tier Client-Server 31





Client manages main business and data processing logic and user interface. Server manages and controls access to database.

© Pearson Education Limited, 2004

Two-Tier Client-Server 32

© Pearson Education Limited, 2004

Three-Tier C-S Architecture 33

 



User interface layer – runs on client. Business logic and data processing layer – middle tier runs on a server (application server). DBMS – stores data required by the middle tier. This tier may be on a separate server (database server).

© Pearson Education Limited, 2004

Three-Tier C-S Architecture 34

© Pearson Education Limited, 2004

35

An Example of Personal Database

An Example of Workgroup Database 36

An Example of Enterprise Data Warehouse 37

Advantages of Database Approach 38 

Program-data independence 



Database design goal to integrate data files into a single, logical structure.



By eliminating redundancy, reduce the opportunities for inconsistencies.



A database is designed to shared corporate resource. Authorized internal and external users are granted permission to use the database.

Increased productivity of application development 

New development without worry the file design



DBMS provides high level productivity tools

Through Integrity constraint

Improved data accessibility and responsiveness 



Such as naming convention, data quality standard and uniform procedures for accessing, updating and protecting data

Improved data quality 

Improved data sharing 





Improved data consistency 



Data-description are stored in repository not inside the application program

Enforcement of standards

Minimal data redundancy 





Without the knowledge of programming experience can retrieve and display data, even it crosses departmental boundaries.

Reduce program maintenance

Costs and Risks of Database Approach 39

Components of Database Environment 40

  

  







CASE Tools – computer-aided software engineering Repository – centralized storehouse of metadata Database Management System (DBMS) – software for managing the database Database – storehouse of the data Application Programs – software using the data User Interface – languages, menus, and other facilities by which users interact with various system components such as CASE tools, DBMS etc. Data/Database Administrators – personnel responsible for maintaining the database System Developers – personnel responsible for designing databases and software End Users – people who use the applications and databases

Components of Database Environment 41



Hardware  PC, Mainframe, Network computer



Software  Programming Language



Data



Procedures  Instructions and rules



People  Data and Database Administrator, System Developer, End-user

42



Database Management Approach Data is most important  



Access through DBMS   



All Data

Data defined first Standard format

Queries, Reports, Forms Application Programs 3GL Interface

DBMS Program1

Data independence 

 

Change data definition without changing code Alter code without changing data Move/split data without changing code

Queries Program2 Reports

Modifying Data with DBMS 43



Add cell number to employee table   

Open table definition Add data element If desired, modify reports 





Use report writer No programming

Existing reports, queries, code will all run as before with no changes.

Field Name

Data Type

Description

EmployeeID TaxpayerID LastName FirstName ... Phone ...

Number Text Text Text

Autonumber.. Federal ID

CellPhone

Text

Text

Cellular . . .

DBMS Features/Components 44



Database engine  Storage,

retrieval,

update  Enforce business rules  Performance and ability to handle large problems

Data dictionary  Query Processor 

Utilities  Security  Report writer  Forms generator (input screens)  Application generator  Communications  3GL Interface 

DBMS Components 45

All Data

Communication Network

Database Engine Data Dictionary Security

3GL Connector

Query Processor

Form Report Builder Writer Application Generator

Program

DBMS Engine, Security, Utilities 46

Product ItemID Description Order 887 Dog food OrderID ODate Customer 946 Cat food 9874 3-3-97 CustomerID Name 9888 3-9-97 1195 Jones 2355 Rojas

Data Tables

Product Customer ItemID Integer, Unique CustomerID Description Integer, Text, 100 Unique char Name Text, 50 char User Identification Security Access Rights Backup and Recovery

Utilities

Database Engine Data Dictionary

Concurrency and Lock Manager Administration

DBMS Query Processor 47

All Data Database Engine Data Dictionary Query Processor

DBMS Report Writer 48

All Data Database Engine Data Dictionary Query Processor Report Writer

Report Format and Query

Report Writer (Oracle) 49

DBMS Input Form 50

All Data Database Engine Data Dictionary Query Processor

Form Builder

Input Form Design

Example of Commercial DBMS 51

    

  

Oracle Ingres Informix (Unix) DB2, SQL/DS (IBM) Access (Microsoft) SQL Server (Microsoft +) Many older (Focus, IMS, ...) Many limited PC (dBASE, Paradox, …)

Significance of using DBMS 52

 

   

Applications change a lot, but same data. Need for ad hoc questions and queries. Need to reduce development times. Need shared data. Improve quality of data. Enable users to do more development.

Evolution of Database Systems 53

      



Flat files - 1960s - 1980s Hierarchical – 1970s - 1990s Network – 1970s - 1990s Relational – 1980s - present Object-oriented – 1990s - present Object-relational – 1990s - present Data warehousing – 1980s present Web-enabled – 1990s - present

Hierarchical Database 54

Customers Customer Order Items Ordered Orders

Items Item Description 998 Dog Food 764 Cat Food

Quantity 12 11

To retrieve data, you must start at the top (customer). When you retrieve a customer, you retrieve all nested data.

Network Database 55

Entry point

Customer

Order

Items Ordered

Items

Entry point

Relational Database 56

Customer(CustomerID, Name, … Order(OrderID, CustomerID, OrderDate, … ItemsOrdered(OrderID, ItemID, Quantity, … Items(ItemID, Description, Price, …

Data is stored in separate sets of data The tables are not physically connected. Instead, data is linked between column Ex: retrieve order, database can match customer and order by customerID

Object-Oriented Database 57

Order OrderID CustomerID … NewOrder DeleteOrder …

OrderItem OrderID ItemID … OrderItem DropOrderItem …

Customer CustomerID Name … Add Customer Drop Customer Change Address

Item ItemID Description … New Item Sell Item Buy Item …

Government Customer Commercial ContactName Customer

ContactPhone ContactName Discount, … ContactPhone … NewContact NewContact

Object – 3 component - name - a set of properties or attributes - a set of methods or functions

Reference: 58





Hoffer, J.A, Ramesh, V., Topi, H. 2011. Modern Database Management. 10th Edition, Pearson Education Limited. Post, G.V. 2005. Database Management Systems: Designing and Building Business Application, 3rd Edition, McGraw Hill.

Summary 59



In this chapter you learned how to:  Define

the following key terms:

 Data,

database, Information, Metadata and Database Management System (DBMS).

 Describe

the advantages of using database

approach  Describe components of database environment  Briefly describe the evolution of database systems.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF