Microsoft Access - Introduction Database Design Guidelines- Chapter 1

download Microsoft Access   - Introduction Database Design Guidelines- Chapter 1

of 17

Transcript of Microsoft Access - Introduction Database Design Guidelines- Chapter 1

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    1/17

    Preface

    Notes on : DATABASE Design Guidelines and Concepts UsingMS Access

    From the author.These notes [free of charge] have been placed on the Internet to assist anyone wishing to use Microsoft Access at theintroductory and intermediate level. They have, however, been specifically prepared for students taking I.S. (InformationSystems MGCR-331, a first year course at McGill University in the Faculty of Management as well as at the Centre forContinuing Education, as well as for a number of practical, hands on, courses on Access.

    The notes specifically refer to Access, version 2000. However for those with an earlier version, such as the Office 97,Version 7 and 2, these notes should be just as applicable. It is assumed when a newer version of Access is introduced,these notes will be just as applicable.

    The notes are continually being updated with improvements and or corrections. If you find that you wish to contribute tothe content with suggestions for improvements and or corrections, please contact the author below. Again, yourcomments and suggestions are most welcome!

    Date Created: February 1996 Date last modified: May 29, 2006

    Author: Leo Kerklaan - McGill University - Montreal - PQ - CanadaE-mail address: [email protected]

    No part of this work may be reproduced or used in any form or by any means - graphic, electronic, or mechanical, includingphotocopying, recording, taping, or information storage and retrieval systems without the written permission of the author unless theabove is performed exclusively for use in our I.S. courses at McGill or those seminars and courses given by the author.

    Notes such as these are under constant review, as such, they may contain any numberof spelling errors and or other minor grammatical problems. Your understanding isappreciated. Please bring any corrections and or suggestions to my attention! Thank

    you!

    Notes on: Database concepts and how to use Access. Page 1 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    2/17

    Table of content

    Table of content : Notes on : Database Concepts and Access

    Chapter Topic Page No.1 Introduction to database concepts 3

    2 Tables and Database 5

    Creating a new database and table 5

    Opening an existing database and table 5 Table structure and properties 6

    Create, Delete and Change a Primary Key 8

    Viewing the contents of a table 8

    Printing the content of a table 10

    3 Relationships in Access 11

    Establish a relationship 12

    Modify, delete and remove a relationship 13

    View and print a relationship 13

    Short cut keys 13

    4 Querying a table 15

    Bringing up the query screen and types of queries 15

    Creating a simple, single table query 16

    Sorting the data to be displayed 17

    Creating a complex query (and / or, IN, between, Like) 17

    Calculated field 19

    Group by query (includes WHERE clause) 20

    Update query 22

    User prompt - parameter query 23

    Crosstab query 245 Reports 26

    Overview 26

    Report layouts supported by the Wizard 26

    Understanding report layout 26

    Creating a report with the Wizard 27

    Sample Preview 29

    Print Preview 29

    Print and printer setup 29

    Saving a report 30 Text box controls - Bound and unbound 30

    Moving, sizing, copying, and deleting fields 30

    Adding new fields to a report 31

    Adding text to a report 31

    Sorting and grouping in a report 31

    Other interesting things you can do in a report 32

    6 Forms 33

    Notes on: Database concepts and how to use Access. Page 2 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    3/17

    Table of content

    Background, how to create, table lookup and multi table 33 to 37

    7 Expressions, and Functions 38

    Notes on: Database concepts and how to use Access. Page 3 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    4/17

    0Chapter 1 - Database Design and Guidelines

    1

    Database Design GuidelinesThe most common DBMS approach in use today is the relational database model. For a database to be effective, it isabsolutely imperative that it be carefully and efficiently designed. The relational database approach presents entities astwo-dimensional tables, with records as rows and fields as columns. Tables can be joined (relationships between tables)where there are common columns in tables. A good design should eliminate unnecessary data duplication (redundancy).

    For example, it is more than likely that it makes no sense to have someones home address in more than one table. On theother hand, a field like employee number is more than likely to be found in more than one table, enabling the DBMS toestablish a relationship between the tables on this common field. The relational DBMS supports one-to-one, one-to-manyand many-to-many relationships between entities. An entity is something you collect data about, such as people, places orthings. Often an entity is thought of as a table, where a table has many rows/records with many individual fieldsrepresenting individual pieces of information. Thus a record is collection of related fields within a single entity.

    In order to establish relationships between tables, the common field found in each of the tables is identified as either aprimary key or a foreign key. The student number, in our earlier example, is more than likely the primary key in thestudent table and the foreign key the enrolment table (courses assigned to each student).

    A primary key is a column/field whose value uniquely identifies a row/record in a table. That is, you cannot have

    duplicates of any value (e.g. only one occurrence of a given student number). A primary key must never be a nullvalue (i.e. does not exist). A table need not have a primary but it is recommended to have one. As well, a primarykey may consist of more than one column/field, as long as the group of fields uniquely identifies a record in the table.The latter is called a combination primary key.

    A foreign key is a column/field whose value must match a primary key in another table. In fact, if referentialintegrity is enforced, the DBMS will ensure that no foreign key exists without a corresponding primary key. Atable may have more than one foreign key, however, it need have a foreign key.

    In Access, the person creating the database structure establishes the relationship between two tables.

    The following are the rules for expressing associations among entities and their corresponding data structures.

    One-to-One One record in the primary key table may have only one matching foreign key value. Note:There need not be a matching foreign key record.E.g. some employees may be assigned to a single company car.As such, a given car is only assigned to one employee.

    Additional Example: A given employee may use a single personal computer or none at all. Said another way, agiven personal computer is used by only one employee and always the same employee (at least as far as the databaseis concerned). The relationship is 1:1.

    One-to-Many One record in the primary key table may have any number of matching foreign key records.Note: There need not be a matching foreign key record.E.g. an employee may have any number of skills, each identified and stored in an employeeskills table (e.g. Lotus, Excel, Access, Pascal etc.).As such, many employees can hold a given skill.

    Additional example:A given employee, may use one or more personal computers or the employee may not use any at all. Alternatively, noemployee or only one employee can use a given personal computer. The relationship is 1:M.

    Many-to-Many Two tables are linked, however, neither column represents a primary key.Note: This does not work very well in Access.Note: There need not be matching value records between tables.

    Notes on: Database concepts and how to use Access. Page 4 10/18/2013

    Employee USES Personal Computer1 M

    Employee USES Personal Computer1 1

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    5/17

    0Chapter 1 - Database Design and Guidelines

    1e.g. A given player may participate in many games and each game has many players.

    Additional example:A given employee can use no computer or any number of computers or:No employees or any number of employees can use a given computer.The relationship is M:M.

    In addition to assigning primary and foreign keys, each field in the database needs to be defined in terms of a field name,field description, data type (e.g. numeric, text etc.) and properties. The properties for a field may include a variety ofthings such as rules about the value, the formatting and other display characteristics and indexing.

    Steps to follow for a well-designed database.

    The key to a good design is to fully understand the problem to be solved. To design an efficient database model, oneshould go through the following key steps on a piece of paper.

    List the objects where an object is a single theme or subject about which you would like to track information.E.g. Employees, Departments and Hours worked.

    List the facts about the objects where a fact is a single piece of information about an object.e.g. The employee table may have the following facts: Employee Last, First and Middle name, Date of birth,social insurance number, home address split into street, city, province/state, postal code and country.

    Turn the objects and facts into tables and columns. Objects become tables and facts become columns.Employees and Departments are example of objects. Each table in turn is made up of one or more columnswhere a column is a specific fact. In other words the facts are individual pieces of information about a givenobject or table.

    Determine the relationships among objects. Look at the objects and determine how they might be related. Forexample the employee table contains information about employees, whereas the Hours worked table contains thehours worked pertaining to your employees. These two tables are related on the piece of information thatidentifies the employee.

    Determine key columns. Keys can be either primary or foreign. A Primary key in a given table uniquely

    identifies each value, whereas a Foreign key can have many occurrences of a given value.In establishing a primary key one may identify any number ofCandidate keys. These are columns or groups ofcolumns that meet the requirements to be a primary key. Composite keys or Concatenated keys are those thatcombine any number of columns in a given table to meet the uniqueness required of the primary key.

    Determine linking columns. The best linking columns, sometimes referred as common columns, are those thatpoint to a unique row of date e.g. a given employee number identifying a unique individual in the base table to amatching employee number in a relation table where many occurrences of a given value can occur, like the hoursworked table.

    Determine relationship constraints. This is sometimes referred to as referential integrity where one can set uprules that you cannot enter information in the foreign table without the primary key table having a matchingvalue. In other words, you must set up a value in the parent table before a matching value can be added to thechild table.

    Evaluate your design. One can ask the following questions:Does each table have a single theme? It should and furthermore each column should be a fact about the object.Does each table have at least one key column? It should.Is the table easy to add data to and retrieve data from? It should be.Are the columns unique to a table? They should be unless they are linking columns between tables.

    In addition, for each fact: Determine data type and size and all the properties such as rules, formatting defaults etc. Assign a meaningful name that is neither too long nor unwieldy but at the same time representative of what it is

    trying to describe. Spaces can be left between the words in a field name.e.g. social insurance number. Although this is meaningful it is probably too long, try: SIN

    Notes on: Database concepts and how to use Access. Page 5 10/18/2013

    Employee USES Personal ComputerM M

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    6/17

    0Chapter 1 - Database Design and Guidelines

    1

    Additionally for a design to be successful, one must also determine how the database will be used and by whom byconsidering the following.

    Establish the types of updates and transactions that create and modify the data keeping referential integrity inmind.

    Determine which fields should have indexes. Suggestion: Always index key fields and those fields that aresorted.

    Decide on who can access and or modify the data and if required set up a security matrix. Document your design process. Establish backup procedures and off site storage. Develop a contingency plan

    that will cover any potential disaster.

    Functional dependencies and design anomaly.

    Most anomalies are caused by poor relational database design. In fact, the poor design is tied directly to the relationshipsthat you have incorporated into your database between attributes. These relationships are known as functionaldependencies. A functional dependency is defined as follows:

    Attribute (field) B is functionally dependent on field A , if for each unique value of field A, there exists onlyone value of field B in the relationship at any one time.When time permits, more on this conceptually difficult topic will be added.

    Data modeling.

    Tools are available for designing and then automatically creating the structure of a relational database. Often these usegraphic techniques to assist with the E-R diagrams (Entity Relationship). As the theory behind a relational database isfounded in a branch of mathematics called set theory. This was expanded upon to include relational algebra. There is aformal process called Normalization that helps determine which data attributes are grouped into tables, which in turnmake up a database. The key here is to:

    Eliminate duplicate tables in tables. Accommodate future changes in tables Minimize the impact on user applications when the database structure is changed.

    The scope of this and other technical topics is beyond these notes. A good relational database design book should proveinvaluable in this area. It should be software independent.

    Notes on: Database concepts and how to use Access. Page 6 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    7/17

    Chapter 2 - Using a Database and Tables

    Creating and Opening, Viewing, Updating and Printing a Table Using MSAccess

    Loading Access.

    From the screen below, either create a new blank Access database or open an existing database file.

    Note: You may also use the File Open or File new command to accomplish the same. Access needs the drive, folder anddatabase name to continue. See below.

    Once you have selected the drive, folder and database name, click on Create icon.

    Notes on: Database concepts and how to use Access. Page 7 10/18/2013

    Drive and folder selection

    Database name.Note: The default isdb? And the extensionis always mdb

    Use these icons to speed upthe location selection!

    Examine the power ofthese icons!

    When done clickCreate

    Used to create a new database container

    Used to open an existing databasecontainer.

    Select the file from the list below or if noneis selected turn, on the next panel, select the

    drive, folder and database file that has to beopened.

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    8/17

    Chapter 2 - Using a Database and Tables

    yThe following screen is presented.The Objects area indicates you are active in Tables section. To go elsewhere click on the required Object name such asQueries.

    As this was a new database, no existing tbales, queries, Reports and Forms will appear. Each item will have to be created.

    From this panel you would normally

    Create a new table design Modify an existing table design Open an existing table and display its content.

    Creating a new Table structure.You can create a table using the Access Wizard or on your own. The Wizard is a tool that helps you create structuresfrom pre-defined commonly used objects. Experiment with the Wizard if you wish, however, these notes will assistwith creating a table without the use of the Wizard.

    By selecting the New Table icon, Access will bring up the following screen. Each row in the Table dialog represents anew field in the table. Each field needs to be further identified as to Field Name, Type, Description, Size, Format,Decimal places, Caption, Index, etc.. This is all explained on the pages that follow.

    Notes on: Database concepts and how to use Access. Page 8 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    9/17

    Chapter 2 - Using a Database and Tables

    Information on the screen above.

    Field Name. Choose as descriptive a name as possible, but a good guide is to keep the name short if the field is of

    short length, as the field name by default becomes the column title in a Query, Form and or Report. Up to 64characters long, made up of letters, numbers, spaces and most special symbols except a period, exclamation mark andsquare brackets. The field name must not start with a space.

    Data Type. This determines what can be entered into a field. The ten data types supported are:

    Text (up to 255 characters).

    Number (digits, + , - and .). Supports whole numbers e.g. 256 and very large and small numbers with up to 28

    decimal places.

    Currency (stores accurate values with cents) and assigns the currency symbol ($).

    Date/time in MM/DD/YY (Month/Day/Year) format performs accurate date and time arithmetic.

    Memo Data is much like text, however it is used for long comments (64,000 characters long).

    Autonumber consists of a number (no decimals) that is automatically incremented by 1 in Access. This canguarantee uniqueness, for you cannot edit this field. As far as I can tell it can only start at 1 and is alwaysincremented by 1. However a variation exists where one can specify that the autonumber is a random number inthe - 2 billion to plus 2 billion number range (long integer type).

    Yes/No Limits the values stored to Yes or No.

    OLE object data allows fields created in other software (e.g. pictures, drawings, voice messages etc.) to be

    stored, but not modified in Access.

    Two additional, rather complex but very powerful data types are possible. They are:

    Hyperlink (The following was copied from Access help Function key F1).

    Text or combinations of text and numbers stored as text and used as ahyperlink address. A hyperlink address can have up to three parts:

    text to displaythe text that appears in a field orcontrol.

    address the path to a file (UNC path) or page (URL).

    subaddress a location within the file or page.

    screentip the text displayed as a tooltip.

    The easiest way to insert a hyperlink address in a fieldor control is to click Hyperlinkon the Insert menu.

    For more information, see Type a hyperlink address inForm view or Datasheet view.

    Each part of the three parts of aHyperlink data type can contain up to2048 characters

    Lookup wizard (The following was copied from Access)

    LookupWizard

    Creates a field that allows you to choose a value from another table orfrom a list of values by using a list box or combo box. Clicking thisoption starts the Lookup Wizard, which creates a Lookup field. Afteryou complete the wizard, Microsoft Access sets the data type based onthe values selected in the wizard.

    The same size as the primarykey field used to perform thelookup, typically 4 bytes

    Field Description. This is an optional field that can be up to 255 characters long. Use this to document your table

    structure.

    Field Size. Assigns maximum field length, but is only used for Text and Number fields. However you really onlyneed to concern yourself with length for Text fields. For number fields: If a whole number like social insurancenumber, use Long Integer. For a value that has decimal places use Double. For more information turn to Data typesand Field sizes under Access help.

    Notes on: Database concepts and how to use Access. Page 9 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    10/17

    Chapter 2 - Using a Database and Tables

    Format. Enables you to specify how the data is to be displayed and or printed e.g. Currency - 2 decimal places, Shortor Long Date format.

    Input Mask. Specifies how the data is be entered over a mask.Examples: (000)-000-0000. A letter or digit entry required. C any character or space, but nothing else.

    Caption. Label that will be used as column heading in a query and or report instead of the field name.

    Default value. Access will automatically insert whatever is specified. e.g. todays date (=Date()).

    Validation Rule. Data must meet the limitations as per specified rules. e.g. Value must not be less than $6.00.More examples follow.

    Validation Text. The message that will be displayed if validation rule is violated.

    Required. If yes then user must enter a value, i.e. field cannot be left blank.

    Allow zero length. If allowed, text with no length e.g. is permitted.

    Indexed. Maintains an index on all the values of this field to speed up searches and links.

    A good rule of thumb as to whether or not to assign an index is:

    It must be assigned to all primary key and linked fields in a relationship.

    If one does frequent searches and or sorts on this field.

    Note: If you index a field, you will be prompted as to whether or not duplicate keys are allowed. If noduplicate values are permitted then the field can be assigned a primary key.

    Additional field property notes.

    Acceptable data entry formats are: 5/14/94, 5/14/1994, May 14, 1994, May 4, 1994, May 14. Note: 5/14/00 isassumed to be May 14, 2000. Time is entered as 16:00:00 or 16:00. All dates and times can be formatted(displayed) with a number of short and long date and time formats.

    Validation rules examples: 0 ; 10 OR 900 ; Like Montr??? ; Next >| Last record

    Scroll up and down the table. If the table has enough rows, you can utilize the scroll bars to the right to move upand down.

    Notes on: Database concepts and how to use Access. Page 10 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    11/17

    Chapter 2 - Using a Database and Tables

    Add a New Record. Use the >* icon to add a new record to the table. You can also use menu Records - Go To -New.

    Delete a Record. There are numerous ways of deleting a record. Note: The record is not physically deleted, butflagged as having been deleted. The methods to delete are: First select the entire record (click leftmost column).Use the Cut icon From the menu select Edit - Delete Hit the Del keyUsing the right mouse button, select Cut.

    Maximize and minimize the size of your view display. Use bottom at the top right of the screen.

    Find or Replace information. To find a record use the binoculars icon which presents the Find dialog (see below)

    and complete the required information. This presents one record at a time. Note: The same thing can also use theEdit - Find to do the same.To Replace data, use the or Edit - Replace menu and follow the instructions. This can replace a single data field orall matching values in the table. Note: This can also be done in an Update Query (See Query chapter).

    Sort your table. Use the sort icons to rearrange the display order based on the column that you have selected. Thereis an icon to sort in ascending order (A:Z) and one for descending order (Z:A).To sort on multiple columns do the following. Under the Records menu, you will find a Quick Sort option.Complete the dialog to let you to sort on multiple columns.Note: The underlying order (physical order) of your table is not changed with a sort. The sort only changes the orderof how the data is displayed.

    Filter the table to only show selected records. Use the Edit/Filter icon. This will bring up a query dialog. This

    dialog is completed similarly to what is explained in the query sections of these notes. Size the column width on the view datasheet. Position the mouse pointer on the heading row , on the right side of

    the desired column. Hold the left mouse button to expand or reduce the width. Let go when done. When you closethe view you will prompted to save this display format for future use.

    Misc. options. Explore the Format menu to hide, freeze and apply font and height to the view. Under the records

    option, you can prevent the user from changing the information in the table. Select Records -Allow editing.

    Move a column to a new locations on the datasheet view. This cannot be done here. To do this you must create a

    query and within the QBE dialog, move the columns around. See explanations in the query window.

    Example of a Find Dialog window.

    Notes on: Database concepts and how to use Access. Page 11 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    12/17

    Chapter 2 - Using a Database and Tables

    Printing the contents of a TableWith the tools described above, once you are satisfied that the data is displayed the way you wish to see it, you can thenprint the table. But first, to save paper, in case something goes wrong, you may wish to preview your printed output.

    Print Preview Click the Print preview icon (see screen above) Use this to Zoom in on the display, browse through it,

    set up the print display and print. Close the window when done.

    Hard copy Print out. You can print from within the Print Preview window or click directly on the Print button or

    from the File menu select Print. Note: You may want to do a Setup before printing. This will enable you to setmargins and select the paper size and orientation. Page setup can be activated only after you have opened the table.The set up will be remembered.

    Print icon. Clicking on the print icon will immediately print the table according to the default or latest settings.

    Notes on: Database concepts and how to use Access. Page 12 10/18/2013

    More Options havebeen selected. Thisdisplays:

    Replace dialog would let you find andreplace all or some of the data.

    Find icon

    Sort icons

    Filter icons

    Design icon. Takesyou to the tablestructure

    Print & Print preview

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    13/17

    0Chapter 3 - Relationships in Access

    1

    RELATIONSHIPS in ACCESS - Create, Modify, Delete and RemoveOnce you have created the necessary tables, the following are the steps to either create or update the relationship. Theupdating of the relationship would be used when you create a new table and or modify the structure of an existing tableand or make changes to the referential integrity rules.

    Note: To set up a relationship between tables, the common field between the tables must have the samedata type. As well the tables must belong to the same Access database.

    Click on the Relationship button or from the main menu select Edit - Relationship.

    From the Add Table dialog, Add each of the tables (be sure not to duplicate any tables).

    Click the Close button on the Add Table dialog.

    See Add Table Dialog below. This dialog is super imposed (this was manually placed this way for your benefit) on arelationship diagram (with 1 table address thus far). These two picture in turn are combined with the Database window. -Table option.

    Add Table Dialog under the Relationship dialog.

    Notes on: Database concepts and how to use Access. Page 13 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    14/17

    0Chapter 3 - Relationships in Access

    1

    How to form a relationship between the tables.

    Drag the common field from the table with the primary key to the common foreign key field in the other table. Once yourelease the mouse button, Access displays the Relationship dialog box shown below. In the example below, you havealready established a one to many relationship on Number between the primary table Employee Master and the foreigntable Hours Worked. In the dialog below you are establishing the following one to many relationship. The field Dept in

    the dept table (primary table key) is related to Dept in the Employee Master table (foreign table key).

    As well you have indicated (click check box) that you wish to enforce referential integrity. That means you cannot createan employee with a Dept that does not exist in the Dept table. Furthermore, you can check off the following two boxes:Cascade Update related fields and Cascade Delete related fields. These two check boxes, if on, will ensure that Accesswill ripple changes that are made in the primary table to the foreign table. For example, changing the Dept number forthe Paint Shop from 10 to 11 in the Dept table will automatically mean that all Dept numbers of 10 in the EmployeeMaster table will become 11.

    Establish the necessary relationships between all the tables. That is, no table should be left hanging without a relationshipto another table. When done, click the Create button.

    To close the relationship window, double click the Relationship Control box and specify that you wish to Save the changeswith a Yes response.

    Notes on: Database concepts and how to use Access. Page 14 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    15/17

    0Chapter 3 - Relationships in Access

    1

    How to Modify, Delete and Remove a Relationship.

    To modify a relationship. Click the relationship icon, or from the Edit menu choose Relationship. Double click

    the line that you wish to edit. This brings up the relationship dialog. Make the required changes and when done,confirm with Yes to any confirmation prompts. When done, close the relationship dialog.

    To delete a relationship. From the Edit menu choose Relationship. Single click the relationship line that you

    wish to delete. From the Edit menu choose Delete or press the Del key. Confirm any confirmation prompts withYes. When done, close the relationship diagram.

    To remove a table from the relationship. Click on the table you wish to remove. From the Relationship menu ,

    choose Remove Table or press the Del key. Please note that this deletion only affects the Display of therelationships. The tables is not deleted. As well, the Database still maintains the relationship even if it is notdisplayed.

    To permanently remove the table and all its relationships from the relationship window. This may benecessary if you accidentally added a given table more than once. This two step operation requires that you firstdelete all relationships to this table (see above how it is done). Once the relationship is removed then remove theunwanted table from the relationship (see above). Be sure to save. You may even wish to exit the database andre-enter and make sure the unwanted table is gone.

    To View and Print an Existing Relationship.

    To view an existing relationship for a table or query. From the edit menu choose Relationship. To view all the

    relationships in the database, choose Show All from the Relationship window (or click the Show All relationshipbutton on the toolbar.To view the relationship of a particular table select the table first then perform the steps described earlier.The Show Direct command adds all tables and queries that have a direct relationship with the selected table or query.

    To print a relationship diagram. From the menu select File and Print Definition. Access takes a few seconds tocompile all the relationships and displays everything about the relationship on the screen. This information can thenbe printed. See sample relationship page is displayed on the next page.You can always use PrtScr to capture the screen image to the clipboard and then Paste it back into any software thatsupports the Edit Paste command (e.g. WORD, PC PAINT, ECXCEL etc.). Then use the software to print therelationship diagram.

    Short cut keys

    Instead of using the menu or the icons, Access supports short keys. To see if a short cut key exists, select the object (e.g.table or relationship line) and click the right mouse button. Select the option of your choice.

    Notes on: Database concepts and how to use Access. Page 15 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    16/17

    0Chapter 3 - Relationships in Access

    1Sample output from a relationship diagram print out. Use File - Print definition.

    Notes on: Database concepts and how to use Access. Page 16 10/18/2013

  • 7/27/2019 Microsoft Access - Introduction Database Design Guidelines- Chapter 1

    17/17

    Chapter 7 - Expressions and Functions

    Notes on: Database concepts and how to use Access. Page 17 10/18/2013