Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One-to_one relationships

Status
Not open for further replies.

looperboy

Technical User
Dec 12, 2003
37
DE
I would like to have a seperate table for each item that is downloadable from my website. In each table would be the email address of each person who downloaded that item. Can I then create a one to one relationship between the tables, and design a query to find out which email addresses appear, say, in tables #1,#3 and #5? And if so, what would the query be?

Stuart
 
That's not really a good idea, it's not really feasible to search different tables for the same information.

What are you trying to do with this database? Also, you will want to review this article on database design before getting much further into your project:


(thanks JeremyNYC!)

Leslie
 
Hi,

The way to do it is:

create a single table called tblUsers:
[tt]
tblUsers
pk (autonumber)
email (text)
item

item would be the key to your 'downloadable' items table.

You would have to have a 'downloadable' table containing a list of all of your items.

e.g.

tblItems tblUsers
pk <---| pk
desc | email
|--->> Item_fk
[/tt]
(tblItems.pk is copied to tblUsers.Item_fk).
This way, you are not duplicating identical tables.

Regards,

Darrylle

&quot;Never argue with an idiot, he'll bring you down to his level - then beat you with experience.&quot; darrylles@totalise.co.uk
 
thanks for your reply.

The reason for trying this was because I currently have a one-table database, with fields for Email adress, Name, and then a field for each product I have for download. Each time someone returns and downloads another product I find their record and tick that file's field. But it is very time consuming. My webiste forms are set to send me an email for each download, but I am trying to change it so's the downloads are either sent to text files which I can import into access, or so's the results are sent straight to the database. That is why I thought the easiest way would be if the results of the form (Name and Email) just went into a table for that product.

IS there a simple way I am overlooking?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top