Home > Archive > MS SQL XML > November 2006 > RE: Thoughts on storing address data with XML data type?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: Thoughts on storing address data with XML data type?
[URL]http://www.music.sodrku.org[/URL] [URL]http

2006-11-29, 5:32 am


> Hello.
>
> I'm pretty new to SQL Server (switching from Visual FoxPro).
>
> I'm developing a database that will store, amongst other things, names
> and addresses of people from all over the world (approx 100,000
> records). Up to now, I've always used a flat model of storing address
> data using fields:
>
> Address line 1
> Address line 2
> Town/City
> County/State
> Postcode/ZIP
> Country
>
> But this model doesn't cater very well for the intricacies of postal
> systems all over the world. There is also redundancy, particularly with
> fields Line2, County/State, Postcode/ZIP, which are not needed for many
> countries.
>
> It also occurs to me that using multiple fields like this in a table
> with several fields gives no indication of the linked nature of the
> information. For example, if the town field is changed, then chances
> are that some of the other lines of the address become obsolete unless
> they are changed at the same time.
>
> So I have been thinking about storing the address in an XML structure
> in a single field. This will allow me, where necessary, to break down
> address data into smaller units where known (e.g. premise name, premise
> number, apartment number), or if a breakdown is not known to store
> chunks of data together. It also then allows me the flexibility to
> re-build the data in an appropriate order (e.g. for an address label)
> relevant for the particular country/language - for example number
> before/after street; postcode before town/separate line at the end.
>
> An example fragment might be:
>
> <address>
> <streetaddress>
> <premisename>Oak Cottage</premisename>
> <premisenumber>15</premisenumber>
> <streetname>Greenhill</streetname>
> <streettype>Crescent</streettype>
> </streetaddress>
> <locality>
> <village>Little Hampton</village>
> <town>Rickmansworth</town>
> <county>Hertfordshire</county>
> </locality>
> <postcode>WD3 3UH</postcode>
> <country>UK</country>
> </address>
>
>
> Bearing in mind some of this data will need to be searchable
> (especially postcode, country, and possibly town), are the possible
> benefits of this going to be outweighed by vast amounts of extra work,
> and a performance penalty, or does it sound like a good practical use
> of the XML data type?
>
> Any comments gratefully appreciated.
>
> Ben


[URL]http://www.music.sodrku.org[/URL] [URL]http://www.pasta.prvlima.org[/URL] [URL]http://www.sicilia.prvlima.org[/URL] [URL]http://www.corriere-della-sera.sodrku.org[/URL] [URL]http://www.festa.prvlima.org[/URL] [URL]http://www.jesse-mccartn
ey-lyric.gimaa.org[/URL] [URL]http://www.shakira.gimaa.org[/URL] [URL]http://www.filosofia.sodrku.org[/URL] [URL]http://www.search.prvlima.org[/URL] [URL]http://www.sonora.gimaa.org[/URL] [URL]http://www.serie-a.sodrku.org[/URL] [URL]http://ww
w.carabinieri.sodrku.org[/URL] [URL]http://www.messenger.gimaa.org[/URL] [URL]http://www.universita.sodrku.org[/URL] [URL]http://www.puglia.prvlima.org[/URL] [URL]http://www.primo.prvlima.org[/URL] [URL]http://www.guerra.sodrku.org[/URL] [URL]
http://www.screensaver.sodrku.org[/URL] [URL]http://www.motori.gimaa.org[/URL] [URL]http://www.sabrina-ferilli.prvlima.org[/URL] [URL]http://www.serena-grandi.gimaa.org[/URL] [URL]http://www.dello-gazzetta-sport.prvlima.org[/URL] [URL]http://www
.mario.prvlima.org[/URL] [URL]http://www.bello.gimaa.org[/URL] [URL]http://www.dal.prvlima.org[/URL] [URL]http://www.musica-gratis.gimaa.org[/URL] [URL]http://www.porn.sodrku.org[/URL] [URL]http://www.galleria.prvlima.org[/URL] [URL]http://www
.italiano.sodrku.org[/URL] [URL]http://www.wallpaper.gimaa.org[/URL] [URL]http://www.vittorio-emanuele.gimaa.org[/URL] [URL]http://www.pompei.gimaa.org[/URL] [URL]http://www.juventus.prvlima.org[/URL] [URL]http://www.bambino.prvlima.org[/URL]
[URL]http://www.vero.sodrku.org[/URL] [URL]http://www.italiane-poste.gimaa.org[/URL] [URL]http://www.musica-latina.gimaa.org[/URL] [URL]http://www.albergo.sodrku.org[/URL] [URL]http://www.naturismo.sodrku.org[/URL] [URL]http://www.bellezza.gimaa
.org[/URL] [URL]http://www.ciao-bella.sodrku.org[/URL] [URL]http://www.porno.sodrku.org[/URL] [URL]http://www.grosso.prvlima.org[/URL] [URL]http://www.ligabue.gimaa.org[/URL] [URL]http://www.forza-italia.prvlima.org[/URL]

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com