Solved

hierarchical relation in access

Posted on 2013-10-28
2
250 Views
Last Modified: 2013-10-29
Hey Everyone!

I am trying to create a hierarchical relation in access.
I creating a desktop database application for an Automobile Repair Shop. In that I have created an entity ServiceID which is the parent Entity. Further this entity will have children such as Repair, Maintenance and BuySell.

I have attached a snapshot of the ERD.

How should I implement this in my application?

Any suggestions?

Thank you!
DB1.jpg
0
Comment
Question by:varshneyprateek
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39608244
First: Your Repair, Maintenance and BuySell tables should NOT use the ServiceID as their Primary Key. That should be the Foreign Key field, and you should create another field for those tables' Primary Key.

If a single Services record can contain more than one of those downstream entities (or can contain multiples of a single downstream entity) then you'll need to create a Many-to-Many "bridge" table. This would be a table that stores (a) the Services.ServiceID value and (b) the PK value from the second table. So if you add a new field to the Repair table named RepairID, you'd store the value of that field in the bridge table along with the ServiceID of the parent record.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 39609157
See my sample database illustrating many-to-many relationships:

http://www.helenfeddema.com/Files/accarch178.zip

and here is an image of one of its forms:

Many-to-many relationships form
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now