Hi Nukers,
I've just been poking around the database behind DNN 6, and have noticed that some basic database design principles are missing, or poorly implemented. Here's a few.
TabModuleSettings.SettingValue - A varchar column that can be used to store referential links back to the file system via an entry like "FileID=21323". Seems to store all sorts of data here, including binary (true/false) values. Using a text field to store different types of data is a really, really bad practice. This is not good for referential integrity, indexing, searching or coding.
Lots of column name in lots of tables end in "ID" - presumably to store a foreign key. There is rarely a foreign key constraint on such columns. This is a time-bomb waiting to happen. This is the perfect way to create lots of orphaned records. Also makes it hard to track down relational links between tables. Link the tables up via a key and reap the benefits of tight data integrity, query speed (index both ends of the joins).
Lots of meta-data / entity-attribute-value style (EAV) tables. These are not good design and terrible for performance. These are common when computer programmers design databases. The amount of linking and joins you have to do just to get data is going to slow things down. you cannot enforce data integrity or referential integrity. One of the worse sins in database design.
There are other issues also.
Just wondering, is there a dedicated team that look after the database and oversee module development in terms of good database practice? I think this would be good for the future of DNN development. Perhaps a checklist that each module's database design needs to pass - not just at the end of development, but during the design phase also - where database design needs to be done right.
Hope this helps. I say this in the spirit of product feedback and development. DNN is a great platform that really needs a rock-solid database platform in order to grow and scale.
Rod