SQL Server varbinary(max) and varchar(max) data in a separate table

后端 未结 2 1717
难免孤独
难免孤独 2021-01-18 13:56

using SQL Server 2005 standard edition with SP2

I need to design a table where I will be storing a text file (~200KB) along with filename ,description and datetime.<

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-18 14:22

    I can answer your question in one simple word: Kiss.

    Which of course stands for... Keep It Simple Stupid.

    Adding a table for is generally a no-no unless you really need one to solve a problem.

    Generally, I disagree with splitting tables. It adds complexity to databases and code. Having useless columns in a table is a bad thing, but it's not as bad as multiple tables when you only need one.

    Cases where you would consider adding another table:

    1. Some of your columns are BloB's of data (greater than page size) and they are rarely used and other columns with small data sizes are accessed frequently.
    2. If you lack a brain.
    3. If you are evil.
    4. Or... if you are trying to piss-off your coworkers.

提交回复
热议问题