Download presentation
Presentation is loading. Please wait.
Published byJoella Stafford Modified over 9 years ago
1
© Paradigm Publishing, Inc. 1
2
2 Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 1Designing the Structure of Tables
3
© Paradigm Publishing, Inc. 3 Designing the Structure of Tables Design Tables and Fields for a New Database Design Tables and Fields for a New Database Restrict Data Entry and Data Display Using Field Properties Restrict Data Entry and Data Display Using Field Properties CHECKPOINT 1 CHECKPOINT 1 Work with Memo Fields Work with Memo Fields Create an Attachment Field and Attach Files to Records Create an Attachment Field and Attach Files to Records CHECKPOINT 2 CHECKPOINT 2 Quick Links to Presentation Contents
4
© Paradigm Publishing, Inc. 4 Design Tables and Fields for a New Database Most of the databases you will use in the workplace will have already been created by database designers. An introduction to the process involved in creating a new database will help you to understand why objects are organized in a certain way and how they are related to one another. Creating a new database from scratch involves careful advance planning.
5
© Paradigm Publishing, Inc. 5 As the designer maps out the tables that will make up the database and the fields that will make up each table, he or she incorporates the following techniques: 1.Each table is considered an entity and should describe a single person, place, object, event, or other subject. 2.Data should be segmented until it is in its smallest unit. 3.Fields that can be calculated by using data in other fields should not be included. 4.Identify fields that can be used to answer questions from the data. continues on next slide… Design Tables and Fields for a New Database…continued
6
© Paradigm Publishing, Inc. 6 5.Specify a data field in each table that that will uniquely identify each record. 6.Determine each table’s relationships to other tables and the field you will use to join the two when you create relationships. 7.Relational databases are built upon the concept that data redundancy should be avoided except for fields that will be used to join tables in a relationship. The design process may seem time-consuming; however, the time spent to plan and produce a well- designed database saves time later. Design Tables and Fields for a New Database…continued
7
© Paradigm Publishing, Inc. 7 diagram of a table structure Recall from Level 1, Chapter 1 that designers often create a visual representation of the database’s structure in a diagram. Design Tables and Fields for a New Database…continued
8
© Paradigm Publishing, Inc. 8 continues on next slide… Design Tables and Fields for a New Database…continued
9
© Paradigm Publishing, Inc. 9 Design Tables and Fields for a New Database…continued
10
© Paradigm Publishing, Inc. 10 By default, the Field Size property of a text field is set to a width of 255. Access uses only the amount of space needed for the data that is entered, even when the field size allows for more characters, so you may wonder why you would ever change the property to a smaller value. One reason is that changing the Field Size property can allow you to restrict the length of data entered into the field. Design Tables and Fields for a New Database…continued
11
© Paradigm Publishing, Inc. 11 Restrict Data Entry and Data Display Using Field Properties The properties that are available for a field depend on the field’s data type. Use the options available in the Field Properties section in Design view to place restrictions on data entered into a field and to ensure data is entered and displayed consistently.
12
© Paradigm Publishing, Inc. 12 Restrict Data Entry and Data Display Using Field Properties…continued To add a caption to an existing field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Caption property box. 4.Type the descriptive text. 5.Save the table. Caption property box
13
© Paradigm Publishing, Inc. 13 Restrict Data Entry and Data Display Using Field Properties…continued To require data in a field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Required property box. 4.Click the down-pointing arrow. 5.Click Yes. 6.Save the table. Required property box
14
© Paradigm Publishing, Inc. 14 Restrict Data Entry and Data Display Using Field Properties…continued When you leave a field blank when entering a new record, Access records a null value in the field. A zero-length field can be used to indicate that a field is not applicable to the current record. This is different than leaving the field blank.
15
© Paradigm Publishing, Inc. 15 Restrict Data Entry and Data Display Using Field Properties…continued To disallow zero-length strings in a field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Allow Zero Length property box. 4.Click the down-pointing arrow. 5.Click No. 6.Save the table. Allow Zero Length property box
16
© Paradigm Publishing, Inc. 16 Restrict Data Entry and Data Display Using Field Properties…continued The Format property controls how data is displayed in a field in a datasheet, query, form, or report. The formats available to you depend on the field’s data type.
17
© Paradigm Publishing, Inc. 17 Restrict Data Entry and Data Display Using Field Properties…continued continues on next slide…
18
© Paradigm Publishing, Inc. 18 Restrict Data Entry and Data Display Using Field Properties…continued
19
© Paradigm Publishing, Inc. 19 Restrict Data Entry and Data Display Using Field Properties…continued To format a Text field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Format property box. 4.Type the desired format codes. 5.Save the table. Format property box
20
© Paradigm Publishing, Inc. 20 Restrict Data Entry and Data Display Using Field Properties…continued
21
© Paradigm Publishing, Inc. 21 Restrict Data Entry and Data Display Using Field Properties…continued You can specify up to four different formats for a numeric field, allowing you to include different options for displaying positive values, negative values, zero values, and null values. Examine the following custom format code: #,###.00;-#,###.00[Red];0.00;"Unknown"
22
© Paradigm Publishing, Inc. 22 To format a Number field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Format property box. 4.Type the desired format codes or select from the predefined list. 5.Save the table. Format property box Restrict Data Entry and Data Display Using Field Properties…continued
23
© Paradigm Publishing, Inc. 23 Restrict Data Entry and Data Display Using Field Properties…continued
24
© Paradigm Publishing, Inc. 24 To format a Date/Time field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Format property box. 4.Type the desired format codes or select from the predefined list. 5.Save the table. Format property box Restrict Data Entry and Data Display Using Field Properties…continued
25
© Paradigm Publishing, Inc. 25 Restrict Data Entry and Data Display Using Field Properties…continued You can use an input mask when you want to control the type of data that can be entered into a field and the pattern in which it is entered. Using input masks ensures that data will be entered consistently across all records.
26
© Paradigm Publishing, Inc. 26 Restrict Data Entry and Data Display Using Field Properties…continued
27
© Paradigm Publishing, Inc. 27 Restrict Data Entry and Data Display Using Field Properties…continued An input mask can contain up to three sections separated by semicolons. The following is an example of an input mask to store a four-digit customer identification number with a pound symbol (#) as the placeholder: 0000;;#. The first section of the input mask, 0000, contains the four required digits of the customer identification. Since the mask contains no display characters (such as a hyphen), the second section is left blank. The third section, located after the second semicolon, contains the placeholder character, a pound symbol.
28
© Paradigm Publishing, Inc. 28 To create a custom input mask: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Input Mask property box. 4.Type the input mask codes. 5.Save the table. Input Mask property box Restrict Data Entry and Data Display Using Field Properties…continued
29
© Paradigm Publishing, Inc. 29 Restrict Data Entry and Data Display Using Field Properties…continued Other field properties that should be considered for data accuracy when designing database tables include the Default Value, Validation Rule, and Validation Text properties. In Level 1 you learned to add a validation rule using the Validation button in the Field Validation group of the Table Tools Fields tab. In Design view, the Validation Rule and Validation Text properties are located just above the Required property.
30
© Paradigm Publishing, Inc. 30 1)Designers often create a visual representation of the database’s structure in this. a.object b.diagram c.chart d.table 1)Designers often create a visual representation of the database’s structure in this. a.object b.diagram c.chart d.table 3)By default, the Required property is set to this. a.on b.off c.yes d.no 3)By default, the Required property is set to this. a.on b.off c.yes d.no 2)By default, text fields are set to this width in the Field Size property. a.55 b.155 c.255 d.355 2)By default, text fields are set to this width in the Field Size property. a.55 b.155 c.255 d.355 4)Using these ensures data is entered consistently in all records. a.input masks b.output masks c.input fields d.output fields 4)Using these ensures data is entered consistently in all records. a.input masks b.output masks c.input fields d.output fields Next Question Next Slide Answer
31
© Paradigm Publishing, Inc. 31 Work with Memo Fields To enable rich text formatting in a Memo field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Text Format property box. 4.Click the down-pointing arrow. 5.Click the Rich Text option. 6.Click Yes. 7.Save the table. Rich Text option
32
© Paradigm Publishing, Inc. 32 Work with Memo Fields…continued To track changes in a Memo field: 1.Open the table in Design view. 2.Activate the desired field. 3.Click in the Append Only property box. 4.Click the down-pointing arrow. 5.Click Yes. 6.Save the table. Append Only property box
33
© Paradigm Publishing, Inc. 33 Create an Attachment Field and Attach Files to Records To create an Attachment field: 1.Open the table in Design view. 2.Click in the first blank field row. 3.Type the desired field name. 4.Click in the Data Type column. 5.Click the down-pointing arrow. 6.Click the Attachment option. 7.Save the table. Attachment option
34
© Paradigm Publishing, Inc. 34 Create an Attachment Field and Attach Files to Records…continued To attach files to a record: 1.Open the table in Datasheet view. 2.Double-click the paper clip in the desired record. 3.At the Attachments dialog box, click the Add button. 4.Navigate to the drive and/or folder location. 5.Double-click the file name. 6.Click OK. Attachments dialog box
35
© Paradigm Publishing, Inc. 35 Create an Attachment Field and Attach Files to Records…continued To view the attached file: 1.Open the table in Datasheet view. 2.Double-click the paper clip in the desired record. 3.Double-click the file name. 4.View the file contents. 5.Exit the source program. 6.Click OK. file contents of source program
36
© Paradigm Publishing, Inc. 36 Create an Attachment Field and Attach Files to Records…continued To edit an attached file: 1.Open the file attachment. 2.Make the desired changes. 3.Click the Save button in the source program. 4.Exit the source program. 5.Click OK. 6.At the Save Attachment dialog box, click Yes. Save Attachment dialog box
37
© Paradigm Publishing, Inc. 37 Create an Attachment Field and Attach Files to Records…continued To export a file that is attached to a record and save it in another location, select the file and then click the Save As button in the Attachments dialog box. To remove a file that is attached to a record, open the Attachments dialog box in the record containing the file attachment, click the name of the file you want to delete, click the Remove button, and then click OK to close the Attachments dialog box.
38
© Paradigm Publishing, Inc. 38 1)By default, Access formats a Memo field as this type of text. a.ordinary b.enhanced c.rich d.plain 1)By default, Access formats a Memo field as this type of text. a.ordinary b.enhanced c.rich d.plain 3)Using this type of field you can store several files in a single field attached to a record. a.Append Only b.Attachment c.Text d.Memo 3)Using this type of field you can store several files in a single field attached to a record. a.Append Only b.Attachment c.Text d.Memo 2)The Append Only property for a Memo field is set to this by default. a.No b.Yes c.On d.Off 2)The Append Only property for a Memo field is set to this by default. a.No b.Yes c.On d.Off 4)An Attachment field displays with this in Datasheet view. a.thumbnail b.push pin c.paper clip d.staple 4)An Attachment field displays with this in Datasheet view. a.thumbnail b.push pin c.paper clip d.staple Next Question Next Slide Answer
39
© Paradigm Publishing, Inc. 39 Designing the Structure of Tables Design the structure of tables to optimize efficiency and accuracy of data Select the appropriate field data type based on analysis of source data Disallow blank field values Allow or disallow zero-length strings in a field Create a custom format for text, number, and date fields Create a custom input mask Define rich text formatting for a memo field Store history of changes to a memo field Define and use an attachment field with multiple attachments Summary of Presentation Concepts
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.