Download presentation
Presentation is loading. Please wait.
1
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 1 Creating a Database
2
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-2 Objectives 1.Plan and create a database. 2.Create and save a table structure. 3.Define field names, data types, field properties, and primary key. 4.Change views.
3
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-3 Objectives continued 6.Enter and edit data in Datasheet view and Data Entry. 7.Insert a picture. 8.Adjust column widths. 9.Use the Best fit feature.
4
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-4 Objectives continued 10.Add records. 11.Delete records. 12.Preview and print a table. 13.Close and open a table and database.
5
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-5 Concept Preview Database Object Field Name Data Type Field Property Primary Key Graphic Column Width
6
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-6 Outline Introducing Access 2003 –Starting Access –Exploring the Access Window Creating a New Database –Planning and Designing a Database –Creating and Naming the Database
7
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-7 Outline continued Creating a Table –Defining Field Names –Defining Data Types –Defining Field Properties –Entering a Field Description
8
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-8 Outline continued Creating a Table continued –Defining a Primary Key Field –Defining Date formats –Defining Additional Fields –Editing Field Definitions –Saving the Table Structure
9
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-9 Outline continued Entering and Editing Table Data –Using Table Datasheet View –Entering Data in a Datasheet View –Editing Data –Inserting a Picture –Navigating a Datasheet
10
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-10 Outline continued Changing a Column Width –Resizing a Column –Using Best Fit Adding Records in Data Entry Deleting Records
11
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-11 Outline continued Previewing and Printing a Table –Previewing the Table –Changing the Page Orientation –Printing a Selected Page Closing and Opening a Table and Database
12
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-12 Outline continued Exiting Access Key Terms FAQs Discussion Questions
13
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-13 Introducing Access 2003 Starting Access –New file task pane is displayed –Start by first creating a new database or opening an existing one The Access Window features –Database toolbar –Taskpane –Workspace –Status bar
14
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-14 DBMS Three most widely used database programs –Microsoft Access –Corel Paradox –Lotus Approach
15
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-15 Corel Paradox Lotus Approach
16
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-16 The Access Window Getting started task pane Workspace Mouse Pointer Menu bar Title bar Database toolbar
17
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-17 Creating a New Database Plan Design Develop Implement Review
18
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-18 Concept 1 Database Database – Organized collection of related information Table – Vertical columns & horizontal rows where information is stored Record –A row –Information about one person, place, or thing Field –A column –Smallest unit of information -Access database can contain multiple tables that can be linked to produce combined output from all tables. -This type of database is called relational database. DATABASE Database Management Systems DBMS (Database Manager, relational Tables)
19
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-19 Planning and Designing a Database Analyze current record-keeping system What forms are currently used for data entry? What reports are needed? What data will be in the tables? How will the tables be related?
20
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-20 Creating and Naming the Database File File New Database dialog box –Database file name Default is db1 Extension is.mdb Replace with new name –Location of file Default is My Documents folder Database window –Opens in workspace –Name of database displayed in title bar
21
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-21 Creating and Naming the Database Default name is selected Places bar Restricts to database files Default location
22
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-22 Concept 2 Object Use TableStores data QueryFinds and displays selected data FormView, add, and update data in tables ReportAnalyzes and prints data in a specific layout
23
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-23 Database Objects There are seven main components of a database in MS Access: Tables. Use tables to store database information. Table is the heart of the Database, since it contains the actual data and all other objects are base on the Table. We use Tables to store all the data in the database. Each row of the table contains one Record. Records are made up of Fields that contain a particular piece of data in the table Forms. Use forms to enter or edit the information in your tables. Forms let you view one record at a time. Easier to access and use when entering or modifying Data than a Table Reports. Use reports to deliver a professional presentation or written report to your class. Queries. Filter data so that you retrieve selected records or fields from the database. Pages. Create HTML pages from a database quickly and efficiently. Macros. Automate tasks that you perform on a regular basis in a database.Changes Modules. Automate a group of related procedures in Access 2000.
24
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-24 Creating a Table The table object is the basic unit of a database Must be created first before other objects Cannot open more than one database file at a time
25
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-25 Three Ways to Create a Table 1.Datasheet View 2.Design View 3.Table Wizard
26
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-26 Design View Table Design Toolbar Two open windows Field definition grid used to define fields
27
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-27 Primary Key Field Names Field Properties Data Type Description Table Design View
28
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-28 Concept 3 Used to identify data stored in the field Up to 64 characters long Cannot start name with a space Examples: –Last name –First name –Address Field Name Check page 12 (design view buttons)
29
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-29 Defining Field Names Click to open drop-down list Help information on data types Default data type Field name
30
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-30 Defining Data Types Default data type Data types
31
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-31 HW Please download the new homework from my website ://hani/hani
32
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-32 Concept 4 Data type defines the type of data field will contain Used to ensure right kind of data is entered Important to choose appropriate data type Data Type
33
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-33 Data Types Text (words, combination of words and numbers, numbers that are not used in calculation, names and phone numbers) up to 255 Memo Text that is too long to be stored in a text field, up to 65536 Number Used when you want to perform calculations on the values in the field. Date/Time Currency AutoNumber Sequential number that is automatically incremented by one when ever a new record is added to a table. Yes/No Accepts only yes or no, T or F, OLE Object An object (such as a Microsoft Excel spreadsheet, a Microsoft Word document, graphics, sounds, or other binary data) inked to or embedded in a Microsoft Access table. - insert object options Hyperlink Accepts hyperlink entries that are paths to an object. The easiest way to insert a hyperlink address in a field or control is to click Hyperlink on the Insert menu. Lookup Wizard Creates a field that allows you to choose a value from another table or from a list of values by using a list box.
34
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-34 Concept 5 Characteristic that defines a field Each data type has a set of properties Enhances the way table works Field Property
35
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-35 Field Properties Field Size Format Input Mask Caption Default Value Validation Rule Validation Text Required Allow Zero Length Indexed
36
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-36 Properties (1 of 2) Field size Number of character Format ‘ ’ lower and upper case in text Input Mask You can use the InputMask property to make data entry easier and to control the values (000) 000-0000 Caption Specifies a field label other than the field name Default Value Specifies a String value that is automatically entered in a field when a new record is created Validation Rule (student file) M or F in gender Validation Text You must specify M or F
37
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-37 Properties (2 of 2) Required Rejects any record that does not have a value entered for this field. (put required field= yes) Allow Zero Length Allows text or memo strings of zero length (“ ”),null Indexed Increase the efficiency of a search on the designated field Unicode Compression To store the data more efficiency, set to “yes”
38
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-38 Entering a Field Description Field description Help information on current task
39
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-39 Concept 6 A field that uniquely identifies each record Most tables have a primary key Key data MUST be unique Prevents duplicate records Used to control sorting order Used to create a link between tables Primary Key One example of a field that should not used as the primary key is ………. Field.
40
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-40 Defining a Primary Key Defines field as primary key Indicates field as primary key Duplicate values in field not allowed
41
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-41 Defining Date Format Date/time data type formats Format name Format sample
42
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-42 Defining Additional Fields 11 fields defined
43
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-43 More on Creating Tables Editing field definitions Saving the table structure
44
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-44 ENTERING AND EDITING TABLE DATA Views ViewPurpose Design viewUsed to create a table, form, query, or report Datasheet viewProvides a row-and-column view of data Form viewDisplays records in a form PreviewDisplays data as it will appear when printed
45
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-45 Using Table Datasheet View Datasheet Field selector Record selector Current record Record number indicator Navigation button Datasheet containing one blank record Record number indicator Table datasheet toolbar
46
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-46 Entering Data in a Datasheet View Informs you that entry is not valid Identifies end of table or where new record can be entered or edited
47
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-47 Datasheet View Entering data –Should be accurate and consistent –Typed exactly as you want it to appear Editing data –Position insertion point in field –Use ESC to cancel changes
48
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-48 Concept 7 Clipart We are pleased to announce the grand opening of Tom’s Deli Drawing Object Photograph Graphic
49
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-49 Graphics Graphic: is anon text element or object such as a drawing. Drawing object: consisting of shapes such as lines and boxes Picture: is an illustration such as a scanned photograph Bound object: is stored in a table and connected to specific record and field. Unbound object: is associated with the table as a whole, not with the specific record.
50
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-50 Inserting a Picture Create a new object Insert existing object
51
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-51 Preview Changes dialog box view Preview of selected file
52
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-52 Opening Inserted Object Picture opened in graphics program
53
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-53 Navigating a Datasheet KeyVoiceMovement Right arrow key or Tab Tab or RightNext field Left arrow key or Shift +Tab Shift tab or leftPrevious field Downward arrow key DownCurrent field in next record Upward arrow key UpCurrent field in previous field Home First field in record End Last field in record
54
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-54 Changing a Column Width Column width too small to display entire entry Column width larger than needs to be
55
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-55 Concept 8 Size of a field column Affects amount of data you can see Default can display 15.6667 characters Can adjust width for appearance Use Best Fit: automatically adjusts the column widths of all selected columns to accommodate the longest entry. Column Width
56
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-56 Resizing a Column Drag to size column width Column width increased and field entries are fully displayed
57
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-57 Using Best Fit All fields selected
58
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-58 Adding Records in Data Entry All existing records are hidden Number of records entered in data entry
59
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-59 Adding Records in Data Entry Records are displayed in primary key order
60
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-60 Deleting Records Deletes selected record Message box asks you to confirm deletion
61
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-61 Previewing And Printing A Table Preview table to save time –Adjust magnification to best fit –Can view multiple pages Page orientation –Portrait –Landscape Print table –Use default settings –Use Print command to change settings
62
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-62 Previewing the Table 1-inch margin Page number in footer Mouse pointer Table name and date Print Preview toolbar
63
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-63 More on Preview Displays two pages
64
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-64 Changing the Page Orientation Page orientation changed to landscape
65
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-65 Print Options OptionAction AllPrints the entire document PagesPrints pages you specify by typing page numbers in the textbox Selected RecordsPrints selected records only
66
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-66 Printing a Selected page Enter page numbers to print Selected printer
67
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-67 Closing And Opening A Table & Database Close table and save any layout changes Close database Click OPEN to open existing database file Select name of table to open
68
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-68 Closing a Table Table name appears in the table object list
69
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-69 Closing the Database Main menu and toolbar buttons are available Empty Access window
70
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-70 Opening a Database Access file names Student names document
71
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-71 Opening a Table Table name selected Open selected table object
72
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-72 Exiting Access Click X in the upper right corner of the Access window Menu equivalent is File/Exit
73
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-73 Key Terms active window Best Fit bound object cell clip art column width current field current record database Database toolbar drawing object datasheet data type field field name field property
74
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-74 Key Terms continued field selector field size graphic landscape navigation buttons object orientation picture portrait primary key record record number indicator record selector relational database table
75
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-75 Key Terms continued Unbound object view Wizard workspace
76
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-76 FAQs 1.What is a relational database? 2.What is the difference between a table and a file? 3.Does a database contain one table or several tables?
77
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-77 FAQs 4.The My Document folder has several files called db1, db2, db3, etc. What are these? 5.What other Access objects are in a database besides tables? 6.What is a primary key? 7.I am ready to enter my data into Access. What do I need to do first?
78
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-78 FAQs 8.How can I get the state code of my state to be entered automatically in a field? 9.I want to enter dates using the MM- DD-YY format. Is there an easy way to do this? 10.I forgot a field in my table and now I want it positioned in the middle of the table. How can I do this?
79
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-79 Discussion Questions 1.Discuss several uses you may have for a relational database. Explain the steps you would follow to create your first table. 2.Discuss why it is important to plan a database before creating it. How can proper planning save you time later? 3.Discuss the difference between Edit mode and Navigation mode.
80
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 1-80 Discussion Questions 4.Design view and Datasheet view are two views in Access. Discuss when it would be appropriate to use each of these views. 5.Discuss why it is important to choose the correct data type for a field. What may happen to the data if you change the data type?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.