Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing double records, math problem
Message
De
15/06/2007 15:33:58
 
 
À
15/06/2007 15:23:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01233421
Message ID:
01233638
Vues:
7
>>>>>Edward,
>>>>>
>>>>>I think the problem is that you might run out of records to delete from the latter tables, maybe the process should start with the tables ordered by the number of records to delete to minimize this.
>>>>>
>>>>>Ex. (r records and d records to delete)
>>>>>
>>>>>T1: 500r 30d
>>>>>T2: 100r 10d
>>>>>T3: 111r 3d && You might already run out of duplicates to delete from this table
>>>>
>>>>That's a good idea. It makes sense to start from the table with the minimum number of required deletions. As I mentioned before, exact result, i.e. absolutely correct proportion is not reachable, so one should try to get the best randomization.
>>>
>>>I have the feeling there is a mathematically best solution. Because the way records will be deleted affects real business money, and because a solution like yours we programmed left us with differences from the optimal solution in the range of 3-7%, I'm afraid our customers will not be satisfied.
>>>
>>>My experience says I have to look in the direction of a recursive algorithm. That's fine, but my experience won't come with that algorithm. It reminds me slightly of the problem of 8 queens on a chess board, relatively easy to solve with recursion.
>>>
>>>This problem however adresses thousands or even tens of thousands sets of duplicates spread over all permutations of T tables. The chess board and the number of queens is quite big.
>>
>>Could you remind me 8 queens puzzle, if you don't mind?
>
>Put 8 queens on a chess board in such a position they can't attack one another.

Thank you.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform