• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Get it Right

The underlying principle in choosing controls is to make things as easy as possible for the users by not letting them make mistakes. That means restricting their options to valid ones. And that means matching the data entry type of the control to the data type of the attribute as closely as possible.

But before you get that far, you also need to make sure that the data type of the column matches the logical data type of the problem domain. Even though database design is outside the scope of this book, it needs saying. If you choose a char[3] to represent a value that can only be “Yes” or “No,” you'll just create problems for everybody. Now, that particular mistake isn't one you're likely to make, but I'll talk about underlying data types throughout the chapter, and we'll see examples where the best data type in the database schema isn't necessarily obvious.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint