Re: A philosophical newbie issue: catch redundant errors via relationships or programmically?
Date: Mon, 31 Dec 2007 10:08:52 -0800 (PST)
On Dec 31, 7:59 am, "David Cressey" <cresse..._at_verizon.net> wrote:
> I don't think this is a problem with MS Access. I think it's a problem in
> the way you set things up.
> If you set up a junction table correctly with a compound primary key
> consisting of CDSymbol and AcctId, you should be able to insert two rows
> with different CDIDs but the same AcctId. You should also be able to insert
> two rows with different AcctIDs but the same CDID, should that ever be
> necessary. But you won't be able to insert a new row with the same CDID
> and the same AcctID as a row that's already in there.
Great minds think alike. I've come to the same conclusion, with a couple of twists: besides the fact that the database schema is/are populated with data, which have to be purged (hence some tools I notice allow you to strip the data out of a database, whereas for Access I intend to do it by hand, but no big deal since the data is few), another factor is that the particular table form I designed (all tables are populated by data entry forms in Access, and I suspect most other RMDMS) had a "lookup table" (actually a List Box linked to a table) with a default setting that seems to have violated the new schema--it's loading a combination that is creating a compound key duplicate. So, everytime the form loads up, this default setting violates the new relationship comprising the compound key, as you have suggested.
At least that's my working hypothesis (I intend to put theory into practice soon).
Today I learned how to run SQL queries within Access as global functions, and how to set up neat virtual tables ("views"). Access is pretty slick, though I intend to also learn ADO.NET.
As for Bob and 1976, that was the year (or thereabouts) a Greek-born director directed "Network", a prophetic film of sorts which had the famous line "I'm mad as hell and I'm not going to take it anymore" along with the classic symbol of public disapproval of a government, the banging of pots and pans in the street (wonder if AmeriKKKa will see that someday? LOL, hope not).
RL Received on Mon Dec 31 2007 - 19:08:52 CET