Click here to Skip to main content
15,898,588 members
Home / Discussions / Database
   

Database

 
AnswerRe: Remove empty spaces in a String in TSQL Pin
Blue_Boy20-Oct-11 2:15
Blue_Boy20-Oct-11 2:15 
GeneralRe: Remove empty spaces in a String in TSQL Pin
Vimalsoft(Pty) Ltd20-Oct-11 2:36
professionalVimalsoft(Pty) Ltd20-Oct-11 2:36 
GeneralRe: Remove empty spaces in a String in TSQL Pin
Blue_Boy20-Oct-11 2:43
Blue_Boy20-Oct-11 2:43 
GeneralRe: Remove empty spaces in a String in TSQL Pin
PIEBALDconsult20-Oct-11 4:28
mvePIEBALDconsult20-Oct-11 4:28 
AnswerRe: Remove empty spaces in a String in TSQL Pin
PIEBALDconsult20-Oct-11 2:40
mvePIEBALDconsult20-Oct-11 2:40 
AnswerRe: Remove empty spaces in a String in TSQL Pin
RobLazarus31-Oct-11 21:29
RobLazarus31-Oct-11 21:29 
QuestionHow Much Space Is Wasted In Unused Fields In SQL Server? Pin
Roger Wright19-Oct-11 19:21
professionalRoger Wright19-Oct-11 19:21 
AnswerRe: How Much Space Is Wasted In Unused Fields In SQL Server? PinPopular
Mycroft Holmes19-Oct-11 20:17
professionalMycroft Holmes19-Oct-11 20:17 
Roger Wright wrote:
Do they take up space, or are records compressed when fields are left empty

I think this depends on the data type CHAR will use the space allocated but VARCHAR uses the spare required by the data. I'm not 100% sure that is correct as I have had no interest in the issue, I always use VARCHAR unless the field is <5 characters and is required to be filled.

As to your table design, leaving empty fields has little impact on database size but may have different implications. FKs are not valid with empty fields. Maintenance of all those fields can be a bitch.

You could also go down the path of attributes where you have some base types with the fields common to all (or at least the bulk) of items in the machinery type. Then you have a bunch of attributes that can be assigned to each item. Caveat - going too far down this path leads to insanity as you can completely lose control of the attributes.
Never underestimate the power of human stupidity
RAH

GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Chris Meech20-Oct-11 4:01
Chris Meech20-Oct-11 4:01 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Roger Wright20-Oct-11 5:21
professionalRoger Wright20-Oct-11 5:21 
AnswerRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Chris C-B19-Oct-11 22:30
Chris C-B19-Oct-11 22:30 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Roger Wright20-Oct-11 5:27
professionalRoger Wright20-Oct-11 5:27 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Chris C-B20-Oct-11 6:01
Chris C-B20-Oct-11 6:01 
AnswerRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Eddy Vluggen20-Oct-11 2:09
professionalEddy Vluggen20-Oct-11 2:09 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Roger Wright20-Oct-11 5:28
professionalRoger Wright20-Oct-11 5:28 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Eddy Vluggen20-Oct-11 8:01
professionalEddy Vluggen20-Oct-11 8:01 
AnswerRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
jschell20-Oct-11 9:05
jschell20-Oct-11 9:05 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
Roger Wright20-Oct-11 10:25
professionalRoger Wright20-Oct-11 10:25 
GeneralRe: How Much Space Is Wasted In Unused Fields In SQL Server? Pin
jschell21-Oct-11 10:54
jschell21-Oct-11 10:54 
QuestionSQL Query Select Pin
reogeo200817-Oct-11 21:26
reogeo200817-Oct-11 21:26 
AnswerRe: SQL Query Select Pin
Blue_Boy17-Oct-11 22:34
Blue_Boy17-Oct-11 22:34 
GeneralRe: SQL Query Select Pin
AditSheth17-Oct-11 23:09
AditSheth17-Oct-11 23:09 
AnswerRe: SQL Query Select PinPopular
Mycroft Holmes17-Oct-11 22:53
professionalMycroft Holmes17-Oct-11 22:53 
AnswerRe: SQL Query Select Pin
Niladri_Biswas26-Oct-11 16:27
Niladri_Biswas26-Oct-11 16:27 
QuestionDB2 Commands Pin
Manivannan Dheena17-Oct-11 19:17
Manivannan Dheena17-Oct-11 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.