avatar
how to separate the table# Database - 数据库
a*h
1
how to separate the table
i am now establish a web site selling products.
1. i use SQL Server.
2. we have ten over ten thousand itmes for sale.
3. the web site is presented in three languages.
4. some items have more than one catagory code. for example,
a book can be idendified as a novel as well as a foreign
literature, therefore, it has two catagory codes, so people
can look for it from two different catagories.
5. although the book has more than one catagory code, it has
only ONE product cod
avatar
s*k
2
DB design is an art rather than a science,
There is no absolutely correct or incorrect.
So below is only my suggestion:
First consider your application scenairo:
Your website is presented in three languages,
but I think most of your customer will not want
to read only one of these languages at a given time.
So, it is no need to clutter information of
three languages in one table.
Second, in general one huge table is difficult
to program and maintain and which always need
more resource than you n

【在 a***h 的大作中提到】
: how to separate the table
: i am now establish a web site selling products.
: 1. i use SQL Server.
: 2. we have ten over ten thousand itmes for sale.
: 3. the web site is presented in three languages.
: 4. some items have more than one catagory code. for example,
: a book can be idendified as a novel as well as a foreign
: literature, therefore, it has two catagory codes, so people
: can look for it from two different catagories.
: 5. although the book has more than one catagory code, it has

avatar
w*n
3
Some personal idea:
Do you consider the expansion of the languages?
if someday, another language is introduced, the 2nd solution will spend
more effort to achieve; in this sense the 1st one is good.
To manipulate a bigger record like the table2 in 2nd solution will
cost too much. I recommend you to calculate the block size and the record
size, you will get a better comparison among the two.
Remember the Normal Form consideration?
In the 1st solution, it's in 3NF, better than 2nd, which has trans

【在 a***h 的大作中提到】
: how to separate the table
: i am now establish a web site selling products.
: 1. i use SQL Server.
: 2. we have ten over ten thousand itmes for sale.
: 3. the web site is presented in three languages.
: 4. some items have more than one catagory code. for example,
: a book can be idendified as a novel as well as a foreign
: literature, therefore, it has two catagory codes, so people
: can look for it from two different catagories.
: 5. although the book has more than one catagory code, it has

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。