a***h 发帖数: 29 | 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 | s*k 发帖数: 144 | 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
| w*********n 发帖数: 84 | 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
|
|