database management3-1 l3 database management santa r. susarapu ph.d. student virginia commonwealth...

29
Database Management 3-1 L3 Database Management Santa R. Susarapu Santa R. Susarapu Ph.D. Student Ph.D. Student Virginia Commonwealth University Virginia Commonwealth University

Upload: johan-hendry

Post on 14-Dec-2015

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-1

L3

Database Management

Santa R. SusarapuSanta R. Susarapu

Ph.D. StudentPh.D. StudentVirginia Commonwealth UniversityVirginia Commonwealth University

Page 2: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-2

Objectives Understand why databases Understand why databases

are important to modern are important to modern organizationsorganizations

Understand how databases Understand how databases workwork

Demonstration of Demonstration of Database Creation using Database Creation using Oracle/SQL*PlusOracle/SQL*Plus

Understand how Understand how organizations can organizations can maximize their strategic maximize their strategic potential with databasespotential with databases

Page 3: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-3

Database Management for Strategic Advantage Use databases to:Use databases to:

Create a bookCreate a book Track book salesTrack book sales Set salaries and wagesSet salaries and wages Pay employeesPay employees

Database – a collection of related attributes about Database – a collection of related attributes about entities and organized in a way to facilitate data entities and organized in a way to facilitate data searchessearches

Entity = TableEntity = TableRecord = Column in a TableRecord = Column in a Table

Page 4: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-4

Page 5: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-5

Database Management for Strategic Advantage The Database Approach: Foundational The Database Approach: Foundational

ConceptsConcepts DBMS is a software to create, store, DBMS is a software to create, store,

organize, and retrieve data from a single organize, and retrieve data from a single database or several databasesdatabase or several databases

ExampleExampleMicrosoft AccessMicrosoft AccessOracleOracle

Page 6: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-6

Database Management for Strategic Advantage Traditional way to deal with electronic data Traditional way to deal with electronic data

manipulationmanipulation File Processing ApproachFile Processing Approach

Each department will have a separate Each department will have a separate databasedatabase

Decentralized approachDecentralized approachDifficult to modifyDifficult to modify

Page 7: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-7

Database Management for Strategic Advantage Database Approach - Centralized ApproachDatabase Approach - Centralized Approach AdvantagesAdvantages

Program-data independenceProgram-data independence Minimal data redundancyMinimal data redundancy Improved data consistencyImproved data consistency Improved data sharingImproved data sharing Increased productivity of application developmentIncreased productivity of application development Enforcement of standardsEnforcement of standards Improved data qualityImproved data quality Improved data accessibilityImproved data accessibility Reduced program maintenanceReduced program maintenance

Page 8: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-8

Database Management for Strategic Advantage Database Approach – DisadvantagesDatabase Approach – Disadvantages

Ownership conflictOwnership conflict Backup and recovery issuesBackup and recovery issues Complex managementComplex management

Specialized personnel & trainingSpecialized personnel & training Conversion costsConversion costs

Page 9: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-9

Database Management for Strategic Advantage Effective Management of DatabasesEffective Management of Databases

The database administrator (DBA) :The database administrator (DBA) :Works with programmers and analysts to Works with programmers and analysts to

design and implement the databasedesign and implement the databaseWorks with users and managers to establish Works with users and managers to establish

database policiesdatabase policiesImplements security features and establishes Implements security features and establishes

database permissionsdatabase permissions

Page 10: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-10

Key Database Activities

Entering DataEntering Data Online formsOnline forms Preprinted formsPreprinted forms Telephone conversationsTelephone conversations

Querying Data – Retrieval techniqueQuerying Data – Retrieval technique Structured Query Language (SQL)Structured Query Language (SQL) Query by example (QBE)Query by example (QBE)

Demonstration using MS Access DatabaseDemonstration using MS Access Database

Page 11: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-11

Key Database Activities

Creating Database ReportsCreating Database Reports Report – a compilation of data that is organized Report – a compilation of data that is organized

and produced in printed formatand produced in printed format Report GeneratorsReport Generators

Demonstration using MS Access DatabaseDemonstration using MS Access Database

Page 12: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-12

Key Database Activities

Database DesignDatabase Design Must be organizedMust be organized Few or no redundanciesFew or no redundancies Data model – a map of entity relationshipsData model – a map of entity relationships KeysKeys

Primary keyPrimary key Combination primary keyCombination primary key Foreign keyForeign key

Page 13: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-13

Page 14: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-14

Key Database Activities

Entity-Relationship Diagramming (ERD)Entity-Relationship Diagramming (ERD) Commonly used when designing databasesCommonly used when designing databases One draws entities (tables) as boxes and lines One draws entities (tables) as boxes and lines

between entities to show relationshipsbetween entities to show relationships Example: Mountain Animals ERDExample: Mountain Animals ERD

HandoutHandout

Page 15: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-15

Key Database Activities

Database AssociationsDatabase Associations One-to-one relationshipOne-to-one relationship One-to-many relationshipOne-to-many relationship Many-to-many relationshipMany-to-many relationship

