Solved

hierarchical relation in access

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

705 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