I have these columns and their datatypes, Could someone give me any advice whether they are right, and if not, suggest what is more appropriate?

Thanks enter image description here

closed as unclear what you're asking by Shanky, Tom V, Erik, RLF, mustaccio Nov 15 '16 at 18:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    I have a friend in Brazil. His first name is Jose Manuel Garcia Jesus Maria Piedro Gonzales and his last name is del Santo Christobel y Brazil. en.wikipedia.org/wiki/List_of_long_place_names – hot2use Nov 15 '16 at 10:58
  • I'm not sure how we can decide on what datatypes are correct for your application, since we can't really determine your requirements based on the name you picked alone. – Tom V Nov 15 '16 at 15:09
  • Which DBMS are you using? – a_horse_with_no_name Nov 15 '16 at 16:31

NOTE: I'm assuming that you are using SQL Server, from the type names listed, as you've not specified anything else.

  1. You should allow for non-ANSI characters in names by using NVARCHAR instead of VARCHAR though of course to properly support extended character sets the rest of your stack might need work also...
  2. You should allow for significantly longer names then 20 characters. Don't use MAX due to potential indexing and other performance concerns, as you are likely to want to search and/or sort by names.
  3. You might need to extend the VAT number column a bit too, depending on the territories that you need to support. See https://en.wikipedia.org/wiki/VAT_identification_number for a list of formats a number of which are longer then 11.
  4. I would be inclined to widen phone number too.
  5. Spaces, punctuation, and anything else that might require escaping, are a bed idea in column names. I would stick with letters, numbers, and underscore.

What is "client name" used for and how (if it does) does it related to the other name columns? There maybe specific advice about that depending on how it is intended to be used.

Not the answer you're looking for? Browse other questions tagged or ask your own question.