473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Query design - conceptual question

91
Hello,

I guess this is a basic question (may sound stupid but happy to get it clarified) so I will match my original scenario and I will try to keep it simple.

I have three tables with following fields:
[Rules]
RuleID - PK
RuleName

[Process]
ProcessID - PK
RuleID - FK
ProcessName

[Risk]
RiskID - PK
ProcessID - FK
RiskName

The relationship between the tables are:
[Rules] M:M [Process] 1:M [Risk]

No direct relation between [Rules] and [Risk].

So, operationally, one rule can impact multiple processes and one process could be impacted by multiple rules.
Also, one rule could impact many risks and one risk could be impacted by many rules.

If I have to find out (using a query) all the risks impacted by a specific rule, how can I do it with the above scenario?

Probably, cannot be done. Kindly confirm/clarify.

Is it ok if I add the field [RuleID] in the [Risk] table and then in the Query criteria put something like:

[Rule].[RuleID]=[Risk].[RuleID] to get all the [RiskName] for a specific [RuleName]?

Will this work? Is this a standard approach?

OR - Do I have to add a junction table between [Rules] and [Risk]?

Also, is this a standard approach to find specific information for the scenario between a Parent table and Nth Grandchildren table?

Kindly advise.
SG
Apr 12 '12 #1
3 1184
Rabbit
12,516 Expert Mod 8TB
You should normalize your data but to get from one end to the other end, you just join rules to process and then join process to risk.
Apr 12 '12 #2
sg2808
91
Hi Rabbit,

Sorry, I am not clear. On which field do I join, on Table IDs or [RuleName]/[ProcessName]/[RiskName]?

Also, what criteria will I have to use to find the [RiskName] for a specific rule? eg, a process may have 5 Risks but say for a specific rule eg [Rule1], only one of them is linked to Rule 1. So, how will I filter out this information in the query?

Thanks for your help.
Apr 12 '12 #3
Rabbit
12,516 Expert Mod 8TB
You join on the keys. You filter for the rule id you want.
Apr 12 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: NB | last post by:
Hi Is there any way to call up the query design view from code? In my compiled-as-MDE app everything is hidden from end users. However, I want advanced user to have access to the query design...
10
by: Tom Dacon | last post by:
I'm curious to see if anyone has an opinion on this little design question - I'm doing a computational astronomy library in C#, purely for my own use, and one of the things that happens regularly...
2
by: Peter Rilling | last post by:
A design pattern question. As you know, an enumerator in .NET is broken into two interface (IEnumerable and IEnumerator). Is there a benefit in having two interfaces? Why not just have the...
0
by: RYoung | last post by:
Hello all, Say I have a Windows application that manages a Catalog of Product(s). There is no need to serialize these objects or expose them to other applications in the present or future. Any...
2
by: NowItsWhatever | last post by:
In query DESIGN view, how do I automatically "fit" the columns in the table/field grid to the lengths of the table and field names (including any functions applied to the fields). I am not talking...
6
by: RSH | last post by:
I am still trying to grasp the use of real world Objects and how to conceptualize them using a business scenerio. What I have below is an outline that I am wrestling with trying to figure out a...
12
by: RSH | last post by:
I am still trying to grasp the use of real world Objects and how to conceptualize them using a business scenerio. What I have below is an outline that I am wrestling with trying to figure out a...
2
by: Haas C | last post by:
Hey all, I created a Query (in Design View) which asks the user for an "As Of Date" which would then display relevant data. I put in the Criteria Row of the Query Design for the Date field. Is...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
0
by: Gary | last post by:
In a newly converted database (ACCDB from A97 MDB) I'm seeing the following behavior. In the query design grid (of existing or of newly created queries), after entering a criteria statement...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.