Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 31 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
31
Dung lượng
3,12 MB
Nội dung
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Creating And Maintaining A Database XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 2 Learn the guidelines for designing databases • When designing a database, first try to think of all the fields of data that needs to be stored. • Next, group the fields into tables. Each table will contain a group of related fields. • You need to select a field in each table to become the primary key for that table. • When tables will be related to one another, you need to include a common field in the two tables that will be used to form the relationship. XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 3 Determining database fields XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 4 Group the fields into tables XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 5 Choose a primary key • Choose a field or fields to serve as the primary key for the table. • A primary key must uniquely identify each record in the table. • Primary keys can consist of more than one field. – Primary keys with more than one field are called composite keys XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 6 Include a common field • When one table needs to be related to another table, you must include a common field. • The common field will be the primary key in one table. • The common field is referred to as a foreign key in the related table. • The foreign key in a table can then be used as a primary key to access the record in the related table. XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 7 Data redundancy wastes space and can lead to data errors XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 8 Setting field properties • When assigning a name to any object in Access, carefully select a name that will indicate what data is stored there. • Field properties include their data type, field sizes, and an optional description of the field. • When selecting a field size, make sure the size is big enough to hold the largest piece of data that will be stored there. – Do not make the field larger then necessary because this will result in wasted disk space • Make sure the data type you select for a field is appropriate for the kind of data to be stored in that field. XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 9 Access field types, slide 1 XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 10 Access field types, slide 2 [...]... in the left margin of the datasheet view New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 29 An alternate method for deleting a record New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 XP 30 Keystroke techniques for navigation and editing modes New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 XP 31 ... changed in the Design View window New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 23 Changing field properties in Design View New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 XP 24 Copy records from another Access database XP • If the data you want in your database already exists in another Access database, you can copy the records from that database... pressing the Tab key Once your cursor is moved off a record, that record is automatically saved on your disk New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 18 XP Datasheet View with 2 records added New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 19 XP Modify the structure of a table by deleting, moving, and adding fields • The structure of... View, right-click the field where you want to insert the new field and then click Insert Rows on the dropdown menu New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 20 Moving a field in Design View New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 XP 21 XP Adding a new field in Design View 1 Right-click the row selector for the field you want to insert... where you will save your database – Enter the name of the database in the File name text box – Click the Create button New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 12 Create a new table New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 XP 13 XP Define fields, and specify a table's primary key • When you create a table, you name the fields and... This differs from the cut and paste method because you actually import the entire table, its structure, and its data New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 26 The Import Objects dialog box New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 XP 27 Copy and import considerations XP • If you choose to copy records from one table to another, it... which field(s) will be the primary key – The primary key is not mandatory, but it is a good idea to assign one New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 14 XP The database Design View window New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 15 Choosing a primary key XP Click a row selector for the field you want to use as the primary key,... database – This is the most flexible approach, since you will create all objects yourself New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 11 XP Create a database without using the Database Wizard • To create a new, blank database without using the Database Wizard: – Start Access – Click Blank Database in the task pane – In the dialog box, navigate to the location where you will... open the desired table to receive the copied records – Place your cursor on the next available row in the table and press the Paste button New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 25 XP Import a table from another Access database • You can also import an entire table, including its structure, into another database • To import a database table: – Click the File menu –... – Type the name you want to assign to the table into the Table Name text box of the Save As dialog box – Click the OK button to save the table using the specified name New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 17 XP Add records to a table using Datasheet View • • • • • Once the table has been created, you can then add records to the table using Datasheet View As you . Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Creating And Maintaining A Database XP New Perspectives on Microsoft Office Access 2003, Second. Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 9 Access field types, slide 1 XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 10 Access field. relationship. XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 3 Determining database fields XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial