Path: news.netfront.net!news.glorb.com!postnews.google.com!j20g2000hsi.googlegroups.com!not-for-mail
From: raylopez99 <raylopez99@yahoo.com>
Newsgroups: comp.databases.theory
Subject: Re: A philosophical newbie issue: catch redundant errors via 
 relationships or programmically?
Date: Sun, 30 Dec 2007 09:09:08 -0800 (PST)
Organization: http://groups.google.com
Lines: 58
Message-ID: <788634eb-c652-4a03-bddd-17e4e409aeb8@j20g2000hsi.googlegroups.com>
References: <dabe9ee9-bae3-4ce2-9b3f-9f76e963f596@p69g2000hsa.googlegroups.com> 
 <4777bab3$0$85789$e4fe514c@news.xs4all.nl>
NNTP-Posting-Host: 62.103.190.188
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1199034548 20024 127.0.0.1 (30 Dec 2007 17:09:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 30 Dec 2007 17:09:08 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j20g2000hsi.googlegroups.com; posting-host=62.103.190.188; 
 posting-account=fRZa_AkAAACE3nlFA9zM1Eq00OKq1Ycq
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.25 (Windows NT 6.0; U; en),gzip(gfe),gzip(gfe)
Xref: news.netfront.net comp.databases.theory:46663

On Dec 30, 10:40=A0am, mAsterdam <mAster...@vrijdag.org> wrote:

>
> --
> What you see depends on where you stand.

OK wise guy <g>, I kindly beseech thee to give me a simple schema that
will do the following:  "to declare a uniqueness constraint as a
foreign key reference" that allows me to do the following:

Table Certificate of Deposit provides a series of fixed income
products (CDs, Bonds, notes, etc, that are portable, in that you can
deposit them anywhere)--hereinafter "CD".  Primary key right now is
"CD SYmbol" (alphanumeric designator of the product:
XYZABC_Bond_matures_2008)

Table Bank has a primary key comprising: An account number that is
unique to every person--hereinafter "Bank"

Now I want to create a junction table called "AccountCD" that combines
the primary key of both the two tables above.

I do this, but unfortunately in Access I cannot enter a combination of
"CD" and "Bank" that is unique.  THat is, either the table allows me
to enter the same CD with the same Bank twice***, or, if I play around
with the keys, it forbids me from entering either (1) the same bank
twice or (2) the same CD twice.  BTW, this last restriction (1) I can
live with, but I don't want it--that is, I can set up a AccountCD
table that has only one record per bank, and different CDs in the
record, but what I want (because I'm too lazy to change my schema now)
is a series of unique combinations of records comprising: "BankA + CD
123", "BankA + CD ABC", "BankB + CD 123", "BankB + CD ABC", but not
"BankA + CD 123" twice.  Got it?   If it helps, my relationships flow
1 to many from CD/Bank (one) to AccountCD (many).

*** That is, the way the schema is now, I can enter any combination of
bank and CD I want, without restriction, even if it's a double:  ie.,
"BankA + CD 123", "BankA + CD 123".

Got Access?

LOL.  Access is great for rapid coding at the GUI level--you should
see what I've come up with in only a few days, but it's kludgey trying
to debug stuff.

BTW, I notice a tension between not just front end GUI and back end dB
schema people, but between putting data traps and data crunching code
in the GUI front end versus writing a SQL query or otherwise dealing
with the data in the back end.  In fact, some people (the posters at
microsoft . public . access . formscoding and elsewhere) imply and
state that it's better to deal with this stuff at the front end, since
SQL "puts too much load onto the servers" (or in particular Access), a
preformance issue, while others, I suspect you guys, think that the
front end technique is too much of a maintenance problem or is bad
design.

RL

