database : collection of information. data management tool. huge volumes. like a filing system....
TRANSCRIPT
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)
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.
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.
Database Operations
• browsing – looking through.
• query – a question you ask.
• sort – ordering data.
• report – present desired info.
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
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.
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.
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?
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
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?
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
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
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?”
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
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?
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.
Databases & the Web
• xml vs. html
• dynamic web pages.
• easy access to data.
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.
• batch processing & real time.• mainframe, client/server, &
distributed.• multimedia databases.• natural language queries.
Other Database Trends
• 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 :
• 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 :