SlideShare a Scribd company logo
Succeeding in Business with Microsoft Access 2013
Building The Database
Chapter 2
Succeeding in Business with Microsoft Access 2013
Chapter Introduction
• Learn different techniques for:
– Creating tables
– Entering data
– Verifying data
– Relating tables
– Documenting database objects
– Backing up database
– Repairing database
– Securing data
2
Succeeding in Business with Microsoft Access 2013
Tools Covered in This Chapter
• Database Documenter
• Database security
• Datasheet view
• Design view
• Import Spreadsheet Wizard
3
• Input Mask Wizard
• Lookup Wizard
• Relationships window
• Subdatasheet
Succeeding in Business with Microsoft Access 2013
Level 1 Objectives:
Creating the Database Tables
• Review the database design
• Create the database tables using the database
design
• Work in Design view
4
Succeeding in Business with Microsoft Access 2013
Creating the Database Tables:
Reviewing the Database Design
• Make sure that the database stores data in the
correct format and outputs the correct
queries, forms, and reports
• Analyze the client’s needs and make sure the
design is easy to understand
• Limit the scope of a new system
5
Succeeding in Business with Microsoft Access 2013 6
Succeeding in Business with Microsoft Access 2013
Creating the Database
Using the Database Design
• Start Access click New tab in the navigation
bar on the File tab
• Database window
– Main control panel for database
• Navigation pane
– Located on the left side of the window
– Lists all objects (tables, reports, etc.) in the
database
7
Succeeding in Business with Microsoft Access 2013
Creating a Table by Entering Data in Datasheet
View
• Datasheet view
– Shows table’s records in rows and table’s fields in
columns
• Table window
– Indicates table’s name
• Just start entering data
• Access adds ID field to datasheet
8
Succeeding in Business with Microsoft Access 2013
Datasheet View
9
Succeeding in Business with Microsoft Access 2013
Creating a Table by Entering Data in Datasheet
View (cont’d.)
• Click save button
– Save as dialog box
– Enter table name
• Change to design view
– Click view button in Views group on the Home tab
10
Succeeding in Business with Microsoft Access 2013
Working in Design View
• Design view
– Define table’s fields and field properties
– Rearrange order of fields as necessary
• Table design grid
– Top part of design view
– Includes Field Name, Data Type, and Description
columns
– Each row
• Field in table
11
Succeeding in Business with Microsoft Access 2013
Working in Table Design View (cont’d.)
• Field properties pane
– Bottom part of design view
– Displays field properties for selected field
• Rules when naming fields and database
objects
– Up to 64 characters and any combination of:
• Letters
• Numbers
• Spaces
• Special characters except ., !, `, [, and ]
12
Succeeding in Business with Microsoft Access 2013
Working in Design View (cont’d.)
• Rules when naming fields and database objects
(cont’d.)
– Cannot begin with space
• Some organizations establish standards for
naming objects and fields
• Field size property
– Limit number of characters to store in Short Text field
– Set the type of numeric data in Number field
– Create a reasonable margin of error
13
Succeeding in Business with Microsoft Access 2013
Adding Descriptions to Fields
in Table Design View
• Description property
– Document contents
– Identify field as primary or foreign key
– Provide users with instructions about entering
values into field
• Primary Key button
– Access adds a key symbol to indicate the table’s
primary key
14
Succeeding in Business with Microsoft Access 2013
Creating a Table in Design View
• Click Table Design button on Create tab
• Enter field names, data types, and properties
15
Succeeding in Business with Microsoft Access 2013
Evaluating and Testing the
Table Design
• By moving to next record
– Access saves record in table
– To cancel record
• Press Esc key
• After designing table
– Evaluate for potential problems
16
Succeeding in Business with Microsoft Access 2013
Displaying Descriptive Field Names Using the
Caption Property
• Caption property
– Changes way field name is displayed
– Specifies how field name will appear in different
database objects
– Default caption property
• Field name for all data types
17
Succeeding in Business with Microsoft Access 2013
Formatting Field Values
Using an Input Mask
• Input mask
– Predefined format
– Applied to field
– Values are displayed using format specified
– Ensures that all of necessary data entered
• Literal characters
– Not stored in database
– User does not need to type them
• Use the Input Mask Wizard
18
Succeeding in Business with Microsoft Access 2013
Input Mask Characters
and Descriptions
19
Succeeding in Business with Microsoft Access 2013
Validating Fields to Ensure Accurate and
Consistent Data
• Validation rule
– Compares data entered by user against one or
more valid values
• Validation Rule property
– Specifies valid values that users can enter
• Validation Text property
– Opens a dialog box that explains the valid values
20
Succeeding in Business with Microsoft Access 2013
Validating Fields to Ensure Accurate and
Consistent Data (cont’d.)
21
Succeeding in Business with Microsoft Access 2013
Automating Data Entry by
Using a Default Field Value
• Default Value property
– Enters default value into any type of field
– Except for AutoNumber field
22
Succeeding in Business with Microsoft Access 2013
Automating Data Entry
by Using a Lookup Field
• Lookup field
– Lets user select field value
– From:
• List of existing field values stored in database
• List of values specified when lookup field
created
• Change field’s data type to Lookup
23
Succeeding in Business with Microsoft Access 2013
Level 1 Summary
• Create tables by:
– Entering data
– Using design view
• Customizing tables
– Captions
– Validation rules
– Using Lookup
24
Succeeding in Business with Microsoft Access 2013
Level 2 Objectives:
Populating and Relating the Database Tables
• Create additional tables for the database
• Import data into a database
• Work with primary and foreign keys
• Create one-to-many and many-to-many
relationships between tables
• Use a subdatasheet to view related records
25
Succeeding in Business with Microsoft Access 2013
Populating the Database Tables
• Populating database
– Load tables with data
– Enter data in Datasheet view
– Import data
• Copy and Paste
• Import from Excel workbook
26
Succeeding in Business with Microsoft Access 2013
Importing and Copying Records from One Table
to Another
• Import existing data from another Access
table
– Table structure must be identical
– Open tables in Datasheet view
– Select all of records
– Click Copy button
– Open target database table
– Click Paste button
27
Succeeding in Business with Microsoft Access 2013
Importing Data from
an Excel Workbook
• Can import data and create table at same time
– Review contents of workbook to understand how
it is arranged
• If column heading names comply with rules
for naming fields in Access:
– Access uses them as field names data imported
• If column headings are absent/do not comply:
– Access assigns generic field names
28
Succeeding in Business with Microsoft Access 2013
Importing Data from
an Excel Workbook (cont’d.)
• Access can import most data from worksheet
– But not graphics
– Formulas converted to numbers
– Hyperlinks imported as text data
• Usually, the entire worksheet is imported
– Can import named ranges of data
29
Succeeding in Business with Microsoft Access 2013 30
Succeeding in Business with Microsoft Access 2013
Setting a Primary Key Field
31
Succeeding in Business with Microsoft Access 2013
Working with Primary
and Foreign Keys
• Primary key and foreign key counterparts
– Must have same data type, field size, and field values
• Primary key value
– Must exist before entering corresponding record if
referential integrity is set
– Cannot be null
• Required property
– Nonprimary key field
– Ensures that users enter value into field
32
Succeeding in Business with Microsoft Access 2013
Working with Primary
and Foreign Keys (cont’d.)
• Works to make data retrieval faster
– Access creates index for primary key field
• Index
– List maintained by database
– Associates field values in indexed field with
records that contain field values
33
Succeeding in Business with Microsoft Access 2013
Creating an Index
• Increase speed at which access searches
• Open table in design view
– Select field to index
– Click indexed property list arrow
• Create index for any field
– Except fields of type
• Calculated
• Attachment
• OLE object
34
Succeeding in Business with Microsoft Access 2013 35
Succeeding in Business with Microsoft Access 2013
Creating an Index (cont’d.)
• View indexes created in table
– Click indexes button on Show/Hide group on Design
tab
• Create indexes for as many fields as necessary to
optimize searches in database
– Records indexed when table saved
– Updated automatically as records added, deleted, or
changed
– As database grows
• Indexes might slow down database
36
Succeeding in Business with Microsoft Access 2013
Creating an Index (cont’d.)
• Increases size of database
• Slows down database
– Must update index as users add, change, and
delete records
• Add indexes as needed
– When improved query performance is necessary
• Delete indexes to:
– Increase speed
– Reduce file size
37
Succeeding in Business with Microsoft Access 2013
Creating One-to-Many Relationships Between
Tables
• Open relationships window
– Click relationships button on Database Tools tab
• Relationship has certain properties
– Type
• One-to-many
• One-to-one
• Many-to-many
– Attributes
• Specify how to manage changes when records
updated or deleted
38
Succeeding in Business with Microsoft Access 2013 39
Succeeding in Business with Microsoft Access 2013
Edit Relationships Dialog Box
40
Succeeding in Business with Microsoft Access 2013
Creating a Many-To-Many Relationship
Between Tables
• In Design view
– A junction table to create the many-to-many
relationship
– The primary key is a combination of fields
• Referred to as a composite primary key
– Create the one-to-many relationship between
individual tables involved
– Create the many-to-many relationship
41
Succeeding in Business with Microsoft Access 2013
Using a Subdatasheet to View Related Records
• After importing data into database
– Open each table in Datasheet view
– Check data for problems
• Expand indicator (box with the plus sign)
appears for relationships
– Click to view subdatasheet with the related
records
42
Succeeding in Business with Microsoft Access 2013
Level 2 Summary
• Import data from
– Other Access tables
– Excel
• Index
– Used to aid searches
• Create relationships using Relationships
Window
43
Succeeding in Business with Microsoft Access 2013
Level 3 Objectives:
Maintaining and Securing a Database
• Learn about the role of the database
administrator
• Compact repair and back up a database
• Document the database design using the
Database Documenter
• Secure a database from unauthorized use
44
Succeeding in Business with Microsoft Access 2013
The Database Administrator Role
• Database administration (DBA)
– Responsible for maintaining database
– Sets security and other features of database
• Default option for opening database
– Available to other users at same time
• Open access database in four ways
– Open mode, Open Read-Only mode, Open
Exclusive mode, Open Exclusive Read-Only mode
45
Succeeding in Business with Microsoft Access 2013
Compacting and Repairing
a Database
• Compact
– Data and objects reorganized
– Unused spaces reassigned and deleted
– Result
• Decreased file size
• Improved efficiency
– Can be done manually or every time database closed
• Backing up the database before compacting and
repairing is good procedure
46
Succeeding in Business with Microsoft Access 2013
Backing Up a Database
• Creates copy of database
– Use to restore in event of loss
• Schedule database backups based on
manageable amount of data loss
• Store copy in fireproof location offsite
• Created on external media such as:
– CD, DVD, USB flash drive, external hard drive
47
Succeeding in Business with Microsoft Access 2013
Backing Up a Database (cont’d.)
• Back up database
– Click File tab, Share tab, Save Database As button
– Under Advanced, click Back Up Database
– Opens the Save As Dialog box for location to save
backup
– Use default backup database name (add date)
• Might take few minutes to several hours
• Backup copy can be opened like any other
Access database
48
Succeeding in Business with Microsoft Access 2013
Documenting the Database Design
• Database Documenter
– Produces report of every object or just selected
objects in database
• Click Database Tools tab, and then click the
Database Documenter button
– Tabs at top of documenter dialog box
– Select objects by type
49
Succeeding in Business with Microsoft Access 2013
Documenter Dialog Box
50
Succeeding in Business with Microsoft Access 2013
Securing a Database From Unauthorized Use
• Plan for and to prevent data loss
• Protect database from unintentional or
malicious damage
• DBA must open database with exclusive access
prior to setting protection features
• Tools
– Setting database password
– Encrypting a database
– Hiding database objects
51
Succeeding in Business with Microsoft Access 2013
Using a Password to
Protect a Database
• Password
– Collection of characters that user types to gain
access to file
• Database administrator sets database
password
– Users cannot open database file in Access unless
they provide correct password
52
Succeeding in Business with Microsoft Access 2013
Encrypting a Database to
Prevent Unauthorized Use
• Access 2013 combines two tools for database
security
– Encryption and database passwords
– When you encrypt a database with a password,
the data is made unreadable by other tools
• Encrypt with Password option
53
Succeeding in Business with Microsoft Access 2013
Hiding Database Objects
From Users
• Casual users may damage database by:
– Unintentionally altering object’s design
– Deleting object entirely
• Hide objects from being displayed in
Navigation Pane
– User will not be able to accidentally or
intentionally damage database
• Revealing hidden object not difficult
• Hide using Properties dialog box
54
Succeeding in Business with Microsoft Access 2013
Level 3 Summary
• Compact database
• Backup database
• Document database
• Secure database
– Password
– Encryption
– Hiding objects
55
Succeeding in Business with Microsoft Access 2013
Chapter Summary
• Create tables using one of three methods
• Import data from other Access tables or Excel
• Create relationships using Relationships
Window
• Secure database
– Password
– Encryption
– Hiding Objects
56

More Related Content

PPTX
Ch04 cmpt110
PPTX
Ch07 cmpt110
PPTX
Ch06 cmpt110
PPTX
Ch05 cmpt110
PPTX
Ch03 cmpt110
PPTX
Ch01 CMPT110
PPTX
Ch05 Access
 
PPTX
Ch06 Access
 
Ch04 cmpt110
Ch07 cmpt110
Ch06 cmpt110
Ch05 cmpt110
Ch03 cmpt110
Ch01 CMPT110
Ch05 Access
 
Ch06 Access
 

What's hot (20)

PPTX
Ch01 Access
 
PPTX
Ch02 Access
 
PPTX
Understand Charts in Excel - Chapter.03
PPTX
Ch03 Access
 
PPTX
Intro Access
 
PPTX
Access 2013 Unit A
PPTX
Dynamics AX 2009 Data Dictionary - Güven Şahin - 04.05.2013
PPTX
Access 2013 Unit B
PPTX
Microsoft dynamics ax2012 : forms and tables methods call sequences, How To?
PPT
Ax Presentation
PPTX
AX 2012: All About Lookups!
PPT
Microsoft Dynamics CRM SSRS REPORTS
PPTX
Microsoft Dynamics CRM: Reporting and Dashboards
PDF
Creating reports in oracle e business suite using xml publisher
PDF
Access 2010 Unit A PPT
PPT
MISys Manufacturing Custom Reporting Overview
PPTX
TimeCard for Outlook - Workgroup version
PPTX
Using adobe® framemaker® 10 part 2
PPTX
Access lesson05
PPT
Ms Access ppt
Ch01 Access
 
Ch02 Access
 
Understand Charts in Excel - Chapter.03
Ch03 Access
 
Intro Access
 
Access 2013 Unit A
Dynamics AX 2009 Data Dictionary - Güven Şahin - 04.05.2013
Access 2013 Unit B
Microsoft dynamics ax2012 : forms and tables methods call sequences, How To?
Ax Presentation
AX 2012: All About Lookups!
Microsoft Dynamics CRM SSRS REPORTS
Microsoft Dynamics CRM: Reporting and Dashboards
Creating reports in oracle e business suite using xml publisher
Access 2010 Unit A PPT
MISys Manufacturing Custom Reporting Overview
TimeCard for Outlook - Workgroup version
Using adobe® framemaker® 10 part 2
Access lesson05
Ms Access ppt
Ad

Viewers also liked (20)

PDF
Modul microsoft acces 2013 hhh
PDF
Modul1kurikulum2013danprofesionalisasibk 160331042433
PDF
Pengenalan kepada pangkalan data
PDF
Perwakilan keperluan pangkalan data
PPTX
Network address translation
PDF
Network address translation pdf
PPT
Nat
PPTX
Nat presentation
DOCX
asas pangkalan data(konsep pangkalan data )
PDF
Access 2013
PPTX
What is Network Address Translation (NAT)
PDF
Quickstart Microsoft access 2013
PDF
Lengkap Microsoft Access Langkah Demi Langkah
PPTX
How to Create A Microsoft Access 2007 Database
PPTX
MS Office Access Tutorial
PDF
Intro to Microsoft Access
PPTX
Access lesson 01 Microsoft Access Basics
PDF
Asas cakephp-mvc
PDF
Introduction to Excel - Excel 2013 Tutorial
PDF
LinkedIn SlideShare: Knowledge, Well-Presented
Modul microsoft acces 2013 hhh
Modul1kurikulum2013danprofesionalisasibk 160331042433
Pengenalan kepada pangkalan data
Perwakilan keperluan pangkalan data
Network address translation
Network address translation pdf
Nat
Nat presentation
asas pangkalan data(konsep pangkalan data )
Access 2013
What is Network Address Translation (NAT)
Quickstart Microsoft access 2013
Lengkap Microsoft Access Langkah Demi Langkah
How to Create A Microsoft Access 2007 Database
MS Office Access Tutorial
Intro to Microsoft Access
Access lesson 01 Microsoft Access Basics
Asas cakephp-mvc
Introduction to Excel - Excel 2013 Tutorial
LinkedIn SlideShare: Knowledge, Well-Presented
Ad

Similar to Ch02 cmpt110 (20)

PPTX
Access 2013 Unit A
PPTX
MS Access 2. pptx
PPTX
Access 2013 Unit C
PPTX
Access essential training framework
PDF
Access 2010 Unit B PPT
PPTX
MS Access.pptx
PPTX
MS-ACCESS.pptx
PPTX
PPTX
Access 2013 Unit D
PPTX
databasebesignmsaccessfirstdiscussiononline1
PPTX
Ms access .ppt naman.pptsssssssssssssssx
PPTX
Implementing Tables and Views.pptx
PPT
HARJOT.ppt
PPTX
Power point 2013 illustrated unit c
PPTX
Lecture-Ms-Access related to computer concepts and application
PPT
Database Connection
PPT
L22 analyzing data using smart view
PDF
Access 2010 Unit C PPT
PPTX
PPTX
The strength of a spatial database
Access 2013 Unit A
MS Access 2. pptx
Access 2013 Unit C
Access essential training framework
Access 2010 Unit B PPT
MS Access.pptx
MS-ACCESS.pptx
Access 2013 Unit D
databasebesignmsaccessfirstdiscussiononline1
Ms access .ppt naman.pptsssssssssssssssx
Implementing Tables and Views.pptx
HARJOT.ppt
Power point 2013 illustrated unit c
Lecture-Ms-Access related to computer concepts and application
Database Connection
L22 analyzing data using smart view
Access 2010 Unit C PPT
The strength of a spatial database

Recently uploaded (20)

PPTX
White Green Simple and Professional Business Pitch Deck Presentation.pptx
PPTX
Art Appreciation-Lesson-1-1.pptx College
PPTX
SlideEgg_21518-Company Presentation.pptx
PDF
Chapter 3 about The site of the first mass
PDF
Slide_BIS 2020 v2.pdf....................................
PPTX
CPAR7 ARTS GRADE 112 LITERARY ARTS OR LI
PPTX
G10 HOMEROOM PARENT-TEACHER ASSOCIATION MEETING SATURDAY.pptx
PDF
Love & Romance in Every Sparkle_ Discover the Magic of Diamond Painting.pdf
PPTX
A slideshow about aesthetic value in arts
PPTX
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
PPTX
Socio ch 1 characteristics characteristics
PPTX
Green and Orange Illustration Understanding Climate Change Presentation.pptx
PPTX
Technical-Codes-presentation-G-12Student
PPTX
Military history & Evolution of Armed Forces of the Philippines
PDF
the saint and devil who dominated the outcasts
PPTX
vsfbvefbegbefvsegbthnmthndgbdfvbrsjmrysnedgbdzndhzmsr
PPTX
CPAR-ELEMENTS AND PRINCIPLE OF ARTS.pptx
PPTX
DIMAYUGA ANDEA MAE P. BSED ENG 3-2 (CHAPTER 7).pptx
PPTX
Physical Education and Health Q4-CO4-TARPAPEL
PPSX
Multiple scenes in a single painting.ppsx
White Green Simple and Professional Business Pitch Deck Presentation.pptx
Art Appreciation-Lesson-1-1.pptx College
SlideEgg_21518-Company Presentation.pptx
Chapter 3 about The site of the first mass
Slide_BIS 2020 v2.pdf....................................
CPAR7 ARTS GRADE 112 LITERARY ARTS OR LI
G10 HOMEROOM PARENT-TEACHER ASSOCIATION MEETING SATURDAY.pptx
Love & Romance in Every Sparkle_ Discover the Magic of Diamond Painting.pdf
A slideshow about aesthetic value in arts
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
Socio ch 1 characteristics characteristics
Green and Orange Illustration Understanding Climate Change Presentation.pptx
Technical-Codes-presentation-G-12Student
Military history & Evolution of Armed Forces of the Philippines
the saint and devil who dominated the outcasts
vsfbvefbegbefvsegbthnmthndgbdfvbrsjmrysnedgbdzndhzmsr
CPAR-ELEMENTS AND PRINCIPLE OF ARTS.pptx
DIMAYUGA ANDEA MAE P. BSED ENG 3-2 (CHAPTER 7).pptx
Physical Education and Health Q4-CO4-TARPAPEL
Multiple scenes in a single painting.ppsx

Ch02 cmpt110

  • 1. Succeeding in Business with Microsoft Access 2013 Building The Database Chapter 2
  • 2. Succeeding in Business with Microsoft Access 2013 Chapter Introduction • Learn different techniques for: – Creating tables – Entering data – Verifying data – Relating tables – Documenting database objects – Backing up database – Repairing database – Securing data 2
  • 3. Succeeding in Business with Microsoft Access 2013 Tools Covered in This Chapter • Database Documenter • Database security • Datasheet view • Design view • Import Spreadsheet Wizard 3 • Input Mask Wizard • Lookup Wizard • Relationships window • Subdatasheet
  • 4. Succeeding in Business with Microsoft Access 2013 Level 1 Objectives: Creating the Database Tables • Review the database design • Create the database tables using the database design • Work in Design view 4
  • 5. Succeeding in Business with Microsoft Access 2013 Creating the Database Tables: Reviewing the Database Design • Make sure that the database stores data in the correct format and outputs the correct queries, forms, and reports • Analyze the client’s needs and make sure the design is easy to understand • Limit the scope of a new system 5
  • 6. Succeeding in Business with Microsoft Access 2013 6
  • 7. Succeeding in Business with Microsoft Access 2013 Creating the Database Using the Database Design • Start Access click New tab in the navigation bar on the File tab • Database window – Main control panel for database • Navigation pane – Located on the left side of the window – Lists all objects (tables, reports, etc.) in the database 7
  • 8. Succeeding in Business with Microsoft Access 2013 Creating a Table by Entering Data in Datasheet View • Datasheet view – Shows table’s records in rows and table’s fields in columns • Table window – Indicates table’s name • Just start entering data • Access adds ID field to datasheet 8
  • 9. Succeeding in Business with Microsoft Access 2013 Datasheet View 9
  • 10. Succeeding in Business with Microsoft Access 2013 Creating a Table by Entering Data in Datasheet View (cont’d.) • Click save button – Save as dialog box – Enter table name • Change to design view – Click view button in Views group on the Home tab 10
  • 11. Succeeding in Business with Microsoft Access 2013 Working in Design View • Design view – Define table’s fields and field properties – Rearrange order of fields as necessary • Table design grid – Top part of design view – Includes Field Name, Data Type, and Description columns – Each row • Field in table 11
  • 12. Succeeding in Business with Microsoft Access 2013 Working in Table Design View (cont’d.) • Field properties pane – Bottom part of design view – Displays field properties for selected field • Rules when naming fields and database objects – Up to 64 characters and any combination of: • Letters • Numbers • Spaces • Special characters except ., !, `, [, and ] 12
  • 13. Succeeding in Business with Microsoft Access 2013 Working in Design View (cont’d.) • Rules when naming fields and database objects (cont’d.) – Cannot begin with space • Some organizations establish standards for naming objects and fields • Field size property – Limit number of characters to store in Short Text field – Set the type of numeric data in Number field – Create a reasonable margin of error 13
  • 14. Succeeding in Business with Microsoft Access 2013 Adding Descriptions to Fields in Table Design View • Description property – Document contents – Identify field as primary or foreign key – Provide users with instructions about entering values into field • Primary Key button – Access adds a key symbol to indicate the table’s primary key 14
  • 15. Succeeding in Business with Microsoft Access 2013 Creating a Table in Design View • Click Table Design button on Create tab • Enter field names, data types, and properties 15
  • 16. Succeeding in Business with Microsoft Access 2013 Evaluating and Testing the Table Design • By moving to next record – Access saves record in table – To cancel record • Press Esc key • After designing table – Evaluate for potential problems 16
  • 17. Succeeding in Business with Microsoft Access 2013 Displaying Descriptive Field Names Using the Caption Property • Caption property – Changes way field name is displayed – Specifies how field name will appear in different database objects – Default caption property • Field name for all data types 17
  • 18. Succeeding in Business with Microsoft Access 2013 Formatting Field Values Using an Input Mask • Input mask – Predefined format – Applied to field – Values are displayed using format specified – Ensures that all of necessary data entered • Literal characters – Not stored in database – User does not need to type them • Use the Input Mask Wizard 18
  • 19. Succeeding in Business with Microsoft Access 2013 Input Mask Characters and Descriptions 19
  • 20. Succeeding in Business with Microsoft Access 2013 Validating Fields to Ensure Accurate and Consistent Data • Validation rule – Compares data entered by user against one or more valid values • Validation Rule property – Specifies valid values that users can enter • Validation Text property – Opens a dialog box that explains the valid values 20
  • 21. Succeeding in Business with Microsoft Access 2013 Validating Fields to Ensure Accurate and Consistent Data (cont’d.) 21
  • 22. Succeeding in Business with Microsoft Access 2013 Automating Data Entry by Using a Default Field Value • Default Value property – Enters default value into any type of field – Except for AutoNumber field 22
  • 23. Succeeding in Business with Microsoft Access 2013 Automating Data Entry by Using a Lookup Field • Lookup field – Lets user select field value – From: • List of existing field values stored in database • List of values specified when lookup field created • Change field’s data type to Lookup 23
  • 24. Succeeding in Business with Microsoft Access 2013 Level 1 Summary • Create tables by: – Entering data – Using design view • Customizing tables – Captions – Validation rules – Using Lookup 24
  • 25. Succeeding in Business with Microsoft Access 2013 Level 2 Objectives: Populating and Relating the Database Tables • Create additional tables for the database • Import data into a database • Work with primary and foreign keys • Create one-to-many and many-to-many relationships between tables • Use a subdatasheet to view related records 25
  • 26. Succeeding in Business with Microsoft Access 2013 Populating the Database Tables • Populating database – Load tables with data – Enter data in Datasheet view – Import data • Copy and Paste • Import from Excel workbook 26
  • 27. Succeeding in Business with Microsoft Access 2013 Importing and Copying Records from One Table to Another • Import existing data from another Access table – Table structure must be identical – Open tables in Datasheet view – Select all of records – Click Copy button – Open target database table – Click Paste button 27
  • 28. Succeeding in Business with Microsoft Access 2013 Importing Data from an Excel Workbook • Can import data and create table at same time – Review contents of workbook to understand how it is arranged • If column heading names comply with rules for naming fields in Access: – Access uses them as field names data imported • If column headings are absent/do not comply: – Access assigns generic field names 28
  • 29. Succeeding in Business with Microsoft Access 2013 Importing Data from an Excel Workbook (cont’d.) • Access can import most data from worksheet – But not graphics – Formulas converted to numbers – Hyperlinks imported as text data • Usually, the entire worksheet is imported – Can import named ranges of data 29
  • 30. Succeeding in Business with Microsoft Access 2013 30
  • 31. Succeeding in Business with Microsoft Access 2013 Setting a Primary Key Field 31
  • 32. Succeeding in Business with Microsoft Access 2013 Working with Primary and Foreign Keys • Primary key and foreign key counterparts – Must have same data type, field size, and field values • Primary key value – Must exist before entering corresponding record if referential integrity is set – Cannot be null • Required property – Nonprimary key field – Ensures that users enter value into field 32
  • 33. Succeeding in Business with Microsoft Access 2013 Working with Primary and Foreign Keys (cont’d.) • Works to make data retrieval faster – Access creates index for primary key field • Index – List maintained by database – Associates field values in indexed field with records that contain field values 33
  • 34. Succeeding in Business with Microsoft Access 2013 Creating an Index • Increase speed at which access searches • Open table in design view – Select field to index – Click indexed property list arrow • Create index for any field – Except fields of type • Calculated • Attachment • OLE object 34
  • 35. Succeeding in Business with Microsoft Access 2013 35
  • 36. Succeeding in Business with Microsoft Access 2013 Creating an Index (cont’d.) • View indexes created in table – Click indexes button on Show/Hide group on Design tab • Create indexes for as many fields as necessary to optimize searches in database – Records indexed when table saved – Updated automatically as records added, deleted, or changed – As database grows • Indexes might slow down database 36
  • 37. Succeeding in Business with Microsoft Access 2013 Creating an Index (cont’d.) • Increases size of database • Slows down database – Must update index as users add, change, and delete records • Add indexes as needed – When improved query performance is necessary • Delete indexes to: – Increase speed – Reduce file size 37
  • 38. Succeeding in Business with Microsoft Access 2013 Creating One-to-Many Relationships Between Tables • Open relationships window – Click relationships button on Database Tools tab • Relationship has certain properties – Type • One-to-many • One-to-one • Many-to-many – Attributes • Specify how to manage changes when records updated or deleted 38
  • 39. Succeeding in Business with Microsoft Access 2013 39
  • 40. Succeeding in Business with Microsoft Access 2013 Edit Relationships Dialog Box 40
  • 41. Succeeding in Business with Microsoft Access 2013 Creating a Many-To-Many Relationship Between Tables • In Design view – A junction table to create the many-to-many relationship – The primary key is a combination of fields • Referred to as a composite primary key – Create the one-to-many relationship between individual tables involved – Create the many-to-many relationship 41
  • 42. Succeeding in Business with Microsoft Access 2013 Using a Subdatasheet to View Related Records • After importing data into database – Open each table in Datasheet view – Check data for problems • Expand indicator (box with the plus sign) appears for relationships – Click to view subdatasheet with the related records 42
  • 43. Succeeding in Business with Microsoft Access 2013 Level 2 Summary • Import data from – Other Access tables – Excel • Index – Used to aid searches • Create relationships using Relationships Window 43
  • 44. Succeeding in Business with Microsoft Access 2013 Level 3 Objectives: Maintaining and Securing a Database • Learn about the role of the database administrator • Compact repair and back up a database • Document the database design using the Database Documenter • Secure a database from unauthorized use 44
  • 45. Succeeding in Business with Microsoft Access 2013 The Database Administrator Role • Database administration (DBA) – Responsible for maintaining database – Sets security and other features of database • Default option for opening database – Available to other users at same time • Open access database in four ways – Open mode, Open Read-Only mode, Open Exclusive mode, Open Exclusive Read-Only mode 45
  • 46. Succeeding in Business with Microsoft Access 2013 Compacting and Repairing a Database • Compact – Data and objects reorganized – Unused spaces reassigned and deleted – Result • Decreased file size • Improved efficiency – Can be done manually or every time database closed • Backing up the database before compacting and repairing is good procedure 46
  • 47. Succeeding in Business with Microsoft Access 2013 Backing Up a Database • Creates copy of database – Use to restore in event of loss • Schedule database backups based on manageable amount of data loss • Store copy in fireproof location offsite • Created on external media such as: – CD, DVD, USB flash drive, external hard drive 47
  • 48. Succeeding in Business with Microsoft Access 2013 Backing Up a Database (cont’d.) • Back up database – Click File tab, Share tab, Save Database As button – Under Advanced, click Back Up Database – Opens the Save As Dialog box for location to save backup – Use default backup database name (add date) • Might take few minutes to several hours • Backup copy can be opened like any other Access database 48
  • 49. Succeeding in Business with Microsoft Access 2013 Documenting the Database Design • Database Documenter – Produces report of every object or just selected objects in database • Click Database Tools tab, and then click the Database Documenter button – Tabs at top of documenter dialog box – Select objects by type 49
  • 50. Succeeding in Business with Microsoft Access 2013 Documenter Dialog Box 50
  • 51. Succeeding in Business with Microsoft Access 2013 Securing a Database From Unauthorized Use • Plan for and to prevent data loss • Protect database from unintentional or malicious damage • DBA must open database with exclusive access prior to setting protection features • Tools – Setting database password – Encrypting a database – Hiding database objects 51
  • 52. Succeeding in Business with Microsoft Access 2013 Using a Password to Protect a Database • Password – Collection of characters that user types to gain access to file • Database administrator sets database password – Users cannot open database file in Access unless they provide correct password 52
  • 53. Succeeding in Business with Microsoft Access 2013 Encrypting a Database to Prevent Unauthorized Use • Access 2013 combines two tools for database security – Encryption and database passwords – When you encrypt a database with a password, the data is made unreadable by other tools • Encrypt with Password option 53
  • 54. Succeeding in Business with Microsoft Access 2013 Hiding Database Objects From Users • Casual users may damage database by: – Unintentionally altering object’s design – Deleting object entirely • Hide objects from being displayed in Navigation Pane – User will not be able to accidentally or intentionally damage database • Revealing hidden object not difficult • Hide using Properties dialog box 54
  • 55. Succeeding in Business with Microsoft Access 2013 Level 3 Summary • Compact database • Backup database • Document database • Secure database – Password – Encryption – Hiding objects 55
  • 56. Succeeding in Business with Microsoft Access 2013 Chapter Summary • Create tables using one of three methods • Import data from other Access tables or Excel • Create relationships using Relationships Window • Secure database – Password – Encryption – Hiding Objects 56