From: Brian <br...@br...> - 2002-08-31 10:42:59
|
Hi, when creating the demo data package, I recognized some weak points in our=20 database structure. Summary of the structure as it is now: We have bddb_beer linking ID of bddb_brewery. We have bddb_series linking ID of bddb_brewery. We have bddb_mats linking ID of bddb_brewery and ID of bddb_series and ID=20 of bddb_beer. As obvious, you must be secure, that ID of bddb_brewery is always=20 representing the same brewery, even if you import external data. For now,=20 ID is set to autoincrement and could not garantuee always connect the same= =20 brewery (just take a second database, and you will get new ID's). My idea to solve the problem is to create a ID hash from brewery name=20 string. This one will be unique, whenever you hash the same brewery. I am not expert in hashing matters, but I think this could be done. One more point: I would be good to make sure, that small differences in the= =20 name string would create the same hash (i.e. "Brinkhoff's=20 Brauerei", "Brauerei Brinkhoff", "Brinkhoff=B4s Brauerei") as they all=20 represent the same brewery. Any ideas? Any comments? I am not sure if this one is the best solution. Brian. |