Database fundamentals

30
Database Fundamentals Module 7 Lesson 1

Transcript of Database fundamentals

Page 1: Database fundamentals

Database Fundamentals

Module 7 Lesson 1

Page 2: Database fundamentals

What is a Database?An organized collection of related information.

Page 3: Database fundamentals

What is a Database Management System?

Software that allows the computer to create a database; add, change, and delete data in the database; sort the data; retrieve the data; and create forms and reports using the data in the database.

Page 4: Database fundamentals

Have you ever used a database?Printed

Address books

Dictionaries

Encyclopedias

Library card catalogs

Telephone directories

Electronic

Cell phone contacts

Google

FaceBook

NetFlix

GameLibrary

Amazon.com

Page 5: Database fundamentals

NetFlix is a Database?• Yes!

• NetFlix stores its movie titles in a database that is easily searched and sorted to find the perfect movie for you.

• Search by Genre, Actor, Director, Rating

• Sort by Production Date, Stars

Page 6: Database fundamentals

Cell Phone Contacts are in a Database?

• Yes!

• All of the information you enter about your contacts goes into a database stored on your phone. You can store names, phone numbers, email addresses and lots of other information.

• Your contacts can easily be searched and sorted

Page 7: Database fundamentals

Electronic v. Print• Why is a computerized database better than

a print database?– Accurate, quick and efficient arrangement of data

in alphabetical or numerical order– Ability to find and retrieve data– Ability to generate reports on the database– Ease of editing existing data

Page 8: Database fundamentals

What can you put in a Database?

Any information that is related.

Major League Baseball

Colleges

Nutrition

Countries

Endangered Species

Dictionary

Page 9: Database fundamentals

Databases about youDid you know that your doctor and your school also

keep data (information) about you in a database? What type of data do you think they store? – Your name (both)– Your address (both)– Your date of birth (both)– Vaccination Shot records (medical record) – Medicines that you may be allergic to (medical record)– Grades (School Record)– Certificates (School) – Social Security Number (both) 

As you can see, not only do you use a database, but information about you is also in a database or two J.

Page 10: Database fundamentals

Steps to creating a Database1. Plan and design the database according to

needs and requirements

2. Determine the fields or categories that will be used in the database

3. Determine field properties to include size and type

Page 11: Database fundamentals

How do I enter data into a Database?

• Keyboard

• Mouse

• PDA’s

• Scanners

• Speech Recognition Software

• Web forms

Page 12: Database fundamentals

Parts of a DatabaseAn entry is data that is in a field

A field is one category of information (A field name is the title that is assigned to a field)

A record is a group of related fields of one item of information in the database

A file is the collection of related records.

Click the button for a brief video. A new website will open, be sure to return to this presentation.

Page 13: Database fundamentals

Example• The phone book is a file which contains a

record for each subscriber. Each subscriber record contains three fields: name, address, and phone number. The records are sorted alphabetically by the name field, which is called the key field--or primary key.

Page 14: Database fundamentals

Examples of an Entry

Last Name First Name Address City State Zip

Adams Tom 33 East Street Silas NC 22558

Goins Juan 76 Liberty Rd Bogard NC 55987

Sawyer Sarah 26 Main Street Oakwood NC 44897

Page 15: Database fundamentals

Examples of a Field

Last Name First Name Address City State Zip

Adams Tom 33 East Street Silas NC 22558

Goins Juan 76 Liberty Rd Bogard NC 55987

Sawyer Sarah 26 Main Street Oakwood NC 44897

Page 16: Database fundamentals

Examples of an Record

Last Name First Name Address City State Zip

Adams Tom 33 East Street Silas NC 22558

Goins Juan 76 Liberty Rd Bogard NC 55987

Sawyer Sarah 26 Main Street Oakwood NC 44897

Page 17: Database fundamentals

Example of a Database File

Last Name First Name Address City State Zip

Adams Tom 33 East Street Silas NC 22558

Goins Juan 76 Liberty Rd Bogard NC 55987

Sawyer Sarah 26 Main Street Oakwood NC 44897

Page 18: Database fundamentals

Typical views of a database• List view

– Displays several records on the screen at a time, often referred to as Datasheet View

Page 19: Database fundamentals

Typical views of a database• Form view

– Displays one record on the screen at a time.– Commonly used in data entry.

Page 20: Database fundamentals

General data types• Currency ($9.99)

• Date (03/03/03 or March 3, 2003)

• Numeric (450 or 4,500,000)– These numbers can be used in calculations

• I.E. Gross pay, basketball statistics, etc.

• Text/General (Smith or 910-555-5468)– Numbers may used, but would not be computed

• I.E. Social security numbers, telephone numbers, etc.

Page 21: Database fundamentals

What can you do with a Database?

• Sort– Ascending (A, B, C or 1, 2, 3)– Descending (Z, Y, X or 3, 2, 1)

• Search– Filter– Query

• Reports

Page 22: Database fundamentals

Sort

To arrange data in alphabetical or numerical order.– Ascending: Sorting data in alphabetical order

from A-Z or numerical order from 0-9.– Descending: Sorting data the opposite of

ascending order. (Z-A & 9-0)

Page 23: Database fundamentals

SortAscending by Rank

Descending by Rank

Page 24: Database fundamentals

SortAscending by Rank

Descending by Rank

Page 25: Database fundamentals

SortAscending by Rank

Descending by Rank

Page 26: Database fundamentals

Primary/Secondary Sorts• Primary key: The field selected as the unique

identifier for the database.(i.e. Student number)• Primary sort: The first field that a database is

sorted on. • Secondary sort: The second field that a database

is sorted on.Student No.

Last Name Age Grade

001 Pate 12 6

005 Brown 14 8

010 Brown 16 10

Primary Key:Student No.

Primary Sort:Last name (in Descending order)

Secondary Sort:Age (in ascendingorder)

Page 27: Database fundamentals

Search: Filter v Query• A method to find specific data within a

database that meets certain criteria.

• The difference? – Queries can be saved and printed.

Page 28: Database fundamentals

How do they work?• Queries/Filters use connectors and

comparison operators to define the search criteria– Connectors (AND, OR, NOT)– Comparison operators (<, >, <=, >=, =, <>)

Page 29: Database fundamentals

Comparison Operators= equals

< less than (no more than, fewer than)

> greater than (no fewer than, more than)

<= less than or equal to (at most)

>= greater than or equal to (at least)

Page 30: Database fundamentals

ConnectorsAnd—must meet both criteria, yields fewer

results

Or—must meet either criteria, yields more results

Not—except