You are on page 1of 25

Stefano Grazioli - Ask for permission for using/quoting: grazioli@virginia.

edu

Still doing well

Easy meter

Stefano Grazioli - Ask for permission for using/quoting: grazioli@virginia.edu

Indispensable in business Databases


- Store data - Retrieve data

Why are they needed?


- Program data is volatile

A database is an organized collection of data A database management system is a software that provides data-related functionality (data organization, data retrieval, sorting, GUI, security, backup)

User or program

Access, Oracle, IBM DB2, SQL Server, MySQL...

Accounting Production

Purchasing
Billing

Purchases Customers

Scheduling
Marketing

Pricing

Invoices
Orders

Data Duplication Costly application maintenance (program-data dependence) Little/no sharing Poor security

Inventory
Orders2

Purchasing
Accounting

Purchases
DBMS

Billing
Production

Scheduling
Marketing

Customers Invoices

Pricing

DBMS is software that includes - Data Definition Language - Data Manipulation Language - Data Dictionary

Orders
Inventory

create table inventory ( part_id char(5) not null primary key, name char(30), price numeric(8,2), q_avail integer, last_in date);

Inventory
part_id AA001 name monitor price 128.54 q_avail 47 last_in 1/23/06

BX353

mouse

3.23

242

6/5/07

Record visualization (selection) Record insertion


- insert into inventory (part_id, name, q_avail) values (AA002', cable', 3);

Record update Record deletion


part_id AA001 name monitor price 128.54 47

Inventory
q_avail last_in 1/23/06

BX353

mouse

3.23

242

6/5/07

Name: Web Name: PC name: Description: Size: Type: Date changed: Ownership: Access security: Used by: Program using: Reports using:

AMT-PAY-BASE BASEPAY SALARY annual salary for an employee

Metadata

9 bytes numeric 01/02/07 COMPENSATION MANAGER, COMPENSATION; MANAGER JOB EVALUATION MANAGER, SITE BENEFITS. COMPENSATION, HR, EMPLOYMENT, INSURANCE P00023, P00034, P00121, R124 (salary increases report); R323 (salary summaries); ...

When a DBMS organizes your data so that they can be though of as TABLES, that DBMS is a Relational DBMS, or RDBMS.

TRADE_NO 1 12 23 34 37 47 48 49 56

SEC_ID 1123312 3242344 1123312 9992933 3242344 7798797 3242344 3242344 7798797

SEC_NAME ACME MSFT ACME ORCL MSFT GE MSFT MSFT GE

UNIT_PRICE 90 45 91 73 45 95 43 42 94

QUANTITY 100 30 55 200 50 100 55 35 90

FEE_% 10 10 10 15 10 10 5 10 5

Record (row)
TRADE_NO SEC_ID SEC_NAME UNIT_PRICE

Table
QUANTITY FEE_%

1
12 23

1123312
3242344 1123312

ACME
MSFT ACME

90
45 91

100
30 55

10
10 10

34
37 47

9992933
3242344 7798797

ORCL
MSFT GE

73
45 95

200
50 100

15
10 10

48
49 56

3242344
3242344 7798797

MSFT
MSFT GE

43
42 94

55
35 90

5
10 5

Field (~column)
TRADE_NO 1 SEC_ID 1123312 SEC_NAME ACME UNIT_PRICE 90 QUANTITY 100 FEE_% 10

12
23 34

3242344
1123312 9992933

MSFT
ACME ORCL

45
91 73

30
55 200

10
10 15

37
47 48

3242344
7798797 3242344

MSFT
GE MSFT

45
95 43

50
100 55

10
10 5

49
56

3242344
7798797

MSFT
GE

42
94

35
90

10
5

Primary key is a field that contains unique (non duplicated) information & is used to identify a record
TRADE_NO 1 12 23 34 37 47 48 49 56 SEC_ID 1123312 3242344 1123312 9992933 3242344 7798797 3242344 3242344 7798797 SEC_NAME ACME MSFT ACME ORCL MSFT GE MSFT MSFT GE UNIT_PRICE 90 45 91 73 45 95 43 42 94 QUANTITY 100 30 55 200 50 100 55 35 90 FEE_% 10 10 10 15 10 10 5 10 5

Stefano Grazioli - Ask for permission for using/quoting: grazioli@virginia.edu

Stefano Grazioli - Ask for permission for using/quoting: grazioli@virginia.edu

Accounting
Finance Production Marketing

Application #1
Application #2 Application #3 Application #4 DBMS DBMS DBMS

Inventory Costs Forecasts Costs Sales


DBMS

Application #5 Application #5

Research

Accounting

App. #1
Production Unit #01 Production Plant #02

App. #2 App. #3 App. #4

Centralized DBMS

Marketing

Portal / Dashboard

Integrated Enterprise Data

Customers

This is hard to do! (ETL engines)

App #1
Accounting

DBMS

Costs

Customers Costs Sales

App #2
Production Plant #01
Sales

Integrated Enterprise Data

App #3 App #4 App #5

DBMS
Costs

Production Plant #02

DBMS
Sales

DBMS Data Warehouse

Marketing

App #6

DBMS

Sales & Research

Portal / Dashboard

DSS (BI)

Source: B. Wixom

Name, Year, School Why you are taking the class Things you like about the class Things that can be improved Strengths / Attitude towards the Tournament

Stefano Grazioli - Ask for permission for using/quoting: grazioli@virginia.edu

UML Activity Diagram - Daily Compound Average Growth of a Security (part II)

The user press the Compute Cagr button

Compute the Cagr for the next customer

Print the result for that customer

[No More Customers]

Print the Average of all Cagrs with a descriptive label.