Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
MS Access DB: Relationships Question, Help Needed
Old 06-18-2008, 09:32 AM MS Access DB: Relationships Question, Help Needed
Junior Talker

Posts: 1
Name: Georgi Paskalev
Trades: 0
Hello guys, I'm new at this forum and I really like it, I like how nice you guys are and how u always help

I have a stupid question about MC Access Relationships, but I'm new at this and can't figure it out by myself..

My DB is about pcs and the software on those pc's. I made 3 tables: Persons, PC's, Software. It's very easy to connect Persons to PC's by using the field pc (users to the pc they use).

But I can't figure it out, how to arrange the PCs table and the Software table.

I have 40 PCs and 30 Softwares. Each PC has at least 3-4 programms on it. I tried to do 30 fields (each field is one software) in the PC table (type YES-NO) so that I can mark which pc has which software on.

But then in the Software table I must add every software as a record in the table, in the field SOFTWARE, so that I can add some details like price, date of installation and more...

Can somebody help me? Thanks in advance...

I hope you understand my bad english and my explanations!

One more time - thanks in advance!
gfanmusic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-18-2008, 12:30 PM Re: MS Access DB: Relationships Question, Help Needed
nyef's Avatar
Ultra Talker

Posts: 265
Name: Lucas
Trades: 0
Since PCs to software is a many to many relationship (one PC can have multiple software on it, and one piece of software can be installed on multiple PCs),

The best way to handle this relationship is to use a mapping table. Create a separate table called "softwareinstalls" or something, and give it these fields:

pcid [int]
softwareid [int]

Then create a row for each software installation. When you need to look up what software is on a particular computer, you SELECT softwareid from softwareinstalls where pcid=. When you need to look up what computers a particular software is installed on, you SELECT pcid from softwareinstalls where softwareid=.
__________________
~nyef

Please login or register to view this content. Registration is FREE
nyef is offline
Reply With Quote
View Public Profile Visit nyef's homepage!
 
Old 06-18-2008, 02:46 PM Re: MS Access DB: Relationships Question, Help Needed
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Any doubt should be evaporated for our long term readers, but Nyef's answer to this question is exactly correct.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to MS Access DB: Relationships Question, Help Needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13211 seconds with 12 queries