🗄️ Data Design

Updated at 2013-08-17 05:16

Data design is planning what information your product requires, involving planning of the database.

Require the least amount of manually given data possible. Filling forms is boring and service seems suspicious if they require information that we see irrelevant for the service.

User Profiles

Separate frequently and rarely accessed data. Separate user login information, general user information, user privileges and user settings in the database.

Consider using email as the username. If not possible, allow user to login with his username or email.


You should ask user full name and what to call the user. These two fields are the only universally usable format.

Yo-Yo is a member of Ma family.
In Chinese, people write their family name first: Ma Yo-Yo.

Facts about names:

  • People can have multiple names.
  • People can change their names.
  • People names can be case sensitive.
  • People names can be written in all caps or all lower.
  • People names can have prefixes and suffixes.
  • People names can contain numbers.
  • People can have same first and last name.
  • People might be missing first and last name, but have some other form of name.
  • People can have names that were not given at birth.


Always verify user emails before using them for anything. Otherwise you are inviting spam and abuse.

Allow one-click unsubscription from all emails. This is a legal requirement in many countries.

You can use a single Gmail account for testing. Gmail discards anything after + so you can use addresses like etc.


Places can have multiple names.

Genève, Genf, Ginevra.
Äntlisberg, Entlisberg.

Places are not always right by the language.

üe sound is no longer used in german.

Most French do not know how to even type ÿ.
Île de Croÿ

ó is not in Frence alphabet
Béla Bartók

Not all countries have a capital.

Switzerland does not.

Country and language codes do not always match.

Japan's country code is `jp`
Japanese's language code is `ja`


Customers do not always have fixed address with a fixed location. If you do not have an address, ask to specify landmarks, subdivision, nearby roads, mileage, neighbors.

Person can live in a boat.

Addresses do not always have a state.

United Kingdom does not have states.

Addresses do not always contain a building number. And building number is not always numeric.

Royal Opera House, Covent Garden, London, United Kingdom
Flat 1.4, Ziggurat Building, 60-66 Saffron Hill, London, United Kingdom
0 Egmond Road, Middlesbrough

Buildings can have a name and a number.

Flat 1.4, Ziggurat Building, 60-66 Saffron Hill, London, United Kingdom

Addresses can have multiple streets.

6 Elm Avenue, Runcorn Road, Birmingham, United Kingdom.

Addresses do not always have a street.

Electoral Reform Society Ltd, London, United Kingdom

Addresses can have well over 100 characters. Addresses can require well over 5 lines.

Department For Environment Food & Rural Affairs (D E F R A),
State Veterinary Service, Animal Health Office, Hadrian House,
Wavell Drive, Rosehill Industrial Estate, Carlisle, CA1 2TB,
United Kingdom

Addresses can contain commas.

Society of College, National & University Libraries,
102 Euston Street, London, NW1 2HA

Same building number can be used multiple times in one street.

50 Ammanford Road, Tycroes, Ammanford, SA18 3QJ
50 Ammanford Road, Llandybie, Ammanford, SA18 3YF

Addresses can change even if the person does not move. New postal codes.

All people do not know their postal codes. French postal code 75015 covers over 230 thousand people and many simply haven't ever used it and do not know it.

Roads can have multiple names. Roads may also be named in multiple languages.

Roads do not always have names. In Japan districts and blocks numbers are used.

Street names are not uniform in any way. For example there is not always 'street', 'drive', 'hill'.

Piccadilly, London, W1J 9PN

There are cases where you do not even have a zip code. And there are cases where you have multiple zip codes.

Military addresses can be really complex.

BFPO, BF1 4FB -- Navy vessel HMS Example

Addresses can be coordinates like in Menomonee Falls.

N88 W16541 Foobar St.

Addresses do not always contain only Latin characters.

Χανδρή 1 & Θεσσαλονίκης, Τ.Κ. 18346, Αθήνα -- Greek tax office.

Addresses are not always written in the country's locale. There can even be multiple characters sets in one address.

This is in Bulgaria.
Shipchenski Prohod Blvd. Block 17, Sofia, 1113

All number like zip codes can start with a zero.

All in all, you cannot reliably validate an address.

S Hwy X