Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is...

18
Databases Introduction

Transcript of Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is...

Page 1: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Databases

Introduction

Page 2: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

What is a Database?

• A DATABASE is a collection of related data.–Data is just another name for information.

Page 3: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Databases are the Most Common Type of Computer Program

• Used by– Business

– Education

– Libraries

– Even Individuals• You use databases almost every day, and

don’t even know it!

Page 4: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Examples• Phonebook

– Even the one in your cell phone!

• Card Catalog– Paper or electronic

• Your Student Records• Address Book• A list of your MP3’s

Page 5: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Databases

• In many ways a database is similar to a spreadsheet.

• It can serve some of the same functions.

• For an end user a database can be easier to use, but is harder to set up.

Page 6: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Updating Databases• When you update data in a

database (table or form) it is automatically updated everywhere else.

• No need to do a “save”.–This is common to all database

programs.

Page 7: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Database Table• A TABLE is a collection of data in a

row/column format.• Not all programs let you see and

edit in this format, but it is there.• It looks a lot like a spreadsheet.

Page 8: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Related Tables• A special type of database program is

called a “Relational Database.”• To make tables related you must have

ONE common field that is unique to each record.

• Usually ID numbers serve this purpose.– Example: Driver’s license number.

Page 9: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Related Tables

• In a relational database the ID field can then be used to pull all of the related data together.– Example: A police officer checks to see if you

have any moving violations.– Each ticket is a separate record. Your driver’s

license number is the ID field that is used to pull all the records together.

– The records could be on the state computer or local municipality’s computers.

Page 10: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Database Form• A FORM is a window used to edit or add a

record in a table. • Normally you can only use ONE record in a

form.– The exception is if you have a relational

database.• A record is a collection of information about one

person, item or transaction.

Page 11: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Database Report• A REPORT is a print out of

specified fields in a table or tables.

• A REPORT gets it’s data from a Table or Tables.

Page 12: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Examples of a Report

• Phone Bill

• Cash register receipt

• Driver’s License

• TV Guide

• Search Engine Results

• Report Card

Page 13: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

ENTERING/EDITING DATA

• Two methods:–Use a form.–Enter directly onto a TABLE.

•Tables look a lot like spreadsheets.

–We will be learning to enter into a form.

Page 14: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

The First Step in Designing a Database

• Break down your information into fields.• For example:

– Names are usually broken into 2 fields• First Name• Last Name

– Addresses are broken into 4 or 5 fields• Street address (Sometimes 2 fields, one line per

field)• City• State• Zipcode

Page 15: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Step 1 Continued

• Identify each field by type.– NUMBER fields are used in math operations.

• Grades, Dollar amounts etc.

– Most others are TEXT fields• Zipcodes and phone numbers would be TEXT

fields because you don’t do math with them.

Page 16: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Step 2

• Design the FORM– The software automatically does the table for

you!– Most software allows you to design the form

anyway you like.

Page 17: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Step 3

• Start Entering Data!– Reports (Printouts) are a separate process.

• Reports can be custom or already designed for a particular purpose.

• A report card or cash register receipt are examples of reports.

• Even ID cards such as driver’s licenses are reports.

Page 18: Databases Introduction. What is a Database? A DATABASE is a collection of related data. –Data is just another name for information.

Next Class

• We will start using Filemaker Pro.

• It is one of many database programs.

• It’s easy to set up a database with this program.