Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

hierarchical relation in access

Posted on 2013-10-28
2
Medium Priority
?
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1500 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

610 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