INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

46
INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1

Transcript of INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

Page 1: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

INTRO TO ENTERPRISE DATABASES - I

Dr. Chandra Amaravadi

Western Illinois University

1

Page 2: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

IN THIS PRESENTATION..

Basic concepts: data and info, entity, attr, pkey, file, recordNeed for databasesHistorical approach to dataDefinitionsDatabase organizationImportance of databases/Organizational importanceDBMS and DBMS activities and functionsCourse features

2

Page 3: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

WHAT IS INFORMATION?

3

Page 4: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

DEFINING DATA AND INFORMATION

Data: Data consists of raw facts e.g. 2982034Information: collection of data; data presented in context; elaboration.

USA 46 29 29 104 China 38 27 23 88 Russia 24 26 32 82 Great Britain 29 17 19 65 Germany 11 019 14 44 Japan 7 14 17 38 Australia 7 16 12 34 France 11 11 12 34

4

Page 5: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

DATA VS INFORMATIONCountry Gold Silver Bronze Total

USA 46 29 29 104

China 38 27 23 88

Russia 24 26 32 82

Great Britain 29 17 19 65

Germany 11 19 14 44

Japan 7 14 17 38

Australia 7 16 12 35

France 11 11 12 34

Data becomes information when we ________________ it.

5

Page 6: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

NEED FOR DATABASES

cannot function without informationcannot function without information can be a life or death issuecan be a life or death issue

finding acct balancefinding acct balance print transaction historyprint transaction history order spare parts for MRI machineorder spare parts for MRI machine find patient recordsfind patient records

needs to be a click awayneeds to be a click away otherwise, lost sale, lost profits or lost career! otherwise, lost sale, lost profits or lost career!

How can we find information when we need it?

We live in an information ageWe live in an information age

6

Page 7: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

BASIC ORGANIZATIONCONCEPTS

(Entity, attribute, primary key, file, record)

7

Page 8: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

INTRODUCING ENTITIES, ECLASSES AND ATTRIBUTESInformation is a collection of data usually DESCRIBINGsomething. What does it describe here? How?

Name: Steve NashDOB: 2-7-1980 Profession: Basket ball playerAddress: 415 Walnut street.

8

Page 9: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

COLLECTION OF DATA...

Acct#: 4555950Date: 12/5/14Time: 4:48 pmMerchant: WIU UnionCard type: Master CardIssuer: First Bank

______describe a transactionmore.

Following is another example of information as a collection of data describing a transaction.

9

Page 10: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

ONE ATTRIBUTE HAS A UNIQUE VALUE

Acct#: 4555950Date: 12/5/14Time: 4:48 pmMerchant: WIU UnionCard type: Master CardIssuer: First Bank

The unique attribute isCalled a ______________

One of these attributes always has a unique value which one is it?

10

Page 11: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

ORGANIZATION CONCEPTS

What can we say about these two sets of data?

Transaction#: 55643Date: 12/5/14Time: 4:09 pmMerchant: WIU UnionCard type: Master CardIssuer: First Bank

Transaction#: 55644Date: 12/5/14Time: 4:20 pmMerchant: VitalesCard type: Master CardIssuer: Midwest Bank

11

____________________________

Page 12: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

ORGANIZATION CONCEPTS..

Transaction

ID

Transaction

Date

Transaction

Time

Merchant

55643 12/05/12 4:09 pm WIU Union

55644 12/05/12 4:20 pm Vitales

Transaction#: 55643Date: 12/5/14Time: 4:09 pmMerchant: WIU UnionCard type: Master CardIssuer: First Bank

Data can be organized into a _____

12

________

Page 13: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

DEFINITION OF A FILE..

CBT QUALITY MANAGEMENT COMMITTEEMeeting Minutes

Meeting Date/time: December 2nd, 2:00 p.m.Present: Brad Burke, Ken Dien, Chin Yi,

John Smith 1215 Oak Drive $514.00 11/5/14Mary Ash 415 Ponds $ 56.00 5/9/14

A database ______ is a collection of _______ .

