Multiple Table that Link (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Bnugent -> Multiple Table that Link (3/7/2001 14:35:00)

Where can I find information on how to link multiple tables within a database. For example, Currently all of my information is stored in one table within a databse. Everything from Contact Info, Account Info, Payment Info, Activity History is stored in a huge table. It works because their is only about 600 clients. I would like to have a table for contact a table for account info, etc.... How do I create this so that all tables will be relating off each other. I asume that I will need to use the Unique ID (that is already set up in my main table as the common link but how do I relate them to my other tables. Bye the way I use Access 2000. Thanks

------------------
Brian---





Spooky -> RE: Multiple Table that Link (3/7/2001 20:28:00)

I dont really have any Access books I can recommend for that.
Perhaps someone else has a recommendation?
Theres a little too much to be able to discuss here!

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!





Bnugent -> RE: Multiple Table that Link (3/7/2001 20:50:00)

Ok. Lets say for sake of example that I had two tables in my database. One was called Name.mdb The other address.mdb

Lets assume that the name.mdb had the following fields- ID (Random Unique), First, Last

Now how could I set it up so that when I entered a record in name.mdb it automatically created a record in the address.mdb table. I am trying to make this as simple as possible so I can grasp it and run with it

------------------
Brian---





Bnugent -> RE: Multiple Table that Link (3/8/2001 14:29:00)

Is the relationship built in acess or in my SQL statements or both?

------------------
Brian---





hzarabet -> RE: Multiple Table that Link (3/8/2001 16:23:00)

I "think" I understand your question. Two tables must be "linked" by a common thread. For example, if name.mdb and address.mdb both had a field called "name" and the clients name (must be unique) was found in BOTH tables, both tables will link. So now, if "Tom Webmaster" has five addresses, the name table will link with all five records found in the address table and 5 results will show up. I hope I answered what I thought was your question.

I used a very "readable" SAMS "Access in 21 days" to learn Access. It DOESN'T get into great detail about things like converting numbers, etc., but it definitely gives you a good basic understanding of Access. It worked for me.

------------------
www.Signingshotline.com lists EVERY upcoming athlete autograph appearance in the US and Canada





Bnugent -> RE: Multiple Table that Link (3/8/2001 17:10:00)

Does anyone have a sample database that contains linked tables or relationships that they could email me as I would like to get my hands involved.

------------------
Brian---





Vince from Spain -> RE: Multiple Table that Link (3/8/2001 18:23:00)

Hi Brian,
firstly, this whole process of taking a big fat table and breaking it down is called Normalization. As it happens I just posted this url on another thread. Here is the url again
http://support.microsoft.com/support/kb/articles/Q100/1/39.asp

It's pretty good reading for anyone involved in this stuff.

When you talk about names.mdb and address.mdb, are you talking about seperate databases, not seperate tables?

Anyway, that aside, I would recommend reading through the above article first as it gives good examples of why to split tables (and why not, as it is not always a good idea), and also how to use the primary and foreign keys to go about this which you are already getting the idea about.

All the best

Vince

------------------
Internet Business Solutions S.L.(Spain)





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
9.423828E-02