Access Part 2 - Design



Similar documents
Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Microsoft Access Basics

MS Access Lab 2. Topic: Tables

If the database that is required is similar to a template then whole database can be generated by using a template that already exists.

Access 2010 Intermediate Skills

How To Create A Database For Employee Records In A Club Account In A Computer System In A Cell Phone Or Cell Phone With A Cell Computer (For A Cell)

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N).

Creating a Database in Access

Objectives. Understand databases Create a database Create a table in Datasheet view Create a table in Design view

Reduced Quality Sample

Use Find & Replace Commands under Home tab to search and replace data.

Topic: Relationships in ER Diagram and Relationships in MS Access

Microsoft Access 2010 handout

Microsoft Access 2007 Module 1

Information Technology Services Kennesaw State University

MICROSOFT ACCESS 2007 BOOK 2

Create a New Database in Access 2010

Lab Manual. Databases. Microsoft Access. Peeking into Computer Science Access Lab manual

Introduction to Microsoft Access 2010

A Basic introduction to Microsoft Access

IN THIS PROJECT, YOU LEARN HOW TO

Microsoft Office 2010

Introduction to Microsoft Access 2013

Planning and Creating a Custom Database

Access 2010: Creating Queries Table of Contents INTRODUCTION TO QUERIES... 2 QUERY JOINS... 2 INNER JOINS... 3 OUTER JOINS...

Creating and Using Databases with Microsoft Access

Microsoft Access 2010 Part 1: Introduction to Access

Microsoft Access 2010 Overview of Basics

Lab 2: MS ACCESS Tables

- Suresh Khanal. Microsoft Excel Short Questions and Answers 1

User Services. Microsoft Access 2003 II. Use the new Microsoft

Access 2007 Creating Forms Table of Contents

Access Creating Databases - Fundamentals

Working with Access Tables A Continuation

Microsoft Office Access 2007 Basics

Microsoft Access 2007 Introduction

Introduction to Microsoft Office Access 2010

A database is a collection of data organised in a manner that allows access, retrieval, and use of that data.

MICROSOFT ACCESS A. CREATING A DATABASE B. CREATING TABLES IN A DATABASE

Creating tables in Microsoft Access 2007

Introduction to Microsoft Access 2007

Microsoft Access Part I (Database Design Basics) ShortCourse Handout

Microsoft Access Introduction

PROJECT ON MICROSOFT ACCESS (HOME TAB AND EXTERNAL DATA TAB) SUBMITTED BY: SUBMITTED TO: NAME: ROLL NO: REGN NO: BATCH:

User Services. Intermediate Microsoft Access. Use the new Microsoft Access. Getting Help. Instructors OBJECTIVES. July 2009

Structure a Database. Key Concepts LESSON. Access 380. Lesson 2: Structure a Database. Standards

Microsoft Access 2003 Module 1

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Quick Start Guide. Microsoft Access 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

Filter by Selection button. Displays records by degree to which they match the selected record. Click to view advanced filtering options

Creating a Database using Access 2007

To determine the fields in a table decide what you need to know about the subject. Here are a few tips:

Create Mailing Labels from an Electronic File

Getting Started with Access 2007

Exploring Microsoft Office Access Chapter 2: Relational Databases and Multi-Table Queries

Course Title: Microsoft Access Basic Duration: 12 hours

ECDL. European Computer Driving Licence. Database Software BCS ITQ Level 1. Syllabus Version 1.0

MICROSOFT ACCESS 2003 TUTORIAL

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

Training Needs Analysis

Access Queries (Office 2003)

Quick Start Guide. Microsoft Access 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

Access 2010: The Navigation Pane

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

Search help. More on Office.com: images templates

MICROSOFT OFFICE ACCESS LEVEL 2

Access I Tables, Queries, Forms, Reports. Lourdes Day, Technology Specialist, FDLRS Sunrise

Access Tutorial 2: Tables

How To Understand The Basic Concepts Of A Database And Data Science

Chapter 5. Microsoft Access

Microsoft Access Glossary of Terms

Microsoft. Access HOW TO GET STARTED WITH

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

MICROSOFT OFFICE ACCESS LEVEL 1

TheEducationEdge. Export Guide

Access Tutorial 2 Building a Database and Defining Table Relationships

Learning Services IT Guide. Access 2013

What is a database? The parts of an Access database

Access NAMES Computerized Database

MICROSOFT OFFICE ACCESS NEW FEATURES

Databases and Microsoft Access II

Database File. Table. Field. Datatype. Value. Department of Computer and Mathematical Sciences

INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL


Microsoft Access 2010: Basics & Database Fundamentals

Simple Invoicing Desktop Database with MS Access c 2015 by David W. Gerbing School of Business Administration Portland State University

