yupi icon indicating copy to clipboard operation
yupi copied to clipboard

Database Schema

Open ovflowd opened this issue 9 years ago • 4 comments

I see the Emulator updating the Schema, and we have a tons of tables. Are the Database schema in correct way? Since we have, as an example, an unique table for each Catalogue Page Layout (omg)..

ovflowd avatar Sep 18 '16 16:09 ovflowd

Observation: NHibernate spend a really expansive time to create the Database Schema..

ovflowd avatar Sep 18 '16 16:09 ovflowd

I think database schema is going on wrong way, a lot of useless tables.

BurakDev avatar Sep 20 '16 09:09 BurakDev

I think the way how NHobernate is Creator the schema is wrong... We have really a lot of tables. Some tables in my opinion need to be columns from tables. A lot of foreign keys also are created. This make the database more heavy.

ovflowd avatar Sep 20 '16 10:09 ovflowd

Please read up on OOP Inheritance Mapping: http://nhibernate.info/doc/nhibernate-reference/inheritance.html

There are basically two ways to map OOP Inheritance: Table per Subclass or Table per Hierarchie. The problem with TPH is that it would force us to allow NULL values.

TheDoct0r11 avatar Sep 20 '16 11:09 TheDoct0r11