开发者

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  -   Description   

CrossTable:

                        
-----------------------------------------      
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!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