ECDL Module 5. REFERENCE MANUAL Databases. Microsoft Access 2003 Edition for ECDL Syllabus Four

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

TheFinancialEdge. Configuration Guide for Accounts Payable

Microsoft Access XP Session 1 Week 8

Access Tutorial 1 Creating a Database. Microsoft Office 2013 Enhanced

Microsoft Office 2007: What s New in Access

Getting Started with Access 2007

MICROSOFT OUTLOOK 2011 READ, SEARCH AND PRINT S

Access 2007 Essentials

Access II 2007 Workshop

Consider the possible problems with storing the following data in a spreadsheet:

Transcription:

Access Part 2 - Design The Database Design Process It is important to remember that creating a database is an iterative process. After the database is created and you and others begin to use it there will probably be suggestions as to how it can be changed or improved to better suit the needs of the users. Step one: Step two: Step three: Step four: Step five: Step six: Determine the purpose of your database and how the database is to be used. This process would include looking at any paper forms or reports that will serve as input or output and interviewing people that will be using the database. Using this information you can then determine the subjects you need to store facts about (the tables) and what facts you need to store about each subject (the fields in the tables). Determine the tables you need. Divide your information into separate subjects, such as classes, students, and faculty. Each subject will be a separate table. Determine the fields you need. Decide what information you want to keep in each table. Each category of information is called a field and is displayed as a column in the table. For example, one field in a faculty table could be last name; another could be rank or title. Determine which field(s) will constitute the unique identifier for each record. If the data does not contain a unique field (e.g., social security number), then Access can create an counter type field (autonumber) that will uniquely identify each record. Determine the relationships. Look at each table and decide how the data in one table is related to the data in the other tables. Add fields to tables or create new tables to clarify the relationships, as necessary. Refine your design -- analyze your design for errors. Create the tables and add a few records of sample data. See if you get the results you want. Make adjustments to the design as needed. Tips for Creating a Database 1) Store information in its smallest logical parts, for example, break down an address into as many fields as necessary, e.g., address1, address2, city, state, country, zipcode. 2) Each table should include a field or set of fields that uniquely identifies each individual record stored in the table, often a unique identification number, such as an employee ID number, course number, etc. Don't use names, because names aren't unique. If you don't have a unique identifier you can use a field that simply numbers the records consecutively (Autonumber data type). 3) Don't store derived or calculated data in your tables. You usually don't want to store the result of calculations in tables because it is easier and more efficient to have Access perform calculations when you want to see the result.

The Access Start Up Screen When Access is opened, the File tab will display with options to Open or create a New database. Open a database by selecting the Open option and navigating to the drive/folder/database file Create a New Database by selecting the New option and deciding to create: o A blank database o A database from a template Tip: a 2010 database can be opened in 2007. However, there are new tools in 2010 that WILL NOT work in 2007. Such as, Access 2010 encryption compliance, database web objects, Application published to Access Services, Data Macro, and calculated columns. Note: the database might open in 2007, but some of the tables might be in read only mode or some objects might be locked and cannot be modified. Fix??? If the end user must use 2007, then make a copy of the database in 2010 and strip out non supported 2010 features. Colorado State University Page 2

Tip: convert a database by opening it in Office 2010, choose the File tab, Save & Publish tools, select Save Database As, Access Database.accdb. Note: you will receive a warning message saying you can t save the file back Colorado State University Page 3

Creating a Table Once you have planned the design of your database on paper, the next step is to create the tables that will hold the data. Create a table by selecting the Create tab in the Ribbon, Table icon. Fields can be created in the Datasheet View or the Design View. Field Properties You can control the appearance of data, prevent incorrect entries, specify default values, and speed up searching and sorting by setting field properties in a table's Design View. For example, you can format numbers to make them easier to read, or you can set rules that data must meet to be entered in a field. Changing or Setting Field Properties: 1. Open the table in Design view. 2. In the upper portion of the Table window, click the field for which you want to set properties. 3. In the lower portion of the window, click the box for the field property you want to set. 4. Type a setting for the property or, if an arrow appears at the right side of the property box, click the arrow to choose from a list of settings for the property. Primary Key Each table should have a field that constitutes a unique identifier. This field will be the table s primary key. Advantages of assigning a primary key: -- an index is automatically created for the primary key. An index speeds up queries and other operations; -- when you view records in a form or datasheet, Access displays them in primary key order by default; -- when you add data to your table, Access doesn't allow records with the same primary key value as another existing record; -- you must specify a primary key if you want to create a default relationship between tables or if you want to update two or more related tables at the same time. Colorado State University Page 4

