General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>>On the other hand, relationships between tables will be a lot simpler if you store the Primary key in a single field.
>
>>I may be biased, but I like working with composite keys. In your example, how do you established the foreign keys once you have merged two fields into one ?
>Just as with a composite key: with the REPLACE command. With a single field, you need a single REPLACE command instead of two.
I am confused now. When I am talking about establishing foreign keys, I expect to set indexes and relationships so that the VFP database will reject any attempt to enter in the child table a value which doesn't exist in the parent table. I mean, the data integrity must be enforced by the database itself and not by the code. What does this have to do with the REPLACE command ?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only