Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2005-07-26 : 22:07:54
|
| I am creating a table which will contain a large string data string which will run probibily upto 2 or 3 thousand characters in it. Now I have read a few docs at this site that partain to stroring articals in databases using both text and varcahr datatypes and I have gotten a bit confused. I am betting I should be using the varchar but I just want confermation on this before I make the table and start filling it with data. Also do you think it would be wise to make two tables one with the 8 other columns I will be having and then the other that would contain the large amount of text I have or just though it all into one table with 9 colums.-- If I get used to enving others...Those things about my self I pride will slowly fade away.-Stellvia |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2005-07-26 : 22:45:56
|
| What do these "large data string" contains? Are you sure it should not be split into multiple rows/columns in multiple related tables to conform with a good relational database design?- Jeff |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2005-07-26 : 22:58:10
|
quote: Originally posted by jsmith8858 What do these "large data string" contains? Are you sure it should not be split into multiple rows/columns in multiple related tables to conform with a good relational database design?- Jeff
This is for a game site I am working on and I am wanting to put the hundreads of quests into a DB for easy updateing. The large data string would be the walkthough of how to compleate it, so I do not think it could be split since each quest has it's own unique way of being compleated. The commin parts of each quest (like NPC name, start location, reware, ect) will be split (they are the 8 other colums I mentioned in my last post)-- If I get used to enving others...Those things about my self I pride will slowly fade away.-Stellvia |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2005-07-27 : 17:32:21
|
| OK, I am going to do with my gut on this and say I should use the varchar datatype for my table, and split it into 2 seperate tables.-- If I get used to enving others...Those things about my self I pride will slowly fade away.-Stellvia |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2005-07-27 : 18:13:24
|
| If the size of the row is less than 8k, then make one table.If you need to have 8k worth of text plus some other stuff, I'd make two tables.Judging by your specs above, I'd create one table with a VARCHAR(4000)in it. That still gives you nearly 4000 more bytes to play with for any FK's and addtional text if you need to increase the size of the varchar field.Michael<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda> |
 |
|
|
|
|
|
|
|