Creating and editing a database

Download Creating and editing a database

Post on 19-May-2015




1 download

Embed Size (px)


  • 1. Create and Edit Databases Module 7 Lesson 2

2. Steps to Design a Database

  • Plan and design the database according to needs and requirements
  • Determine the fields or categories that will be used in the database
  • Determine field properties to include size and type

3. Step 1: Plan and DesignWhat Data? Last Name First Name Employee Number Hours of Work Rate of Pay Gross Pay 4. Step 2:Determine the Fields Fields Last Name First Name Employee Number Hurs Worked Rate of Pay Gross Pay 5. Step 3:Determine Field Properties

  • Currency ($)
  • Date (03/03/03)
  • Numeric (450)
    • These numbers can be used in calculations
      • I.E.Gross pay, basketball statistics, etc.
  • Text/General (Smith)
    • Numbers may used, but would not be computed
      • I.E.Social security numbers, telephone numbers, etc.

6. Example of a Database File Last Name First Name Employee Number Hours Worked Rate of Pay Gross Pay Smith Stacy 001 40 $5.00 $200.00 Carter Sherrell 002 30 $7.00 $210.00 Allen Donald 003 25 $10.00 $250.00 7. First of all you need to understand how Microsoft Access breaks down a database.Some keywords involved in this process are:Database File, Table, Record, Field, Data-type .Here is the Hierarchy that Microsoft Access uses in breaking down a database.Database File:This is your main file that encompasses the entire database and that is saved to your hard-drive or floppy disk.(Example--StudentDatabase.mdb) Table: A table is a collection of data about a specific topic. There can be multiple tables in a database.(Example #1Students)(Example #2Teachers) Field: Fields are the different categories within a Table. Tables usually contain multiple fields.(Example #1--Student LastName) (Example #2--Student FirstName)Datatypes: Datatypes are the properties of each field. A field only has 1 datatype.(Example:LastName; Datatype=Text) 8. Tables TablesA table is a collection of data about a specific topic, such as students or contacts. Using a separate table for each topic means that you store that data only once, which makes your database more efficient, and reduces data-entry errors.Therefore, you may have multiple tables in a database. Tables organize data into columns (calledfields ) and rows (calledrecords ). 9. Primary Key

  • Primary Key
  • One field (column) whose value or valuesuniquelyidentify each record in a table. A primary key does not allow Null values and must always have a unique value. A primary key is used to relate a table to foreign keys in other tables.
  • NOTE:You do not have to define a primary key, but it's usually a good idea. If you don't define a primary key, Microsoft Access asks you if you would like to create one when you save the table.

10. Views in a Database

  • Switching Views
  • To switch views between the datasheet (spreadsheet view) and the design view, simply click the button in the top-left hand corner of the Access program.

Datasheet ViewDesign ViewDisplays the view, which allows you to enter raw data into your database table.Displays the view, which allows you to enter fields, data-types, and descriptions into your database table. 11. Video Demonstration:EditingandMore Editing Click the button for a brief video.A new website will open, be sure to return to this presentation. 12.