Upload
beatrix-harrington
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Intro to Access and Data Management
Announcements
• Chapter 5 – Thursday• Entropy Registration Quiz Due Date
• Extended to Weds.• Dreamspark Registration• Questions?
The Database Approach
Database management system (DBMS)
Minimize the following problems:
Maximize the following:
How is data organized in a DB:Data Hierarchy
Field
Record
File (or table)
Database
Is a grouping of
Is a grouping of
Is a grouping of
Data Hierarchy (continued)
Field
RecordDatabase
Table
Database Management Systems
Focus of this course: Relational database model Related Tables (Primary Keys Important) Data dictionary
How do you request data? Structured Query Language (SQL) - keywords
Query by Example (QBE) – forms/templates
Relational DB Effectiveness: Normalization
Normalization (most streamlined DB)
Steps in Creating Databases
1. Create the Tables Including a primary key
2. Create the Relationships between Tables
3. Enter data into the Tables
Create the Tables
Tables are how information are stored within the database.
When creating tables, you have to define:Field NameData Type Field Size
Create the Tables - Tips
Consider the type of data you are entering to determine what the data type and size should be.
Make sure when you setup foreign keys that they are the same type/size as the primary
Most frequently, you will be using the text for typeNumbers are typically used for fields where calculations will be usedDate/Time
Don’t forget to set a primary key
Create the Relationships
To create information in a database, you must have relationships between tables.
Tips: Close all your tables before creating relationships
Entering Data
To enter data, you need to be Datasheet View and you enter it like any other program
Once you go to the next row, the previous row is saved in the table.
Exercise #1 – Car Parts Store
Create a new DB called ServiceShop that will consist of two tables.
CarsParts
Exercise #1 – Car Parts Store
Cars Data_Type Field Size
VehicleID Text 5VehicleName Text 50Manufacturer Text 50VehicleYear Text 4VehicleType Text 20
Part Data_Type Field Size
PartID Text 5PartName Text 50VehicleID Text ?Cost ?
Exercise #1 – Create Relationships
Create the appropriate relationships for the tables in your database.
Cars (VehicleID) -> Parts (VehicleID)
Exercise #1 – Enter Information
VehicleID VehicleName Manufacturer VehicleYear VehicleType
00001 Avalon Toyota 1999 Sedan
00002 Camry Toyota 2005 Sedan
00003 Tundra Toyota 2010 Truck
00004 Sienna Toyota 2014 Minivan
PartID PartName VehicleID Cost11111 Muffler 00004 $150.0022222 Wipers 00001 $10.0033333 Transmission 00002 $1,000.00
Project #1 – Database Creation
Remainder of class begin working on project #1. You should be able to
complete:
Table Creation Relationships Data Entry