Database design shortcoming?...or not?
Posted: Tue Apr 13, 2010 11:52 pm
I have a question, and since I am not a database guy maybe someone more skilled could answer this for me.
When doing custom imports, etc... if someone adds a product in the database they must create a corresponding row in ac_CatalogNodes. But when someone wants to delete a product they must remember about the record in ac_CatalogNodes to delete it too. Same with categories. Why isnt this done with foreign keys, and then records from ac_CatalogNodes deleted automatically.
One more example. ac_CategoryParents does not have foreign key for ParentId, so I can write 938293482039482 in this column and there is no category with this ID.
Just trying to understand the reasoning, to better understand the functionality. Any help is appreciated
When doing custom imports, etc... if someone adds a product in the database they must create a corresponding row in ac_CatalogNodes. But when someone wants to delete a product they must remember about the record in ac_CatalogNodes to delete it too. Same with categories. Why isnt this done with foreign keys, and then records from ac_CatalogNodes deleted automatically.
One more example. ac_CategoryParents does not have foreign key for ParentId, so I can write 938293482039482 in this column and there is no category with this ID.
Just trying to understand the reasoning, to better understand the functionality. Any help is appreciated
