Thread: Normalization
View Single Post
  #13  
Old March 13th, 2010, 08:05 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Normalization

On Sat, 13 Mar 2010 17:30:23 GMT, "sys_analyst47 via AccessMonster.com"
u58607@uwe wrote:

John W. Vinson wrote:
Well i fix it by the way ... tell me one thing is it possible that i have a
combo box i will put assume a customer ID in it and this will fetch product
sold from another table ...if so please let me know exactly how to do tht


Yes it is possible. However you will need to help me: I do not know the
structure of your tables, and I do not know where the product sold is to be
found.

Please post a description of your tables in the form

Customers
CustomerID
LastName
FirstName
...

OtherTable
Thisfield
Thatfield
...

and indicate how the tables are related.



Customer identification - Unique no assigned to every customer
Customer name Branch
Sales officer
Product
Local purchase order date
Vendor
Vendor address
Brand
Model
Year of Make
Color
Chassis no
Engine no
Original cost
Insurance cost
Total cost Down payment
Total deferred payment
1st installment date
Last installment date
1st installment amount
Last installment amount
Place of registration
Vehicle owner name
Passport no
Debt account
Commission amount in no
Commission amount in words



Ok. So you completely ignored or dismissed the earlier advice about how to
normalize your table? That's why you're having trouble!

A customer *does not have a chassis number*.
A customer *does not have an installment date*.
A customer *does not have a commission amount*.

Or do you want to limit your database so that each customer can own one and
only one vehicle, and have one and only one insurance policy?

based on the above mentioned fields my contract is generating. Now i have
another table Named as discrepancy the reason for that table is if there is
any error in customer finance application form i will have to return that
particular application. Fields of discrepancy are as under:

Customer No (FK)
Customer Name
Product
Branch
date of discrepancy - Will be same as Local purchase order date
Discrepancy reason

Now, if i will put the Customer Number i will get the customer name, product,
branch, date of local purchase order.
Tell me what will be the control for Customer number (Combo box or text box)
& similarly what will be the control for the rest of the fields. and which
property do i need to set


It sounds like you want to COPY the customer name, product, and so on from the
(non-normalized) Customer table into the Discrepancy table.

Don't.

That's not how relational databases work! You should store customer specific
information - *once and once only* - in the Customer table, and noplace else.
The discrepancy table will have a CustomerNo to LINK it to the Customer table,
but it will not contain any other fields from that table.

You can enter data into the table by using a Form based on the Customer table,
with a Subform based on the Discrepancy table, using Customer No as the
master/child link field. On the subform you will have fields such as the date
of discrepancy, reason, resolution etc.

--

John W. Vinson [MVP]