13

Page 14: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

DATABASE

14

Page 15: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

Example, cars listed in auto-trader

Matches played in the olympics

Properties owned by a company

Books available from Amazon.com

DATABASE

Database - A shared collection of logically related data designed to meet the needs of multiple users in an organization.

DBMS is the software program.

15

Page 16: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

Primary key

Record

Attr. values

Attributes/field namesStructure/schema

DATABASE ORGANIZATION

PROD# DESCR. PRICE QUANTITY

IR888E Refrigerator $1,800 20

TS3233 Television $67 32Record

A database has a structure or schema that organizes the data into attributes. Collections of attribute values become records. A primary key guarantees unique access.

16

Page 17: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

Database – A group of related filesFile/table – A group of related recordsRecord – a grouping of related fieldsAttr. value – value of an attr. e.g. hair color

Schema -- This is the structure or logical view of the database (tables and attr.)Primary key – An attribute whose values are unique within a fileSecondary key – Any other attribute

Database

Files/tables

Records

Attr. values

DATABASE ORGANIZATION

17

Page 18: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

HISTORICAL APPROACH TO DATA

55643 3/02/14 4:09pm WIU Union55644 5/08/14 4:20pm Vitales55644 7/05/14 4:20pm Vitales55646 12/11/14 8:05am Pizza Hut

55643 $25.60 MC WIU Union 55644 $38.00 Visa Vitales55644 $63.00 Visa Vitales55646 $55.00 Amex Pizza Hut

The historical method of handling data is called file processing

File 1 File 2

Instead of storing data centrally in a database, in the file processing approach, the same data was often duplicated in multiple files.

18

Page 19: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

FILE PROCESSING PROBLEMS

What problems did the file processing approachresult in?

19

Page 20: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

DATABASE MANAGEMENTSYSTEMS (DBMS)

20

Page 21: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

Example Access, Oracle, DB2

What can we do with a DBMS?

DBMSDBMS - software program to create, manage and provide controlled access to the data

21

Page 22: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

DBMS ACTIVITIES & FUNCTIONS

Define structure / schema

Enter data

modify data

query data

get reports

The operations that can be carried out with a DBMS include:

22

Page 23: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

Define structure/schema

DBMS ACTIVITIES & FUNCTIONS

Field Name Data type Description Length Decimals

Prod# Numeric Unique prod code

6 0

Descr Text Short prod

description

25 0

Price Currency Product price 6 2

This is called data definition

23

Page 24: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

EMPLOYEE DATA ENTRY

EMP ID:LabelLabelFieldField

TitleTitle

Data entry Data entry formform

DATA ENTRY

NAME:

A data entry form allows data to be entered easily.

24

Page 25: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

ENTERING DATA

EMPLOYEE DATA ENTRY

EMP ID: 1117

JohnNAME:

The data is entered into the data entry form

This is called data entry. Where does the data go to?

25

Page 26: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

RETRIEVING DATA

SQL commands QBE (Query by Example) Reports

Data can be obtained from the database in the following ways:

26

Page 27: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

RETRIEVING DATATHE STRUCTURED QUERY LANGUAGE

Each SQL statement has three parts as shown below:

SELECT is used to select attributes needed

FROM is used to specify the tables from which data is obtained.

WHERE is used for including criteria (filter)

Select car_id, car_color, car_price, car_mileageFrom carsWhere car_mileage < 100,000

27

Page 28: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

RETRIEVING DATA..

Employee

Write an SQL statement for listing names of employees in finance department.

SELECT ??FROM ??WHERE ??

This is called query/retrieval.

Emp ID Emp Name Department Join Date

1115 John Finance 4/9/14

1117 Han Sales & Mktg. 12/15/14

1120 Mary Human Resources

1/19/14

28

Page 29: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

QUERY BY EXAMPLE

A query by example form (QBE)

This is also another form of query/retrieval.

Emp ID Emp Name Department Join Date

“finance”

List names of employees in finance department.

Employee

29

Page 30: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

RETRIEVING DATA: REPORTS..

Reporting resembles COBOL reports Report specification needs to be created Consists of RH, PH, Detail, RF, PF Report is generated from specification

We can get data out through queries or reports

30

Page 31: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

SPECIFYING REPORTS..

RHRH

PHPH

DetailDetail

FieldsPFPF

RFRF

PRODUCT LISTING

PRODUCT # DESCR. PRICE

Product # Descr. Price

Average Price

Title

Column

Headings

Footer

A report specification

31

Page 32: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

SUMMARY OF DBMS ACTIVITIES

define structure/schemaenter data (into table/tables)modify data (not discussed)query data (from table/tables)get reports (from table/tables)

Activities with DBMS

32

Page 33: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

To store and record information e.g. bal, price, grades etc. To retrieve information e.g. check#432 cashed? To report information e.g. daily sales To answer queries e.g. how many shoes were sold?

USAGE OF DATABASES

Databases are used (operational):

To analyze trends Identify sales prospects

Advanced uses (Strategic):

33

Page 34: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

What if a customer wants to return a tie purchased in a store?

What if a manager wants to know what products were sold on a particular day?

Suppose we have detailed information on each and every transaction in a store, what can we do with that?

OPERATIONAL & STRATEGIC USAGE

34

Page 35: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

THE DEVELOPMENT CYCLETHE DEVELOPMENT CYCLE

35

Page 36: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

THE DATABASE DEVELOPMENTCYCLE

How do we know what information we need for the database?

36

Page 37: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

THE DATABASE DEVELOPMENTCYCLE..

database planningdatabase analysisdatabase designimplementationsupport/maintenance

The database development cycle parallels the informationsystems development cycle.

37

Page 38: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

THE DATABASE DEVELOPMENTCYCLE..

Planning – is concerned with identifying what information will be in the database and the resources that will be required.Analysis – this is concerned with the detailed requirements such as attributes, entity classes as well as with their relationships.Design -- is concerned with creating a database structure that will fulfill the requirementsImplementation – this is the phase that is concerned with actually defining the structures, entering data and creating reports.Maintenance – this is concerned with ensuring that the schema, reports etc are up to date and the database is performing well.

38

Page 39: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

THE DEVELOPMENT CYCLE AND THIS COURSE..

Database environment -- Evolution & environmentDatabase planning -- Enterprise analysisAnalysis -- Database analysisDesign -- Logical designDesign -- Physical designImplementation -- Access, MySQL assignmentsSupport/maintenance -- Database adminstration.

39

Page 40: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

ABOUT THE COURSE

40

Page 41: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

COURSE OBJECTIVES

Thorough understanding of database conceptsAbility to develop ER modelsAbility to develop database designsAbility to implement databases in PC based systemsAbility to write SQL queriesFamiliarity with database administration issues

Ability to analyze database requirements and implement systems for a small organization

41

Page 42: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

COURSE FEATURES

Very concept orientedDatabase concepts are abstractParticipation required!Digressions welcome!Guidelines are very subjective

Numerous in-class exercisesReinforcing assignments

Need to have a good “schema”!

42

Page 43: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

COURSE EVALUATION

Note: Please refer to your course syllabus for up to date information on the evaluation schedule.

EVALUATION ITEM POINTS

Six assignments* 100

Midterms 200

Final 100

Quizzes (2 x 20) 40

Participation 40

Attendance 20

Total 500

*Lowest will be dropped, but -20 point penalty for non-submission

43

Page 44: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

CLASS PARTICIPATION

Answer questions Raise an issue relevant to the topic at hand Solve an in-class problem

Max, two “tallies” per session Quality and quantity of participation Participation quizzes Disruptive activities negatively assessed

Review powerpoints before coming to class!

44

Page 45: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

GENERAL COMMENTS

Database practice is an application of theory Get theories/frameworks and definitions

into your system; Need to have good conceptual understanding Need to review frequently (before class, after class

and everyday) Participate in class Exams cover all topics (don’t strategize)

Most important course in the IS curriculum

45

Page 46: INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.

46