Canon PowerShot A590 8.0 MP Digital Camera - Only $139.95!

HP Store search box: Computers, Electronics, Hardware

Search:

Canon Instant Rebates at Calumet Photographic! Save up to $125 instantly on select Canon Lenses and Flashes! Expires 1.17.09

   

Database Design and Implementation

By Sergey Skudaev

Introduction

In this tutorial you will learn how to design data model and implement it in MS access database. MS Access tutorial step by step explain you how to create database tables using create table script and manually. You will learn how to write sql queries to insert data into database, how to search and display data etc.

Part  I  Data Model and Database

The data in a relational database is organized in the tables. Every table has a column or field whose values uniquely identify each row. This field is called the Primary Key. A field in one table whose value matches the primary key in some other table is called a foreign key. A table may contain more than one foreign key. Together, a primary key and foreign key create a parent / child relationship between the tables. There are three types of relationships:

One to one

One to many

Many to many

 

Managers table :
 managerid
fisrtname
lastname

Employees table:
employeeid
managerid
firstname
lastname

720p High-Definition LCD TV, was $699.00 and is now $459.00 use code: AF1008

Black & Decker Bullseye Laser Level was $124.95 is now $37.95 use code: AF1008

Philips 20 Pack "AAA" Batteries was $9.99 is now $3.49 use code: AF1008

Philips 20 Pack "AA" Batteries was 9.99 is now $3.49 use code: AF1008

Philips 7" Portable Divx DVD Player with Ipod Dock was $149.99 is now $94.95 use code: AF1008

DECT 6.0 Cordless Phone Bundle with Answering Machine was $79.99 is now $37.95 use code: AF1008

6' Acoustic Research Performance Series HDMI Cable was $69.95 and is now $17.95 use code: AF1008

12' Acoustic Research Performance Series HDMI Cable was $89.95 and is now $19.95 use code: AF1008

Managers table related to employees table as one to many. One manager may have many employees. Manager id is a foreign key in the employees table. It is very important to understand in which table to place foreign key. If you place employeeid in managers table your data model implementation will be wrong because one employee will be able to have many managers, but one manager will be able to have only one employee. Let us take a look at a database that has patient table and tests table. One patient may take many different tests, one test may be taken by many different patients. The relationship is many to many. To implement many to many relationships we have to create the third table test_results that has patientid and testid as foreign key fields. The result of the test may be unique for each test and each patient that is why it is a good idea place test result not in test table, but in table that contains patientid and testid. The same is true for test date.

designing database tables

To better understand how to design a database and implement it, let us develop a Credit Card Management application in MS ACCESS  >> PART II

Please rate the tutorial

1 2 3 4 5 6 7 8 9 10



Custom Search

Good Deal...



Samsung Spinpoint HD103UJ 1 Terabyte (1 TB) SATA/300 7200RPM 32MB HDD

Samsung Spinpoint HD103UJ 1 Terabyte (1 TB) SATA/300 7200RPM 32MB HDD

Send message to your friend about to this tutorial.
Link to the page will be authomatically added to your message.
Both emails will not be stored in our database.
Your Email:
Friend Email:
Subject: