Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Index ?
Message
From
20/12/2000 18:03:09
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00455521
Message ID:
00455678
Views:
27
Dan,

I'm confused.

You have parent, child, grandchild tables. How does using the tables again as the source for the grids cuase duplicate records that are not in the child or grandchild tables originally?

As to indexes and "the deletion problem," a primary key should be unique and should never be reused. Then there is no problem whether the record is live or deleted. If you want to add a primary or candidate index then you may need to clean up any existing duplicate records first. The indexes will take care of preventing duplicates in the future.

Why would you consider using 4 tables? Which 4 tables?

Please be sure to understand that a primary or candidate index, which prevent duplicates, is not the same as the index you get when you use the UNIQUE keyword in the INDEX command. This index just "hides" duplicate records and is really not a good idea.


>I have a table that combines 3 table's from another app(SBT)based in foxpro. I was hoping to keep it in one table for simplicity, however...I am displaying the information in a set of grids that are parent-child related IE order level then line level then item level then component level all related top level down. If I use cursors the load time is rather long and will only get worse as the table grows. If I use the tables again as the record source of each grid I have a duplicate record problem on the 2nd and 3rd level. From what I understand I should not use a unique index because of deletion problems. is there a way to avoid the duplicat records that I have overlooked or should I just go to using 4 tables?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform