Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Space vs NULL

Status
Not open for further replies.

yeheyaansari

Technical User
Oct 30, 2003
19
0
0
US
I have two solution for storing the Blank into a tables:
1. Either use NULL, or
2. Store spaces (' ') if that column is defined as NOT NULL

Here I would like to know, which of the two will help in BO? and Which one will give problem, Why?

Thanks
Yeheya
 
Storing spaces in not null columns?
Are you sure you have optimized your database design?

This will be confusing for setting proper conditions. Users may have to know if objects store null values or spaces
(depending on field definitions)

T. Blom
Information analyst
tbl@shimano-eu.com
 
This is related to database optmization itslef. DBA would not like to go with NULL columns, and they want to have all columns as NOT NULLABLE. Store SPACE if the input value is null.

I am a BO developer; so confused with their approach. Question came to mind is then : Is that the correct approach?

Also SPACE might give problem in GROUP BY clause, in WHERE condition.

Please give ur comments.

Thanks & Regards,
Yeheya
 
Your DBA must be either drunk or plain stupid. Did you ask him why on earth he would want this. A not nullable column is used for key fields or fields that have contraints on them. A workaround like storing spaces is plain silly.

He must have skipped classes during his DBA training or there must be some special reason for it (can't think of one though) What database are you working with. Is it an OLTP schema or datamart/datawarehouse (unlikely)

T. Blom
Information analyst
tbl@shimano-eu.com
 
Ouch, reconsider while you still can.............

T. Blom
Information analyst
tbl@shimano-eu.com
 
see also thread183-806159

Sometimes the grass is greener on the other side because there is more manure there - original.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top