Microsoft Access
  Home arrow Microsoft Access arrow Page 3 - Getting to Know MS Access 2003, Part 2
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MICROSOFT ACCESS

Getting to Know MS Access 2003, Part 2
By: Sage Adams
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 20
    2004-11-01

    Table of Contents:
  • Getting to Know MS Access 2003, Part 2
  • Data Distribution
  • Relationships
  • Designing Your First Database
  • Creating Your First Database

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Getting to Know MS Access 2003, Part 2 - Relationships


    (Page 3 of 5 )

    Tables can be related to each other in any one of the three ways: one-to-one, one-to-many, and many-to-many. The type of relationship you use depends on the quantity of records in each of the tables that is going to have the same value. Let’s look at relationships in more detail.

    When you relate tables, at least one of the tables must have a unique value for every record. This value should uniquely identify that record. This unique value is generally called a primary key, but it also may be some other unique index with no duplicate values. Moreover it can be a combination of fields that make a unique value for each record, such as a person’s first, middle, and last name, and their city of residence combined.

    You will almost always use one-to-many relationships, however. A one-to-many relationship basically says that records in the parent table will have multiple matching records in the child table or none at all. The field, in the child table, that references the parent table is defined as the foreign key of the child table. This key uniquely identifies the record that is referred to in the parent table.

    Getting to know MS Access 2003

    In the above image you can see multiple one-to-many relationships in effect. These are represented by lines with 1’s at one end and ‘infinity’ symbols at the other. The 1 side represents the parent table, while the ‘infinity’ side represents the child table in a particular relationship. I’ll show you how to create relationships in a later lesson.

    Referential Integrity

    Referential integrity is an optional rule in Access. It guarantees your table relationships are legitimate, and the database will remain functional as you manipulate it. Here are some of the rules of referential integrity:

    • There can be no child tables without a parent table

    • A parent table cannot be deleted if child tables exist

    • A child record cannot be changed so that its foreign key doesn’t have a valid match in a parent table

    • The primary key of the parent table cannot be changed if it is referenced by children tables

    It’s a good idea to enforce these rules and I’ll show you how to set referential integrity later on.

    Database Objects

    Because Access is an object-oriented database, it’s composed entirely of objects. Each of these objects, such as tables or forms, has properties that allow you to manipulate their look and feel. Moreover, each Access object holds other objects, which in turn have other properties. For example, tables are composed of fields (objects), with properties such as size and format.

    More Microsoft Access Articles
    More By Sage Adams


     

    MICROSOFT ACCESS ARTICLES

    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access
    - Configuring a Linked Microsoft Access Server...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT