Click here to Skip to main content
15,895,256 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best Way To Handle Nulls Pin
BobJanova18-Jan-12 22:28
BobJanova18-Jan-12 22:28 
GeneralRe: Best Way To Handle Nulls Pin
PIEBALDconsult19-Jan-12 2:20
mvePIEBALDconsult19-Jan-12 2:20 
GeneralRe: Best Way To Handle Nulls Pin
jschell19-Jan-12 8:34
jschell19-Jan-12 8:34 
GeneralRe: Best Way To Handle Nulls Pin
PIEBALDconsult19-Jan-12 13:47
mvePIEBALDconsult19-Jan-12 13:47 
GeneralRe: Best Way To Handle Nulls Pin
BobJanova19-Jan-12 22:14
BobJanova19-Jan-12 22:14 
GeneralRe: Best Way To Handle Nulls Pin
PIEBALDconsult20-Jan-12 2:15
mvePIEBALDconsult20-Jan-12 2:15 
GeneralRe: Best Way To Handle Nulls Pin
jschell20-Jan-12 12:08
jschell20-Jan-12 12:08 
GeneralRe: Best Way To Handle Nulls Pin
PIEBALDconsult20-Jan-12 14:57
mvePIEBALDconsult20-Jan-12 14:57 
jschell wrote:
there is not possibility at all that the object can live in more than one
warehouse


Did you miss the part where the original code says "Warehouse2"? And this particular code refers to a "ProjectModel", not some item -- I don't know what the project is but it could be building an airplane, with some parts in one warehouse and others in another warehouse, and apparently some projects aren't in a warehouse at all.


jschell wrote:
a link table provides no functional benefit


It would solve the poster's null-handling problem.


jschell wrote:
provides no future benefit


It allows the "ProjectModel" to have any number of warehouses.


jschell wrote:
If there was another different model, something besides inventory item and
warehouse


I'm pretty sure that's what the poster has.



And now for an anecdote: Many years ago I was helping maintain a system which had a table for holding customer accounts; some fields were used to hold a credit card number, type, and expiration date (not required). All well and good. Then a new client wanted their customers to be able to have two credit cards on file. I had to add copies of those same three fields, plus another to indicate which one was last used. Dead | X| Then yet another new client wanted to allow their clients to have checking account information on file so they could do electronic transfers. More stinking fields were added to the table.
The system would have been much easier to maintain had the original developers made a separate table to hold information related to this sort of thing.

You should always allow for maximum flexibility because you do not know what the future holds, and Murphy is just around the corner.



I believe this portion of this article http://en.wikipedia.org/wiki/Database_normalization[^] is appropriate:

"
Minimize redesign when extending the database structure

When a fully normalized database structure is extended to allow it to accommodate new types of data, the pre-existing aspects of the database structure can remain largely or entirely unchanged. As a result, applications interacting with the database are minimally affected.
"
GeneralRe: Best Way To Handle Nulls Pin
jschell23-Jan-12 7:52
jschell23-Jan-12 7:52 
GeneralRe: Best Way To Handle Nulls Pin
jschell19-Jan-12 8:36
jschell19-Jan-12 8:36 
AnswerRe: Best Way To Handle Nulls Pin
fjdiewornncalwe18-Jan-12 11:29
professionalfjdiewornncalwe18-Jan-12 11:29 
GeneralRe: Best Way To Handle Nulls Pin
BobJanova18-Jan-12 22:29
BobJanova18-Jan-12 22:29 
AnswerRe: Best Way To Handle Nulls Pin
RobCroll18-Jan-12 15:00
RobCroll18-Jan-12 15:00 
AnswerRe: Best Way To Handle Nulls Pin
Luc Pattyn18-Jan-12 16:30
sitebuilderLuc Pattyn18-Jan-12 16:30 
AnswerRe: Best Way To Handle Nulls Pin
Pete O'Hanlon18-Jan-12 22:57
mvePete O'Hanlon18-Jan-12 22:57 
Questionemployee imformation list !!! Pin
fafal18-Jan-12 3:55
fafal18-Jan-12 3:55 
AnswerRe: employee imformation list !!! Pin
Pete O'Hanlon18-Jan-12 4:40
mvePete O'Hanlon18-Jan-12 4:40 
GeneralRe: employee imformation list !!! Pin
fafal18-Jan-12 7:39
fafal18-Jan-12 7:39 
GeneralRe: employee imformation list !!! PinPopular
Shameel18-Jan-12 7:53
professionalShameel18-Jan-12 7:53 
GeneralRe: employee imformation list !!! Pin
fafal18-Jan-12 8:06
fafal18-Jan-12 8:06 
GeneralRe: employee imformation list !!! Pin
Shameel18-Jan-12 8:16
professionalShameel18-Jan-12 8:16 
GeneralRe: employee imformation list !!! Pin
fafal18-Jan-12 8:25
fafal18-Jan-12 8:25 
GeneralRe: employee imformation list !!! Pin
OriginalGriff18-Jan-12 8:33
mveOriginalGriff18-Jan-12 8:33 
GeneralRe: employee imformation list !!! Pin
Dave Kreskowiak18-Jan-12 9:48
mveDave Kreskowiak18-Jan-12 9:48 
GeneralRe: employee imformation list !!! Pin
Pete O'Hanlon18-Jan-12 10:05
mvePete O'Hanlon18-Jan-12 10:05 

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.