January 20, 2008 at 2:24 am
Hello, guys how are you doing?
I am Network administrator besides I am familiar with SQL server 2000 specially updating tables, import and export. But I am not a programmer. My Question is regarding the design tables. After you create your own data in column name, the data type and the length gives you its value automatically. But as I saw in others, they select their own data type and length. Is there any formula for this? Guys do you mind, if you explain this?
Thank you very much
January 20, 2008 at 9:59 am
This isn't something easily answered. It depends on your data.
Pick something that you think fits your data, with some pad for character values. Dates are dates, numbers are integers or not., characters need to fit your data.
If you describe what your trying to do, we can help.
January 20, 2008 at 11:27 am
Here is the example -
Accounting database---department table---- column name is Deptmsg-----data type is Varchar then the value of the length should be ‘50’ but they changed it into ‘5000’
thanks
January 20, 2008 at 3:39 pm
Again, that doesn't help. It depends on what your data is.
If you are storing phone numbers, you don't need a varchar(50). You can reduce that to 10 char in the US, a little more elsewhere. You change the lengths and types based on what the data is. We have no idea what your data is or what possible values it can have.
January 21, 2008 at 12:16 am
I think you answered the my Question because you said “If you are storing phone numbers, you don't need a varchar(50). You can reduce that to 10 char" this is also one important thing I heard. And also I saw in their database the same think as you said. For the telephone numbers they are using "char" length 10.
That means when you create data base, you need to know also what data type and length are you doing to use. What is why I am asking whether is has a definite formula or not?
Thank you very much
January 21, 2008 at 1:42 am
There is no definite formula to compute the datat ype and lengths of your columns. It all depends on type and the nature of the data you want to store in a column. There are general best practices for this.
Check out this site and others on the web for best practices for designing your database tables.
"Keep Trying"
January 21, 2008 at 7:00 am
Thank you very much guys
I appreciated
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply