17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 1: Storing and Managing Unstructured Datainvoice date, currently embedded within the string stored in the Details column. Fromthis application's perspective, the data really is unstructured, and we'd need to store theinformation in a slightly more structured manner, as shown in Listing 1-2.Inv# SalesRep InvDate InvNote---- -------- ---------- -------------------------------------------------------101 Mike 2010/01/13 Notify James before shipping on fax number 456-098-0909102 John 2010/01/14 Call Anna on 898-090-0909 after shipment is sentListing 1-2:Slightly more structured log data.A third application, one that requires access to all <strong>of</strong> the individual elements in the data,would require the data to be more structured still, in fact in the sort <strong>of</strong> form we are accustomedto seeing in typical relational database tables, as shown in Listing 1-3.Inv# SalesRep InvDate Notify Number type when---- -------- ---------- ------ ------------ ------ ---------------101 Mike 2010/01/13 James 456-098-0909 Fax before shipment102 John 2010/01/14 Anna 898-090-0909 Phone after shipmentListing 1-3:Structured log data.I recently encountered a perfect example <strong>of</strong> this subtlety in a real application. It was adata integration project for a health care system, where the source system stored thepatient address in a single field, and so the address column in the source system heldvalues such as "999-888, Kings Highway, Brooklyn, NY 11223." From the perspective <strong>of</strong> thissystem, the data was structured enough, since the address information was used only formailing purpose. A mailing module picked the information from the address field andprinted the mailing label. No other part <strong>of</strong> the application touched the address column.<strong>The</strong> target system, however, was more advanced and needed to display the location<strong>of</strong> patients on a map, and so needed to extract individual elements <strong>of</strong> the address, suchas street name, zip code, and so on, in order to calculate the latitude and longitude <strong>of</strong>26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!