CHAPTER 8. MANAGING DATA RESOURCES

Post on 24-Jan-2016

52 views 0 download

Tags:

description

CHAPTER 8. MANAGING DATA RESOURCES. FILE ORGANIZATION. BIT: Binary Digit (0,1;Y,N;On, Off) BYTE: Combination of BITS which represent a CHARACTER FIELD: Collection of BYTES which represent a Fact RECORD: Collection of FIELDS which reflect a TRANSACTION FILE: A Collection of Similar - PowerPoint PPT Presentation

Transcript of CHAPTER 8. MANAGING DATA RESOURCES

FILE ORGANIZATIONFILE ORGANIZATION

• BIT: Binary Digit (0,1;Y,N;On, Off)

• BYTE: Combination of BITS which represent a CHARACTER

• FIELD: Collection of BYTES which represent a Fact

• RECORD: Collection of FIELDS

which reflect a TRANSACTION

• FILE: A Collection of Similar

RECORDS

Managing Digital DataManaging Digital Data

The layout of a personnel file in traditional file organization.

FILE ORGANIZATIONFILE ORGANIZATION

• DATABASE:DATABASE: An Organization’s ElectronicAn Organization’s Electronic

Library of FILESLibrary of FILES

• Primary FIELD or Key:Primary FIELD or Key: Field in Each Field in Each Record Uniquely Identifies Record Uniquely Identifies

THIS Record ForTHIS Record For RETRIEVALRETRIEVAL UPDATINGUPDATING

SORTINGSORTING

• DATA REDUNDANCY• PROGRAM / DATA DEPENDENCY• LACK OF FLEXIBILITY• POOR SECURITY• LACK OF DATA SHARING & AVAILABILITY

TRADITIONAL FILE ENVIRONMENTTRADITIONAL FILE ENVIRONMENT ((FLAT FILEFLAT FILE))

Different information making up a student record retained in three different sites .

DATABASEDATABASE MANAGEMENTMANAGEMENT SYSTEMSYSTEM ((DBMSDBMS))

SOFTWARE TO CREATE & MAINTAIN DATA

*** *** ENABLES BUSINESS APPLICATIONS TO

EXTRACT DATA

*** INDEPENDENT OF SPECIFIC COMPUTER

PROGRAMS

DBMS

Managing Digital DataManaging Digital Data

• Traditional Files vs. Databases: Pros and Cons

– Traditional File Advantages• Simplicity• Efficiency• Customization

– Database Advantages• Reduced data redundancy• Application/data independence• Better control• Flexibility

COMPONENTSCOMPONENTS OFOF DBMSDBMS::

• THE SCHEMA: describe the structure of the

Database.DATA DEFINITION LANGUAGE:DATA DEFINITION LANGUAGE:

• Defines Data Elements in Database Defines Data Elements in Database • and Used to construct the schemaand Used to construct the schema

DATA MANIPULATION LANGUAGE:DATA MANIPULATION LANGUAGE:• Manipulates Data for ApplicationsManipulates Data for Applications

• DATA DICTIONARY:– Maintains all information supplied by the

developer when constructing the schema**

DBMS

Data definition language to create a schema in NOMAD

• Data Definition Language (DDL)Data Definition Language (DDL)

Components of Database Components of Database Management SystemsManagement Systems

• Data Manipulation Language (DML)Data Manipulation Language (DML)– Used to query the databaseUsed to query the database

Figure 8.14 A Paradox query by example

DATA DICTIONARY

A typical data dictionary for a staff file

• REDUCES COMPLEXITY

• REDUCES DATA REDUNDANCY

• CENTRAL CONTROL OF DATA DEFINITIONS

• REDUCES PROGRAM / DATA DEPENDENCE

• REDUCES DEVELOPMENT / MAINTENANCE COSTS

• ENHANCES SYSTEM FLEXIBILITY

• INCREASES ACCESS / AVAILABILITY OF INFORMATION

**

ADVANTAGESADVANTAGES OFOF DBMSDBMS::

DBMS

Database ModelsDatabase Models

– Records are related hierarchically – each category is a subcategory of the next level up

– Disadvantages of hierarchical databases• To retrieve a record, a user must start at the root and

navigate the hierarchy.

• If a link is broken, the entire branch is lost.

• Requires considerable data redundancy

HIERARCHICAL DATA MODELHIERARCHICAL DATA MODEL

ROOT

FIRST CHILD

2nd CHILD

RatingsRatings SalarySalary

CompensationCompensation JobJobAssignmentsAssignments

PensionPension InsuranceInsurance HealthHealth

BenefitsBenefits

EmployerEmployer

NETWORK DATA MODELNETWORK DATA MODEL

• VARIATION OF HIERARCHICAL MODELVARIATION OF HIERARCHICAL MODEL• Allows a record to be linked to more than one Allows a record to be linked to more than one

parentparent• USEFUL FOR MANY-TO-MANY USEFUL FOR MANY-TO-MANY

RELATIONSHIPSRELATIONSHIPS

NETWORKA

