Suggestions on field sizes and datatypes
Posted: Sun Jul 03, 2005 4:10 am
what do you think shd be the datatype and size for following fields?
So far, I have been doing to my own discretion but from now on I want to identify best practices and I dont wanna touch the db later on which is a very bad idea as we know.
1. FirstName - datatype if not text, wots the size in varchar?
2. LastName - datatype if not text, wots the size in varchar?
3. Password?
4. OrderId?
5. SessionId?
I used to store the address as:
Street, City, State, Country, PostCode.
what do you suggest on the names of the fields and their datatypes and sizes?
Do you think its gd to capitalize fields in tables like FirstName instead of firstName or firstname?
what are the significant advantages of 'text' and 'varchar' datafields one over the other?
So far, I have been doing to my own discretion but from now on I want to identify best practices and I dont wanna touch the db later on which is a very bad idea as we know.
1. FirstName - datatype if not text, wots the size in varchar?
2. LastName - datatype if not text, wots the size in varchar?
3. Password?
4. OrderId?
5. SessionId?
I used to store the address as:
Street, City, State, Country, PostCode.
what do you suggest on the names of the fields and their datatypes and sizes?
Do you think its gd to capitalize fields in tables like FirstName instead of firstName or firstname?
what are the significant advantages of 'text' and 'varchar' datafields one over the other?