+ All Categories
Home > Documents > Database Queries Who murdered the database with the candlestick in the conservatory?

Database Queries Who murdered the database with the candlestick in the conservatory?

Date post: 22-Feb-2016
Category:
Upload: nairi
View: 54 times
Download: 0 times
Share this document with a friend
Description:
INFO100 and CSE100. Fluency with Information Technology. Database Queries Who murdered the database with the candlestick in the conservatory?. Katherine Deibel. Review. We have so far discussed What a database is What database operations do Today , we will discuss Databases as tools - PowerPoint PPT Presentation
Popular Tags:
30
Database Queries Who murdered the database with the candlestick in the conservatory? Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-05-23 Katherine Deibel, Fluency in Information Technology 1
Transcript
Page 1: Database Queries Who murdered the database with the candlestick  in the conservatory?

Database QueriesWho murdered the database with the candlestick in the conservatory?

Fluency with Information Technology

INFO100 and CSE100

Katherine Deibel

2012-05-23 Katherine Deibel, Fluency in Information Technology 1

Page 2: Database Queries Who murdered the database with the candlestick  in the conservatory?

Review We have so far discussed

What a database is What database operations do

Today, we will discuss Databases as tools How queries are used

2012-05-23 Katherine Deibel, Fluency in Information Technology 2

Page 3: Database Queries Who murdered the database with the candlestick  in the conservatory?

Why use a database? Keep records of our:

Clients Staff Volunteers

Keep a record of activities and interventions Keep sales records Develop reports Perform research Longitudinal tracking

2012-05-23 Katherine Deibel, Fluency in Information Technology 3

Page 4: Database Queries Who murdered the database with the candlestick  in the conservatory?

Database Terminology Field (columns in a table)

Smallest unit of information in a tableSometime called “attributes”

Record(rows in a table)

All related fields are collectively called a record

Table A collection of records is a data table

Database ManagementSystem (DBMS)

All the related tables, queries, data entry and edit forms, reports, macros and VBA modules that constitute a database

2012-05-23 Katherine Deibel, Fluency in Information Technology 4

Fields (columns)

Records

(rows)

Anderson Thomas A 123 Marine Dr 237-1234Benson Karen C 1300 Ohio Ave 237-8912Casserly Rick J 12492 Rt 146 238-9011Drummond Lynn M 1209 15th Ave N 931-4545

Table

Page 5: Database Queries Who murdered the database with the candlestick  in the conservatory?

Database Terminology Field (columns in a table)

Smallest unit of information in a tableSometime called “attributes”

Record(rows in a table)

All related fields are collectively called a record

Table A collection of records is a data table

Database ManagementSystem (DBMS)

All the related tables, queries, data entry and edit forms, reports, macros and VBA modules that constitute a database

2012-05-23 Katherine Deibel, Fluency in Information Technology 5

Fields (columns)

Records

(rows)

Anderson Thomas A 123 Marine Dr 237-1234Benson Karen C 1300 Ohio Ave 237-8912Casserly Rick J 12492 Rt 146 238-9011Drummond Lynn M 1209 15th Ave N 931-4545

Table

Page 6: Database Queries Who murdered the database with the candlestick  in the conservatory?

Data | Information | Knowledge Data (according to Information Science)

Unprocessed, raw information Information

Organized, structured data that is communicated in a coherent and meaningful manner

Knowledge Information that has been evaluated and further

organized so that it can be used purposefully Action

Applying knowledge towards achieving goals

2012-05-23 Katherine Deibel, Fluency in Information Technology 6

Page 7: Database Queries Who murdered the database with the candlestick  in the conservatory?

From Data to Action We collect data Information is harvested from the data

Many companies are good at collecting data Fewer are good at harvesting information

Knowledge is elicited from the information and put into action Database Management Systems are tools for

supporting this transformation process

2012-05-23 Katherine Deibel, Fluency in Information Technology 7

Data Information Knowledge Action

Page 8: Database Queries Who murdered the database with the candlestick  in the conservatory?

Database Management Systems (DMSs)The Tools for Data to Information to Knowledge to Action

2012-05-23 Katherine Deibel, Fluency in Information Technology 8

Page 9: Database Queries Who murdered the database with the candlestick  in the conservatory?

Database Management Systems DMSs are software data tools to:

Store (tables) Organize (sort) Add, modify or delete Ask questions (queries) Produce forms and reports

Toolbox is a good analogy

2012-05-23 Katherine Deibel, Fluency in Information Technology 9

Page 10: Database Queries Who murdered the database with the candlestick  in the conservatory?

Popular DBMs Microsoft Access FileMaker Pro Lotus Notes Structured Query Language (SQL)

Microsoft SQL Server Oracle MySQL

2012-05-23 Katherine Deibel, Fluency in Information Technology 10

Page 11: Database Queries Who murdered the database with the candlestick  in the conservatory?

Managing a Database Three major distinctions

Purpose of database:Operational versus Analytical

Data representation:Flat-file versus Relational

Implementation:Desktop versus Client/Server

2012-05-23 Katherine Deibel, Fluency in Information Technology 11

Page 12: Database Queries Who murdered the database with the candlestick  in the conservatory?

Selecting a DBM Desktop databases

Oriented toward single-user applications Reside on standard personal computers

Client / Server databases Contain mechanisms to ensure the reliability and