NETWORKB

NETWORKC

NETWORK1

NETWORK2

RELATIONAL DATA MODELRELATIONAL DATA MODEL

• Consists of tables; links among entities are Consists of tables; links among entities are maintained with maintained with foreign keysforeign keys

• DATA IN TABLE FORMATDATA IN TABLE FORMAT– RELATION: TABLE

– TUPLE: ROW (RECORD) IN TABLE

– FIELD: COLUMN (ATTRIBUTE) IN TABLE

*HOURS RATE TOTALABLE 40.50$ 10.35$ 419.18$

BAXTER 38.00$ 8.75$ 332.50$ CHEN 42.70$ 9.25$ 394.98$

DENVER 35.90$ 9.50$ 341.05$

TYPES OR RELATIONSTYPES OR RELATIONS

ONE-TO-ONE:ONE-TO-ONE: STUDENT ID

ONE-TO-MANY:ONE-TO-MANY:CLASS

STUDENTA

STUDENTB

STUDENTC

MANY-TO-MANY:MANY-TO-MANY:

STUDENTA

STUDENTB

STUDENTC

CLASS1

CLASS2

Relational OperationsRelational Operations

• Data Manipulation– Select :Select : is the selection of records that meets certain conditionis the selection of records that meets certain condition..– Project: Project: is the selection of certain columns from a table.is the selection of certain columns from a table.

– Join Join : : is the joining of data from multiple tables.is the joining of data from multiple tables.

• Structured Query Language (SQL)– International standard DDL and DML for relational

DBMS.– Advantages of using SQLAdvantages of using SQL

Users do not need to learn different DDLs and DMLs.

SQL can be embedded in widely used 3rd generation languages, increasing efficiency and effectiveness.

Programmer not forced to rewrite statements since SQL statements are portable.

Database Models

Advantages and disadvantages of database models

DatabaseDatabase ArchitectureArchitecture

• Shared Resource and Client/Server Shared Resource and Client/Server SystemsSystems

– Four basic client/server modelsFour basic client/server models

• Applications run at a server• Applications run on local PCs• Applications run on both the local PCs and the

server• Applications and key elements of the database

are split between the PCs and the server

Database ArchitectureDatabase Architecture

• Distributed DatabasesDistributed Databases– Replication :Replication :Full copy of the entire database is Full copy of the entire database is

stored at all sitesstored at all sites

A replicated database: each computer holds a copy of the entire database

Database ArchitectureDatabase Architecture– Fragmentation: Fragmentation: Parts of database are stored where they Parts of database are stored where they

are most often accessedare most often accessed

A fragmented database: each computer holds only the part of the database that is most frequently accessed by the local users

Web DatabasesWeb Databases

• Databases on the WebDatabases on the Web– CatalogsCatalogs– LibrariesLibraries– DirectoriesDirectories– Client lists and profilesClient lists and profiles

• When linking a database to the Internet, When linking a database to the Internet, considerconsider

• Which application to useWhich application to use• How to ensure Web surfers do not interfere with database How to ensure Web surfers do not interfere with database

updatesupdates• How to maintain securityHow to maintain security

Data WarehousingData Warehousing

• Data warehouseData warehouse– Collection of data that supports management Collection of data that supports management

decision makingdecision making– Phases in Building a Data WarehousePhases in Building a Data Warehouse

• Extraction PhaseExtraction Phase• Cleansing PhaseCleansing Phase• Loading PhaseLoading Phase

• Data MiningData Mining– Selecting, exploring, and modeling data to Selecting, exploring, and modeling data to discover discover

unknown relationshipsunknown relationships

DataData WarehousingWarehousing INFORMATION

DIRECTORY

INTERNALDATASOURCES

EXTERNALDATASOURCES

OPERATIONAL,HISTORICAL DATA

DATA WAREHOUSE

EXTRACT,TRANSFORM

DATAACCESS &ANALYSIS

QUERIES &REPORTS

OLAP

DATA MINING

Data-MiningData-Mining

Potential applications of data-mining

DATABASEDATABASE ADMINISTRATIONADMINISTRATION

• DEFINES & ORGANIZES DATABASE DEFINES & ORGANIZES DATABASE STRUCTURE AND CONTENTSTRUCTURE AND CONTENT

• DEVELOPS SECURITY PROCEDURESDEVELOPS SECURITY PROCEDURES• DEVELOPS DATABASE DOCUMENTATIONDEVELOPS DATABASE DOCUMENTATION• MAINTAINS DBMSMAINTAINS DBMS

**

Ethical and Societal IssuesEthical and Societal IssuesA Too-Risky Info HighwayA Too-Risky Info Highway

• Out of Hand -- Out of ControlOut of Hand -- Out of Control

– DBMSs allow organizations to collect, maintain, and sell vast amounts of private personal data easily.

• Where is the Information Going?Where is the Information Going?

– Many consumers provide information daily without being aware of where it is actually going.

– http://www.publicrecordfinder.com/

• The UpsideThe Upside– Database technology enables better and faster

services.