wiki:Redudancies used for improving

This page purpose is to create some documentation about redundancies in the DataBase? model. Redundancies are to avoid in general except when they are useful. In any cases, redundancies should be documentated in this page, explaining :

  • Why they are existing
  • Which data is the reference (the other can be rebuilt from the reference, in case of problem)
  • future action forseen for now

Members table

Members.IdCity? is redundant with the Addresses record connected to the members. This Address record also has an IdCity? fields.

The reason is that they are many many queries which don't care about the full address of a member, but needs it city. In addition since a member can have several addresses (the one of rank 0) beeing his main address, it make the work a bit complex.

The reference is the Addresses.IdCity? for the record of rank 0 for this member. To restore consistency do a :

{{ update members,addresses members.IdCity?

set members.IdCity?=addresses.IdCity? where addresses.IdMember?=members.id and addresses.Rank=0

}}

In the future this redundancy will probably be kept, but new geo will change several thing.

to be continued