consistency of data Offers security options on [subsets of] data Oriented toward multi-user applications

2012-05-23 Katherine Deibel, Fluency in Information Technology 12

Page 13: Database Queries Who murdered the database with the candlestick  in the conservatory?

Operational vs. AnalyticalOperational databases Used to track and assist in

daily “business” activities Data typically changes

frequently over time Examples

Human resources Mailing lists Inventory management Accounting systems Point of sale systems

(cash registers)

Analytical databases Tend to be more static Historical data is analyzed

for patterns or trends Often support the strategic

activities of an organization Goals may include

Predicting the future Summarizing historical data Prove historical assumptions

2012-05-23 Katherine Deibel, Fluency in Information Technology 13

Page 14: Database Queries Who murdered the database with the candlestick  in the conservatory?

Flat-File vs. RelationalFlat-File Database All relevant data in a

single table, or series of unrelated tables

Work best for small quantities of data

Typically a person’s first databases

Relational Database Solution to data entry

redundancy problems Tables linked together

queried as if one table Linked via common

fields (columns) with exactly the same data

2012-05-23 Katherine Deibel, Fluency in Information Technology 14

Page 15: Database Queries Who murdered the database with the candlestick  in the conservatory?

Flat-File Example Weaknesses common to flat-file systems

Duplicate information is repeated redundantly Inconsistencies in how data is entered

2012-05-23 Katherine Deibel, Fluency in Information Technology 15

Page 16: Database Queries Who murdered the database with the candlestick  in the conservatory?

Relational Database Example

2012-05-23 Katherine Deibel, Fluency in Information Technology 16

Page 17: Database Queries Who murdered the database with the candlestick  in the conservatory?

Database Tables

2012-05-23 Katherine Deibel, Fluency in Information Technology 17

Page 18: Database Queries Who murdered the database with the candlestick  in the conservatory?

Interfacing with a Relational DatabaseOur quarry is the query

2012-05-23 Katherine Deibel, Fluency in Information Technology 18

Page 19: Database Queries Who murdered the database with the candlestick  in the conservatory?

Katherine Deibel, Fluency in Information Technology 19

Accessing Data in a Database Users rarely work with the entire database

Exception are the database managers Instead, users interact through

Forms: read and write data Reports: read only

All of these are based on the query

2012-05-23

Page 20: Database Queries Who murdered the database with the candlestick  in the conservatory?

Forms Forms allow interaction with the database

in a more scripted fashion Data is read

and maybe even edited

2012-05-23 Katherine Deibel, Fluency in Information Technology 20

Page 21: Database Queries Who murdered the database with the candlestick  in the conservatory?

Reports Reports are summaries generated

from the database Read-only

2012-05-23 Katherine Deibel, Fluency in Information Technology 21

Page 22: Database Queries Who murdered the database with the candlestick  in the conservatory?

Katherine Deibel, Fluency in Information Technology 22

Queries Generate a table from other tables in the

database via sequences of operations Select Difference Project Product Union Join

SQL: Structured Query Language Standard database language

2012-05-23

Page 23: Database Queries Who murdered the database with the candlestick  in the conservatory?

Indirect SQLSQL sequences are usually auto-generated

Interfaces allow easy construction of SQL We can view the generated SQL if we want

2012-05-23 Katherine Deibel, Fluency in Information Technology 23

Page 24: Database Queries Who murdered the database with the candlestick  in the conservatory?

Query from Two Tables

2012-05-23 Katherine Deibel, Fluency in Information Technology 24

Page 25: Database Queries Who murdered the database with the candlestick  in the conservatory?

Nature of the Returned Table Some records may be editable

If the data is linked to a primary key Generally not true for collapsed data

2012-05-23 Katherine Deibel, Fluency in Information Technology 25

Page 26: Database Queries Who murdered the database with the candlestick  in the conservatory?

When fields are editable Relies on primary keys and the underlying

intelligence of the database Further security settings can set edit rights

Updates can be sent out to all views Synchronization is a big issue Editing a linked value will chance all instances

2012-05-23 Katherine Deibel, Fluency in Information Technology 26

Page 27: Database Queries Who murdered the database with the candlestick  in the conservatory?

Global Update Example Expanded database from Lab 10

2012-05-23 Katherine Deibel, Fluency in Information Technology 27

Page 28: Database Queries Who murdered the database with the candlestick  in the conservatory?

Consistency Matters A good relational database

Uses IDs to connect records across tables (i.e. relationships)

Provides specific views to meet specific users' needs

Learning these skills is beyond the scope of this course Knowing the essential ideas is part of being

fluent in databases We will discuss some basic design on Friday

2012-05-23 Katherine Deibel, Fluency in Information Technology 28

Page 29: Database Queries Who murdered the database with the candlestick  in the conservatory?

Summary Queries, on the high-level, are the

final outcome of transforming data into action

Database Management Systems provide tools for creating and manipulating queries

2012-05-23 Katherine Deibel, Fluency in Information Technology 29

Page 30: Database Queries Who murdered the database with the candlestick  in the conservatory?

Project 3 You will get to explore a database by

playing different roles at an interstellar travel agency Astronomical cartographer Trip planner Planetary information broker End consumer

2012-05-23 Katherine Deibel, Fluency in Information Technology 30


Recommended