Re: Relationship Question



On Oct 31, 11:59 am, "Keith Wilby" <h...@xxxxxxxxx> wrote:
I have three tables with 1:M and M:M relationships:

tblSubSystem
ID (PK)
SubSysName (Text)

tblJoin
SSID
OPID

tblOperation
ID
OpName

A Sub-System can have many Operations and an Operation can be performed on
many Sub-Systems. This works OK. However, I have another table for
Actions:

tblAction
ID (PK)
ActionName (Text)

Each System/Operation combination can have many Actions. How do I achieve
this relationship? I have a hunch that I need to join to both fields in
tblJoin but I can't visualise it. Can anyone help?

Many thanks.
Keith.

Just a suggestion here. name your primary key fields uniquely across
tables so that in all tables a gievn field has the same name. In you
Operation table your PK should be OPID just as it is in the Join
table. It makes you code and relationships a LOT easier to read.
Perhaps its personal preference, just tthought I'd throw it out there.

More on a personal preference thing is the use of abbreviations. I
almost never use them. In your Operation table you have a field
called OpName. No harm in calling in OperationName, OperatorName,
OperatingName or whichever it is. It will make things much easier as
your databases get more complex and you start building SQL in code.
It will be even more of a help to the programmer that sits down afetr
you leave...

.



Relevant Pages

  • Relationship Question
    ... SubSysName ... A Sub-System can have many Operations and an Operation can be performed on many Sub-Systems. ... I have a hunch that I need to join to both fields in tblJoin but I can't visualise it. ...
    (comp.databases.ms-access)
  • Re: Relationship Question
    ... A Sub-System can have many Operations and an Operation can be performed on ... tblJoin but I can't visualise it. ... If each Sys/Op combination can have many Actions, ...
    (comp.databases.ms-access)
  • Re: Relationship Question
    ... A Sub-System can have many Operations and an Operation can be performed on ... tblJoin but I can't visualise it. ... ActionID FK 1-M from tblAction ... OR create a new single-field-PK for your tblJoin (autonumber) ...
    (comp.databases.ms-access)