开发者

How address parameter stores in database

can any one explain how generally address taken from user stores in database...does that will be either of these or not

  1. taken each line as different parameter from user using different text boxes and stores in different columns of a table

  2. taken as one text area stores in a column of a table with field name address

  3. Taken as text area and stores by parsing that text and storing in different columns.

I assume address contains Door no,street name,area,city,country,zip code

an开发者_运维问答d also tell me which among the above is preferable way to store...


Think about what you want to do with the information to begin with. If you have no real use to ever use the addresss, but you are displaying it purely for informattional purposes, then you can just provide a single textarea.

If however, you are maybe going to be providing some GeoCoding service which needs to be able to pinpoint there address, then you will most certainly need: Postcode, City and Town etc.

When I store address information, this is what my schema looks like:

  • Address
  • City
  • StateProvince
  • zipPostCode
  • countryId
  • woeId (as per http://developer.yahoo.com/geo/geoplanet/data/ )

It is obviously just up to you. Think about how you need to best make use of the data, and make it as easy to enter as you require.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