On 3/19/07, Dave Crozier <[EMAIL PROTECTED]> wrote:

> As I'm converting (slowly) the existing native VFP table onto MySQL this
> requirement to model the "extended FK" will eventually become redundant and
> as you say I'll order the cursors using the additional "order by" in the SQL
> statement. It's just that I wanted a simple way to model the existing tables
> but not to worry as I can always include the foreigh FK expression in the
> relationship description label.

I've done a lot of porting of legacy (that's "Stuff someone wrote a
couple of years ago, before we knew what we know now," sometimes even
my own stuff) into new databases, some modern DBCs and others into SQL
Server and MySQL. A key idea to grasp is that RDBMS features are not
an option when you move to other platforms - you HAVE to do it the
right way, or suffer mightily. Relational integrity is defined and
maintained in the engine and it's either right or wrong.

So, in this case, I'd suggest creating a "real" FK, just another index
on the table, and look at migrating your current logic to use the join
of "FROM Customer Join Transaction on Customer.PK =
Transaction.Cust_FK" and "ORDER BY Date, Type"

Btw, "Type" and "Date" are not good names for fields; I don't know if
you were just using them as examples, or if that's really what's in
the database. That'll cause trouble, too. Avoid keywords.

> I must admit I'm very impressed with XCase so far even though I haven't yet
> looked into the scripting features and as you say, the diagrams do look very
> pretty especially as I need to introduce a junior person to the existing
> system schema in as painless a way as possible.

Pictures are worth a thousand words. ERDs can convey a lot of
information, intuitively and viscerally.

Once you get the hang of it, maintaining the model, a couple of
development databases, a staging database and the production
database(s) in synch using the generated scripts is pretty handy.

> As I said, I have taken a
> look at Enterprise Architect which seems to be a "monster" with loads more
> facilities than I need at present so I think I'll at least start with XCase.

I'm still surprised at all the features hidden in xCase: porting to a
different target DBMS, browsing live data,... it's a pretty cool
application.

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to