Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global ID's?
Message
De
05/05/2000 16:26:55
 
 
À
05/05/2000 15:20:02
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00366652
Message ID:
00366780
Vues:
14
>5. If I used parts of your idea, maybe I could use the view that showed all addresses that have AddressTable.CustomerID = 403011 and AddressTable.cTableName = 'Customer'
>Is that what you were thinking? I just might do it, although I'm still concerned about the table name changing?

That is why I suggested each table be assigned a unique id number. That way if hte tablename changed it would not matter because your lookup would be searching by number. One advantage of adding a table id table, and table id number key to your address table is that you have a more robust connection -- one that works both ways. Not only can the customer table look up the address, but you can search the address table, and by a combination of key and table id go backwords to get the customer or employee. Your way the link is easy going from customer or employee to address but a lot of work going the other way from address back to employee or customer or vendor or whatever. In addition, your particular proposal sets off my sub-concious alarm bells. My intutition is shouting "NO! NO!". Does not mean you have to listen

>
>6. Now... if my CustomerID was Globally unique (atleast in our development) then I could just show all addresses that have AddressTable.OwnerID = 403011 and I wouldn't have to worry about Employee Table having an ID = 403011 too. All tables could use the Address table.

They can by adding a tablid (not table name) as well to address table.

But if you realy want do this the existing NEWID() function will actually support it.

Add an entry to the ID table. (I'd used the simple incrementing Integer key.) Call it -- say DUID.

Now for all your tables simply put in the default calculation NEWID("DUID").

You would, of course, have to disable the NEWID code in your existing tables, run a quick program to open your tables one at a time and put these Database Universial Ids in sequaentially, and initialize the DUID record in the ID table before changing the defaults in your table ids to this code.


Just because I think it is a bad idea, does not mean you neccesarily should not do this. If you decide to use this data structure, please report back the results after it has been in use a while.
Thanks

Gar W. Lipow
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform