Re: Relationships. Does anyone use them?



salad wrote:
Br@dley wrote:
Yes. It sounds like you developers that responded to me spend a lot
of time in the Relationship window.

Not doing so is one task I don't think about...or want to think
about. If I have EmpId in Employees, and EmpID in table Orders, if I add
those 2 tables in the QB, a relationship line is automatically
drawn. If it does that, why do I need to add 2 tables in the
Relationship window and set relationships? What do I care if I
didn't go in into the relationships window to set the
relationship....for the most part its always done for me.

It was just explained to you:)

What you experience is an automatic join in the Access query editor.

A relationship is an enforced link between to tables.


The spaghetti relationships graphically displayed in the
Relationships window from my first app turned me off from using the
Relationship window. I guess the graphical view of relationships
is unnecessary for me. It may be a necessity for others like you.


It's a bit of an art not crossing lines (or avoiding it).

Sounds like you've never done any formal database design? (E-R
diagrams, yada yada)

Nope. 20 years of designing database applications, nothing formal
tho. Left the tux at the cleaners, picked up swim trunks and Hawaiian
shirts instead.

What does "database design" mean to you?

We may be talking apples and oranges. I'm glad I've helped you out
in the past.


If you notice in your query when you get an auto join it is just a
line? If you have relationships set correctly you will see the type
of relationship ('many to one' usually).

Yeah. I set it there in the QB, not in the relationship window. I
have no relationships in the Relationship window. My
MsysRelationships table is empty. I figure someone at MS was smart
enough to check keys in tables and set the joins in the QB if
possible. Not much else to it.

As has been said before relationships are far more important than just
making it easy to join tables when creating queries.

I've never had the problem of creating records in the many table and
not creating records in the ones table.

What do you do when data is updated/deleted? What stops data being added to
a secondary table when there is none in the parent?

It's a question of good design. Setting relationships is basic
database design.

I recommend if you are really interested in good design that you get
a book on database theory. A lot of it becomes automatic (eg. most
of us normalise our tables at least to some degree without thinking
about it). It's like maths. You may have some quirky way that seems
to work ok, but it's much better if you have a good foundation in
the basic theory. If you're going to be developing a decent size
application I'd shudder at the thought of not setting relationships
between my tables. In fact I usually spend a good amount of time
just designing my tables/relationships to make sure they will handle
the requirements. Forms/etc are just nice interfaces for users. *end
rant* :)

Why? So I can echo back Codds Rules to impress people? Yawn.

We're talking about good design, not impressions.

It's perplexing that you say you develop database applications for 20 years
yet shun Codds Rules...?

It's like a many-to-many relationship. I think I had one one once in
an application...back b4 PC database systems used SQL in the language.
I've seen no need to use one since.

Doesn't mean they are not valid/useful/etc. I have used them a number of
times (obviously implemented as three tables and one-to-many).

It appears that the Relationship window is used by quite a few. I was
curious if it was. I guess I'm missing all the fun.

For me it's not about who uses the relationship window, rather how people
design their apps. IMO start with designing the data structures
(tables/relationship/indexes) and make sure they suit the requirements (ie.
design the database). It's the basic building block on which you build the
interface/etc.

Understanding Relational Database Design
http://www.support.microsoft.com/?scid=kb;EN-US;234208

--
regards,

Bradley


.



Relevant Pages

  • Re: Relationships. Does anyone use them?
    ... If I have EmpId in Employees, and EmpID in table Orders, if I add ... Relationship window and set relationships? ... Sounds like you've never done any formal database design? ...
    (comp.databases.ms-access)
  • Re: Relationships. Does anyone use them?
    ... If I have EmpId in Employees, and EmpID in table Orders, if I add ... Sounds like you've never done any formal database design? ... 20 years of designing database applications, ... I set it there in the QB, not in the relationship window. ...
    (comp.databases.ms-access)
  • C# programmer looking for a job
    ... Software Development including Desktop, Client/Server and Database ... Practical skills in object oriented design and design patterns ... XML, Oracle, CVS, VSS, Delphi, bug tracking. ... Developed in Delphi5; ...
    (misc.immigration.usa)
  • Re: O/R Mapper
    ... | - create E/R model from niam model ... classes that contain, not only data, but also functionality as OO design is ... a database where they do not exist in the object model is corrupting the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Date range on reports
    ... > box to your report with a control source like: ... >> In the Database window (Database window: The window that appears when you ... >> In the New Form dialog box, click Design View, and click OK. ... >> Begin by clicking Macro Names to display the Macro Name column. ...
    (microsoft.public.access.reports)