Page 16: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-16

Key Database Activities

The Relational Model of DatabasesThe Relational Model of Databases Entities linked by a common key fieldEntities linked by a common key field

Records = rowsRecords = rowsFields = columnsFields = columns

Other models existOther models exist HierarchicalHierarchical NetworkNetwork Object-oriented modelObject-oriented model

Page 17: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-17

Key Database Activities

NormalizationNormalization A technique for making complex databases A technique for making complex databases

more efficient and more easily handled by the more efficient and more easily handled by the DBMSDBMS

11stst Normal Form (1NF) Normal Form (1NF)22ndnd Normal Form (2NF) Normal Form (2NF)33rd rd Normal Form (3NF)Normal Form (3NF)Boyce-Codd Normal Form (BCNF)Boyce-Codd Normal Form (BCNF)

Eliminates data redundancy and modification Eliminates data redundancy and modification anomaliesanomalies

Page 18: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-18

Page 19: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-19

Page 20: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-20

Key Database Activities Data Dictionary a.k.a. metadataData Dictionary a.k.a. metadata

A document that explains each piece of A document that explains each piece of information in the databaseinformation in the database

Field nameField name Data type Data type

• Numeric, text, date/timeNumeric, text, date/time• Useful for sorting and allocating storage Useful for sorting and allocating storage

Is this field a key field?Is this field a key field? Business rulesBusiness rules

• Update authorityUpdate authority• Valid data valuesValid data values

Page 21: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-21

Creation of Databases using Oracle/SQL*Plus Oracle Enterprise ManagerOracle Enterprise Manager SLQ*PlusSLQ*Plus iSQL*PlusiSQL*Plus

Page 22: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-22

How Organizations Get theMost from Their Data

Linking Web Sites to DatabasesLinking Web Sites to Databases Example: Amazon Example: Amazon

2.5 million titles2.5 million titlesManaging online data effectivelyManaging online data effectively

Page 23: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-23

How Organizations Get the Most from Their Data Data MiningData Mining

A method for better understanding dataA method for better understanding data Information on customers, products, markets, etc.Information on customers, products, markets, etc. Drill down: from summary to more detailed dataDrill down: from summary to more detailed data Sort and extract informationSort and extract information Trends, correlations, forecasting, statisticsTrends, correlations, forecasting, statistics

Page 24: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-24

How Organizations Get the Most from Their Data Data MiningData Mining

Online Transaction Processing (OLTP)Online Transaction Processing (OLTP)Immediate automated responses to user Immediate automated responses to user

requestsrequestsMultiple concurrent transactionsMultiple concurrent transactionsA big part of interactive Internet e-commerceA big part of interactive Internet e-commerce

Page 25: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-25

How Organizations Get the Most from Their Data Data MiningData Mining

Online Analytical Processing (OLAP)Online Analytical Processing (OLAP)Graphical software tools that provide complex Graphical software tools that provide complex

analysis of data stored in a databaseanalysis of data stored in a databaseDrills down to deeper levels of consolidationDrills down to deeper levels of consolidationTime series and trend analysisTime series and trend analysis““What if” and “why” questionsWhat if” and “why” questions

Page 26: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-26

How Organizations Get the Most from Their Data Data MiningData Mining

Merging Transaction and Analytical ProcessingMerging Transaction and Analytical ProcessingReal-time OLAP diminishes performance Real-time OLAP diminishes performance

because the database must be “locked” during because the database must be “locked” during execution timeexecution time

Solution: replicate transactions on a 2Solution: replicate transactions on a 2ndnd database serverdatabase server

Page 27: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-27

How Organizations Get the Most from Their Data Data MiningData Mining

Merging Transaction and Analytical ProcessingMerging Transaction and Analytical ProcessingOperational SystemsOperational Systems

• Interact with customers and run a business Interact with customers and run a business in real timein real time

• Examples: Order processing, reservation Examples: Order processing, reservation systemssystems

Informational SystemsInformational Systems• Support decision making based on stable Support decision making based on stable

point-in-time or historical datapoint-in-time or historical data

Page 28: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-28

How Organizations Get the Most from Their Data Data WarehousingData Warehousing

Integrating multiple large databases into a Integrating multiple large databases into a single repositorysingle repository

Queries, analysis, and processingQueries, analysis, and processingPurpose: put key business information into Purpose: put key business information into

the hands of decision makersthe hands of decision makersCost: millionsCost: millions

Page 29: Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University

Database Management 3-29

How Organizations Get the Most from Their Data Data MartsData Marts

Instead of one large data warehouse, many Instead of one large data warehouse, many organizations create multiple data martsorganizations create multiple data marts

Each contains a subset of the dataEach contains a subset of the dataExample: finance, inventory, personnelExample: finance, inventory, personnelEach data mart is customized for particular Each data mart is customized for particular

DSS applicationsDSS applicationsCost: typically less than $1 millionCost: typically less than $1 million