Field Properties: Field Names Data Type Lookup Wizard Description Field Size Format Decimal Places Input Mask Caption Each field must have a name that can be up to 64 characters (letters or numbers) including spaces. Try to assign descriptive names so you can easily identify the data contained in a field when viewing or editing records. Field names containing spaces may make tables and forms easier to read but when used in expressions, SQL statements, or Access Basic they must be surrounded by square brackets [ ]. Each field must have a data type selected that determines the type of data that can be stored in the field. Data type determines the kind of values allowed in the field; how much storage space is set aside for the values in that field, what types of operations can be performed on the values in the field, and whether you can sort or create an index for values in the field. The default data type is text. Figure 1: Access Creates a field that displays a list of 2010 Figure 2: Access 2007 values looked up from an existing table or query, or a list that displays a fixed set of values that you enter when you create the field. Descriptions can be used to help document your fields. The description for a field is displayed in the status bar of a datasheet or form when the cursor is in that field. Adjusts the size of a Text field or limits the range of allowable values in a Number field. Default field size is 50 for a text field. Maximum length for text field is 250 characters; maximum for a memo type is 64000 characters. Displays dates and numbers in a certain display format, e.g., currency. A list of formatting codes may be found by searching for Format in Access Help. Below are 3 commonly used formatting codes: < Changes all text characters in the field to lowercase > Changes all text characters in the field to uppercase @; No Data Displays No Data if nothing is entered into the field. Number of decimal places to display for a Number or Currency field. Displays formatting characters in a field so that they don't have to be entered, and ensures that data entered fits in the mask. Input masks are typically used for phone numbers, zipcodes and social security numbers. Specifies a label other than the default label (field name) for new forms and reports. If no caption is available, the field name will appear as a heading in the datasheet and on any forms or reports based on that table. Colorado State University Page 5

Default Value Validation Rule Required Automatically fills in a certain value for a field in new records you add to the table, e.g., current date. [Set the Default Value property for the field to =Date().] Limits data entered in a field to values that meet a certain requirement. Enter an expression in the Validation Rule area to limit data, e.g., >50, would assure that no numbers less than or equal to 50 could be entered. Requires that a field have something entered into it. Allow Zero Length Allows zero-length strings to be stored in a Text or Memo field. Indexed An Index speeds searches on fields that are frequently searched or sorted. Define Relationships between Tables In a relational database, information about a particular subject is stored in its own table. In order to match that information with related data stored in another table, you must define a relationship between the two tables. The definition of a relationship is: an association established between common fields (columns) in two tables. A relationship can be one-to-one, one-to-many, or manyto-many. The most common type of relationship is the one to many. In a one to many relationship a record in Table A can have more than one matching record in Table B, but a record in table B has at most one matching record in Table A. An example of this would be Orders and Employees. A single employee may have sold more than one order, but a particular customer s order was sold by only one employee. This type of relationship is created by including the primary key field from the table on the one side as an additional field (foreign key) in the table on the many side. An example of a one to one relationship would be two tables with employee information. The first table might contain general, nonconfidential information and the other the employee s personal information. For example, you might want to store general employee information such as ID, name, address and phone number in a table that all departmental personnel could access. Personal data containing salary figures, evaluation results, birthdates, etc. could be stored in another table with limited access. Usually in this type of relationship the primary key field in both tables is an identical field. A many to many relationship between tables is only possible by creating a third table (called a junction table) whose primary key consists of two fields the keys from both Tables A and B. An example of a many to many situation would be students and classes. One class has many students in it and likewise one student can have many classes. To accommodate this situation, create a junction table containing the primary key from Table A and the primary key from Table B. Other pertinent fields may also be included in this table. After you have created the junction table you will then set the relationships by creating a one to many relationship between Table A and the junction table and between Table B and the junction table. Colorado State University Page 6

After you have constructed the tables properly to accommodate relationships, then set up the relationship on the Relationship Grid. To create a relationship between two tables: 1. Click the Relationships button on the Database tab of the Ribbon 2. Drag the field that you want to relate from one table to the related field in the other table. In most cases, you drag the primary key field (which is displayed in bold text) from one table to a similar field (often with the same name) called the foreign key in the other table. 3. The Edit Relationships dialog box is displayed. Check the field names displayed in the two columns to ensure they are correct. You can change them if necessary. 4. Set the relationship options if necessary. For information about a specific item in the Edit Relationships dialog box, click the question mark button, and then click the item. 5. Click the Create button to create the relationship. When you close the Relationships window, Microsoft Access asks if you want to save the layout. Whether you save the layout or not, the relationships you create are saved in the database. Displaying Subdatasheets While viewing a table or query in datasheet view, you may choose to see related records from other tables or queries. This related data is displayed in a subdatasheet. Click the indicator to display or hide the related subdatasheet. Colorado State University Page 7