Solved

hierarchical relation in access

Posted on 2013-10-28
2
249 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 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

12 Experts available now in Live!

Get 1:1 Help Now