database : collection of information. data management tool. huge volumes. like a filing system....

22
Database : collection of information. data management tool. huge volumes. like a filing system. providing answers.

Upload: georgia-snow

Post on 27-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database :

• collection of information.

• data management tool.

• huge volumes.

• like a filing system.

• providing answers.

Page 2: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Where are Databases?

• airline scheduling & reservations.

• banking and financial institutions.

• student records.

• calendar & appointment software.

• inventory systems.

• Geographic Information System (GIS)

Page 3: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Technically :

• Database - collection of information.• Database Software :–maintains the collection.– DBMS : Database Management System.

• database is like the books in the library, database software is like the librarian.

Page 4: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Typically :

• “database” refers to the entire thing, the information and the management software.

• at the library the books, the librarian, the system for organizing and accessing the books are all needed.

Page 5: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database Operations

• browsing – looking through.

• query – a question you ask.

• sort – ordering data.

• report – present desired info.

Page 6: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database Terms

• table – organized as tables.• record – row, info about an item.• field – column, attribute of the item.• field type – restrict what can got in a

field (calculated, numeric, data, etc)• view – how you see the data

• form : one record and a time• list : as a table

Page 7: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Relational Database

• information is broken into tables that are related.

• information is stored only once, and tables are linked when the data is needed.

• there may be hundreds of tables. DBMS takes care of this for you.

• most databases are relational.

Page 8: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database Example

• want to track what animals we have in the store.

• when a sale is made, we want to know who the pet is going to so we can call and check-up on how the animal is doing.

Page 9: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database Example

• About the animals:• Pet name• Type of animal• Price• How many of each type

• About the humans:• Name• Phone number• What animal they bought• What date did they buy the animal?

Page 10: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Example… Initial TablesPet Name Animal Type Price Number

George Iguana $25 1

Alice Alligator $100 2

Annie Alligator $100 2

Greg Cat $75 4

Mike Rat $15 1

Client Name Phone Animal Bought

Animal Type

Paid Date

Bob Green 111-1111 Greg Cat $75 May 1, 2001

Sara Apple 555-5555 Mike Rat $15 June 3, 2001

Elvis Brown 888-8888 Alice Alligator $100 April 8, 2001

Bob Green 111-1111 George Iguana $20 Sept 2, 2001

Page 11: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database Example

• What needs to be updated when an animal is sold?

• What if a regular customer changes phone numbers?

• What if the price of a type of animal increases?

• Are we storing redundant information?• What if we want to sort by Client name?

Page 12: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

New Table Designprice

AnimalType Price

Alligator $100

Cat $75

Rat $15

Iguana $25

animal

AnimalName Type

Alice Alligator

Greg Cat

Mike Rat

Annie Alligator

George Iguana

client

FirstName LastName Phone

Bob Green 111-1111

Sara Apple 555-5555

Elvis Brown 888-8888

sale

Phone Animal Date Paid

111-1111 Greg May 1, 2001 $75

888-8888 Alice April 8, 2001 $100

555-5555 Mike June 3, 2001 $15

111-1111 George Sept 2, 2001 $20

Page 13: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Database Terms

AnimalType Price

Alligator $100

Cat $75

Rat $15

Iguana $25

AnimalName Type

Alice Alligator

Greg Cat

Mike Rat

Annie Alligator

George Iguana

attribute

field

record

relation

table

Page 14: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Query

• request specific info meeting some criteria :

• “What is Bob Green’s phone number?”• “What month sees the most sales of

alligators and iguanas?”• How many times has Bob Green bought

animals?”

Page 15: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

SQL

• Structured Query Language

• used by many database programs.

• may be hidden from the user.

SELECT type FROM animal WHERE name = “Alice”

SELECT lastName FROM client WHERE sale.Animal=“Alice

Page 16: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Data Mining

• data or knowledge discovery.

• analyzing data from different perspectives.

• summarizing into useful information.

• find new relationships, look for patterns, trends, anomalies.

• increase revenue, cuts costs?

Page 17: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Data Mining Example

• analyze buying patterns :• when men buy diapers on Thursdays and

Saturdays they also tend to buy beer. • these shoppers typically did their weekly

grocery shopping on Saturdays - on Thursday, they just picked up a few things.

• put beer display closer to diaper display, sell beer and diapers at full price on Thursdays and Saturdays.

Page 18: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Databases & the Web

• xml vs. html

• dynamic web pages.

• easy access to data.

Page 19: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

Object Oriented Database

• different than the relational model.

• database is populated with virtual objects.

• objects maintain information about themselves, and have methods they can perform.

Page 20: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

• batch processing & real time.• mainframe, client/server, &

distributed.• multimedia databases.• natural language queries.

Other Database Trends

Page 21: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

• easy to collect information.• collecting information just because you can.

• what happens to the data that is collected?• who owns the information about you?

Privacy Issues :

Page 22: Database : collection of information. data management tool. huge volumes. like a filing system. providing answers

• not new to computers, computers just make it easier.• credit history, identity theft, mailing lists, marketing.

– data errors are common.– data may last forever.– data is not necessarily secure.

Privacy Issues :