Database cross table or one table is better
First, I have companies and their templates.templates in file table I related columns like this:
FileTemplate ------------------- ID - CompanyID - Description - FileID
Second design:
FileTemplate ------------------- ID - DescriptionCrossTable:
----------------------------------------- ID - CompanyID - FileID - FileT开发者_开发问答emplateID
Which design is better for performance and maintenance? There will be a lot of data (1 million rows). It will be a very active table.
As per my knowledge, the second approach is better as you have a huge amount of data. Normalizing is always the best approach. As you said, there should be company and field tables seperately along with the cross reference table.
Hope this is of some help for you!!
精彩评论