Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Database Concepts and Microsoft Access 2003

Similar presentations


Presentation on theme: "Introduction to Database Concepts and Microsoft Access 2003"— Presentation transcript:

1 Introduction to Database Concepts and Microsoft Access 2003

2 Database Concepts and Access 2003
Introduction Database Microsoft Access Design and Creation Plan Tables Queries Forms Reports

3 What is a Database? A structured collection of related data
An filing cabinet, an address book, a telephone directory, a timetable, etc. In Access, your Database is your collection of related tables

4 Data vs. Information Data – a collection of facts made up of text, numbers and dates: Murray /18/86 Information - the meaning given to data in the way it is interpreted: Mr. Murray is a sales person whose annual salary is $35,000 and whose hire date is July 18, 1986.

5 Basic Database Concepts
Name: Barry Harris College: Medicine Tel: Table A set of related records Record Name: Barry Harris College: Medicine Tel: A collection of data about an individual item Field Name: Barry Harris A single item of data common to all records

6 An Example of a Table Fields Records Name GatorLink Phone College
Graff rgraff Pharmacy Harris bharris Medicine Ipswich zipswich PHHP

7 Design and Document Your Database
A designer’s best tools are a pencil and paper It is important to plan what you are going to do The sooner you touch the computer the sooner you’ll make a mistake If you don’t plan you will often have to start again Document what you are doing, will you remember what you did in three months time?

8 Questions To Ask Yourself
What have I got? (Inputs) What do I want? (Outputs) What do I need to do to get there? (Process) How am I going to build it? (Application/Program)

9 Database Options Freeware/Shareware - 1,000’s of records
Microsoft Excel - Limit of 65,536 Rows Microsoft Access - 100,000’s of records Oracle/SQL - 1,000,000,000’s of records & allows for Multiple users

10 Why Use Access? Familiar look and feel of Windows
Easy to start building simple databases Can build sophisticated systems It’s already on your computer True relational database

11 What is a Relational Database?
A relational database is a collection of tables from which data can be accessed in many different ways without having to reorganize the database tables. That is, once relationships are created, tables can “talk” to each other. We can link (relate) the tables to find: Which doctors are seeing a patient Which students are in which class Which item is selling the most on Friday’s

12 Basic Design Rules of Relational Databases
Data is broken down into Smallest Logical Parts Putting all of the home address in one field may make for convenient data entry, but it makes it very difficult to work with the data. For example, what if I needed to sort by City or Zip Code? Pulling fields together is fairly simple, pulling them apart is very difficult. Name GatorLink Home Address Graff rgraff 123 West Main Street, Gainesville, FL 32601 Harris Bharris 456 South 3rd Road, Newberry, FL 32684 Ipswich zipswich 846 West 52nd Ave, Gainesville, FL 32609 You can join fields together in queries, forms and reports.

13 Basic Design Rules of Relational Databases
Unique Field Names Access won’t let you use the same field name twice in one table but it can become confusing to people doing data entry if you are not clear. Try to keep a consistent naming convention. Name GatorLink Addr1 Addr2 Graff rgraff PO Box Gainesville, FL 32610 123 West Main Street, Gainesville, FL 32601 Harris Bharris PO Box Gainesville, FL 32610 456 South 3rd Road Newberry, FL 32684 Ipswich zipswich 846 West 52nd Ave Gainesville, FL 32609 PO Box Gainesville, FL 32610 Field names can be up to 64 characters long. (see tables documentation for more details)

14 Basic Design Rules of Relational Databases
Unique Field Names You also want to be aware of the field names across tables. For example several tables may use the Field FirstName. When you use those fields in other parts of the database things can become very confusing very quickly. DOCTOR TABLE Name Day Off Sallye Shapiro Thursday Samuel Smith Monday Sidney Samueson Friday PATIENT TABLE Name Address Annie Adams 6831 NW 4th Ave April Appleton PO Box 456 Arnold Arlington 234 SE 45th Road Bobbie Brown 234 Peter Pan Terrace Butch Bruce 3243 SE 4th Terrace When these two Name fields are pulled into the same Query/Form/Report they will appear with the table name in front of the field name: Patient Table.Name

15 Basic Design Rules of Relational Databases
Unique Records If you don’t have unique records, your database can’t tell which record you may be referring to. Name GatorLink Phone College Graff rgraff 2-3900 Pharmacy COP Harris bharris Medicine Ipswich zipswich PHHP

16 Primary Keys Name GatorLink Phone College Graff rgraff Pharmacy Harris bharris Medicine Ipswich zipswich PHHP To ensure that each record is unique in each table, we can set one field to be a Primary Key field. A Primary Key is a field that that will contain no duplicates and no blank values. Looking at the table above, what would be the best Primary Key?

17 Primary Keys Name GL Phone College Graff rgraff Pharmacy Harris bharris Medicine Ipswich zipswich PHHP While each column in this particular data set has unique data, the field that will work best for us is GL (GatorLink). Many employees will work for the same college, have the same last name and possibly even share telephone numbers, but each employee should have a unique GatorLink ID. When there is not a unique field in your data set, you can use an AutoNumber. Access can create incremented or random AutoNumbers for your primary key.

18 Basic Design Rules of Relational Databases
No Calculated or Derived Fields If we wanted to see how long an employee had been working with us, we can calculate their Length Employed by subtracting their hire date from today’s date. However, since today’s date is always changing, this data very quickly becomes stagnant. Name GatorLink Date Hired Length Employed Graff rgraff 05/15/2000 4 yrs, 2 mo Harris bharris 02/08/1986 18 yrs, 6 mo Ipswich zipswich 12/15/1999 4 yrs, 7 mo Access will let you create calculations in queries, forms and reports.

19 Data View/Design View Datasheet View Design View

20 Navigating Fields and Records
To move through records and fields To move through records Tab Shift+Tab Enter Home/End Ctrl+Home Ctrl+End Page Up Page Down The Arrow Keys First Record Current Record Last Record Previous Record Next Record New Record

21 Introducing Tables Database is a collection of TABLES
Tables store all the data

22 Introducing Queries A means of asking questions (querying) of your data Can look across a number of Tables and other Queries Can perform Calculations and Combine fields

23 Introducing Forms A friendlier view of the database
Used for data input, menus, display and printing Can perform Calculations and Combine fields

24 Introducing Reports Output of information in a printed report
Allows you to group and summarize data Can perform Calculations and Combine fields Cannot Edit Data Can Make Labels

25 Working Together Tables Queries Employees Customers Reports Forms
Company Name Address City Telephone Contact Name Forms


Download ppt "Introduction to Database Concepts and Microsoft Access 2003"

Similar presentations


Ads by Google