Download presentation
Presentation is loading. Please wait.
Published byDarrell Sims Modified over 9 years ago
1
FIRST COURSE Access Tutorial 1 Creating a Database
2
XP Objectives Define the terms field, record, table, relational database, primary key, and foreign key Create a blank database Identify the components of the Microsoft Access window Create and save a table in Datasheet view Enter field names and records in a table datasheet Open a table using the Navigation Pane New Perspectives on Microsoft Office 2007: Windows Vista Edition2
3
XP Objectives Open an Access database Copy and paste records from another Access database Navigate a table datasheet Create and navigate a simple query Create and navigate a simple form Create, preview, navigate, and print a simple report Learn how to manage a database by compacting, backing up, and restoring a database New Perspectives on Microsoft Office 2007: Windows Vista Edition3
4
XP Organizing Data Your first step in organizing data is to identify the individual fields – Examples of fields: Birth date, Start date, course name, grade earned, SSN, city, annual salary, title, lab fee – The specific value, or content, of a field is called the field value – A set of field values is called a record New Perspectives on Microsoft Office 2007: Windows Vista Edition4
5
XP Organizing Data Next, you group related fields together into tables – Example of a table: Student table: Student last name, student first name, student ID, birth date, start date, score on math assessment exam, email address, student major New Perspectives on Microsoft Office 2007: Windows Vista Edition5
6
XP Databases and Relationships A collection of related tables is called a database, or a relational database – Examples of a database: Student database, Faculty database, Inventory database Hierarchy of data organization – Bits->Bytes->Fields->Records->Tables->Database New Perspectives on Microsoft Office 2007: Windows Vista Edition6
7
XP Databases and Relationships You connect the records in the separate tables through a common field A primary key is a field, or a group of fields, whose values uniquely identify each record in a table – Examples of a primary key field: SSN, Account #, Driver’s License #, Airline Mileage Account #, Item # When you include the primary key from one table as a field in a second table to form a relationship between the two tables, it is called a foreign key in the second table New Perspectives on Microsoft Office 2007: Windows Vista Edition7
8
XP Databases and Relationships New Perspectives on Microsoft Office 2007: Windows Vista Edition8
9
XP Databases and Relationships On the previous slide – The Customer table has 4 fields and 6 records – The Contract table has 4 fields and 8 records – There are 2 tables in the database A database can have one table or multiple tables New Perspectives on Microsoft Office 2007: Windows Vista Edition9
10
XP Relational Database Management Systems A database management system (DBMS) is a software program that lets you create databases and then manipulate data in them In a relational database management system, data is organized as a collection of tables New Perspectives on Microsoft Office 2007: Windows Vista Edition10
11
XP Exploring the Microsoft Access Window New Perspectives on Microsoft Office 2007: Windows Vista Edition11
12
XP Creating a Table in Datasheet View Click the Create tab on the Ribbon In the Tables group, click the Table button Accept the default ID primary key field with the AutoNumber data type, or rename the field and change its data type, if necessary Double-click the Add New Field column heading, and then type the name for the field you are adding to the table Press the Tab key or the Enter key New Perspectives on Microsoft Office 2007: Windows Vista Edition12
13
XP Creating a Table in Datasheet View Add all the fields to your table by typing the field names in the column headings and pressing the Tab key or the Enter key to move to the next column In the first row below the field names, enter the value for each field in the first record, pressing the Tab key or the Enter key to move from field to field After entering the value for the last field in the first record, press the Tab key or the Enter key to move to the next row, and then enter the values for the next record. Continue this process until you have entered all the records for the table Click the Save button on the Quick Access Toolbar, enter a name for the table, and then click the OK button New Perspectives on Microsoft Office 2007: Windows Vista Edition13
14
XP Creating a Table in Datasheet View New Perspectives on Microsoft Office 2007: Windows Vista Edition14
15
XP Entering Records New Perspectives on Microsoft Office 2007: Windows Vista Edition15
16
XP Saving a Table Click the Save button on the Quick Access Toolbar. The Save As dialog box opens In the Table Name text box, type the name for the table Click the OK button New Perspectives on Microsoft Office 2007: Windows Vista Edition16
17
XP Opening a Database Start Access and display the Getting Started with Microsoft Office Access page Click the More option to display the Open dialog box Navigate to the database file you want to open, and then click the file Click the Open button New Perspectives on Microsoft Office 2007: Windows Vista Edition17
18
XP Opening a Database New Perspectives on Microsoft Office 2007: Windows Vista Edition18
19
XP Navigating a Datasheet The navigation buttons provide another way to move vertically through the records New Perspectives on Microsoft Office 2007: Windows Vista Edition19
20
XP Creating a Simple Query A query is a question you ask about the data stored in a database The Simple Query Wizard allows you to select records and fields quickly New Perspectives on Microsoft Office 2007: Windows Vista Edition20
21
XP Creating a Simple Query New Perspectives on Microsoft Office 2007: Windows Vista Edition21
22
XP Creating a Simple Form A form is an object you use to enter, edit, and view records in a database You can design your own forms, use the Form Wizard, or use the Form tool to create a simple form with one mouse click New Perspectives on Microsoft Office 2007: Windows Vista Edition22
23
XP Creating a Simple Form New Perspectives on Microsoft Office 2007: Windows Vista Edition23
24
XP Creating a Simple Report A report is a formatted printout (or screen display) of the contents of one or more tables in a database The Report tool places all the fields from a selected table (or query) on a report, making it the quickest way to create a report New Perspectives on Microsoft Office 2007: Windows Vista Edition24
25
XP Creating a Simple Report New Perspectives on Microsoft Office 2007: Windows Vista Edition25
26
XP Creating a Simple Report New Perspectives on Microsoft Office 2007: Windows Vista Edition26
27
XP Creating a Simple Report New Perspectives on Microsoft Office 2007: Windows Vista Edition27
28
XP Printing a Report Open the report in any view, or select the report in the Navigation Pane To print the report with the default print settings, click the Office Button, point to Print, and then click Quick Print or To display the Print dialog box and select the options you want for printing the report, click the Office Button, point to Print, and then click Print (or, if the report is displayed in Print Preview, click the Print button in the Print group on the Print Preview tab) New Perspectives on Microsoft Office 2007: Windows Vista Edition28
29
XP Viewing Objects in the Navigation Pane New Perspectives on Microsoft Office 2007: Windows Vista Edition29
30
XP Access Objects Table: holds the data – recommend starting the filename with tbl (e.g. tblContract) Query: asks a question about the data in a table or another query – recommend starting the filename with qry (e.g. qryContract) New Perspectives on Microsoft Office 2007: Windows Vista Edition30
31
XP Access Objects (continued) Form: displays record in a user-friendly format; you could view the data using a table or a form. Displays one record at a time unlike a table which displays multiple records at one time – recommend starting the filename with frm (e.g. frmContract) Report: formatted printout (or display) of data in a table or query; includes title, column heading, page numbers, etc. – recommend starting the filename with rpt (e.g. rptContract) New Perspectives on Microsoft Office 2007: Windows Vista Edition31
32
XP When You Click on the Save Button With Tables – saves the design or structure of the table such as the data type (text, currency, date); saves any formatting changes (e.g. resize columns). The data is saved after a change is made to each record With Queries – saves the design view and formatting changes With Forms – saves the design view and formatting changes With Reports – saves the design view and formatting changes New Perspectives on Microsoft Office 2007: Windows Vista Edition32
33
XP Compacting and Repairing a Database Compacting a database rearranges the data and objects in a database to decrease its file size New Perspectives on Microsoft Office 2007: Windows Vista Edition33
34
XP Compacting and Repairing a Database Make sure the database file you want to compact and repair is open Click the Office Button, point to Manage, and then click Compact and Repair Database New Perspectives on Microsoft Office 2007: Windows Vista Edition34
35
XP Backing Up and Restoring a Database Backing up a database is the process of making a copy of the database file to protect your database against loss or damage The Back Up Database command enables you to back up your database file from within the Access program, while you are working on your database To restore a backup database file, you simply copy the backup from the drive on which it is stored to your hard drive New Perspectives on Microsoft Office 2007: Windows Vista Edition35
36
XP Helpful Hints Remember rows = records Remember columns = fields It is strongly recommended that you omit blank spaces in field names; this will cause less problems later in the course – Good examples of field names are: LastName (best), Last-name, Last_Name – Bad examples of field names are: Last Name, My Last Name, The Name Field New Perspectives on Microsoft Office 2007: Windows Vista Edition36
37
XP Helpful Hints In Access, it is imperative that you close the DB before you upload it. When the DB is open, there are two files, the index file and the data file. They work together. If you upload the data file without the index, I can't open it much less read it. Same is true for the reverse. So please CLOSE the DB before uploading it. New Perspectives on Microsoft Office 2007: Windows Vista Edition37
38
XP Helpful Hints Never remove the secondary storage device (e.g. jump drive) that holds the database (DB) while the DB is in use (i.e. open). Access automatically saves changes in the data; if you remove the storage device when the DB is open, the table could be destroyed. New Perspectives on Microsoft Office 2007: Windows Vista Edition38
39
XP Helpful Hints Naming filenames within a database – Tables typically start with tbl – Queries typically start with qry – Forms typically start with frm – Reports typically start with rpt It is strongly recommended that you follow these standards starting now! New Perspectives on Microsoft Office 2007: Windows Vista Edition39
40
XP Helpful Hints There are two views in Access: – Data View – Design View When the data changes, ACCESS automatically saves these changes. When the design changes, YOU need to save these changes. New Perspectives on Microsoft Office 2007: Windows Vista Edition40
41
XP Additional Examples None New Perspectives on Microsoft Office 2007: Windows Vista Edition41
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.