<html><head><base href="x-msg://323/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Why put the images in the database at all? If you leave them on disk and put a relative path into postgres, you can host them anywhere using apache and the client can fetch them via url.<div><br></div><div>charles<br><div><br><div><div>On Mar 8, 2011, at 6:32 AM, Paragon Corporation wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial">300 is nothing.  For simplicity especially if it is a 1 to 1 relationship, I would keep it in a single table.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial">If you do plan to have multiple pictures per turbine like different side views, then you would keep the pictures in a separate table.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial">What Leo was talking about when he said painful was if you are updating millions of records at once.  One record here and there or even 500 records at once is not that big of a deal.  All that would be completed in a flip of an eyelid.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial">I would also use bytea type for picture storage than OID (LOID).  I think the non-bytea way is considered deprecated these days and suffers from the problem that you have to delete the data separately from the record otherwise you get orphaned objects.  I think the bytea way is also easier for most applications to read.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"><font color="#000000" size="3" face="Times New Roman"><font color="#0000ff">The Oversized-Attribute Storage Technique</font><span class="Apple-converted-space"> </span>(</font>TOAST) is a side topic -- really a behind the scenes implementation detail that PostgreSQL uses to get over its 8kb page size limit.  Has nothing to do with data type choice.  You don't usually need to think about it much whether your data is using TOAST or not except when really bad things happen like one of the toast tables becomes corrupt. (which usually signals disk failure anyway).</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial">Hope that helps,</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial">Regina</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"><a href="http://www.postgis.us">http://www.postgis.us</a></font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="012582111-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><br><div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><hr tabindex="-1"><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><span class="Apple-converted-space"> </span>[mailto:postgis-users-bounces@postgis.refractions.net]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Robert Buckley<br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, March 08, 2011 3:20 AM<br><b>To:</b><span class="Apple-converted-space"> </span>PostGIS Users Discussion<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [postgis-users] images in postgresql<br></font><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'times new roman', 'new york', times, serif; font-size: 10pt; ">Thanks for all the replies.<br><br>My Wind turbine table will only have around 300 - maximum 500 points. The photos shouldn´t change until either a turbine vanishes or gets repowered (ie. upgraded).<br><br>I am pretty new to postgis so when you all start talking about TOAST I start thinking about food rather than data formats. TOAST, Large blob, OID...how do I decide? As the images will be (hopefully) displayed over the web and they shouldn´t be more than 50 kb each. They are simply there to display a nice picture when someonw clicks on the map.<span class="Apple-converted-space"> </span><br><br>The table will however be updated with new turbines and we will certainly find errors so that some will have to be deleted or moved.<br><br>Would it be easier to keep them all in one table rather than in separate tables?<br><br>yours,<br><br>Rob<br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'times new roman', 'new york', times, serif; font-size: 10pt; "><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold; ">Von:</span></b><span class="Apple-converted-space"> </span>Paragon Corporation <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>><br><b><span style="font-weight: bold; ">An:</span></b><span class="Apple-converted-space"> </span>PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br><b><span style="font-weight: bold; ">Gesendet:</span></b><span class="Apple-converted-space"> </span>Dienstag, den 8. März 2011, 6:00:00 Uhr<br><b><span style="font-weight: bold; ">Betreff:</span></b><span class="Apple-converted-space"> </span>Re: [postgis-users] images in postgresql<br></font><br><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial">Ben,</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial">My understanding is the same (as long as you don't select the column that is) otherwise has to be detoasted. As I recall, I think a small bit will be stored and then the rest that doesn't fit into (I can't recall maximum space), gets chunked into toast records.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial">Its true for most of the databases I've worked with - e.g. large text or blobs just the pointer is stored in the main table, except PostgreSQL makes this decision conditionally on size and other databases make it beforehand based on data type.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial">However -- UPDATES will be painful I think because even though the data is toasted, PostgreSQL will still create an MVCC copy of the whole record when doing updates and slushing around big pictures and geometries can be painful.  So if your other wind turbine info gets changed more often than the photos, I would keep them separate.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial">Leo</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"><a href="http://www.postgis.us" rel="nofollow" target="_blank">http://www.postgis.us</a></font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="953075204-08032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><br><div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><hr tabindex="-1"><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><span class="Apple-converted-space"> </span>[mailto:postgis-users-bounces@postgis.refractions.net]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Ben Madin<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, March 07, 2011 8:31 PM<br><b>To:</b><span class="Apple-converted-space"> </span>PostGIS Users Discussion<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [postgis-users] images in postgresql<br></font><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div>Robert,<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On 06/03/2011, at 4:28 PM, Robert Buckley wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal medium/normal Helvetica; white-space: normal; orphans: 2; letter-spacing: normal; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: times, serif; font-size: 10pt; ">The windturbine table exists in EPSG:4326. I made a seperate table for the images because I didn´t wan´t to blow the size of the wind turbine table out of proportion and jeopardize performance.<br></div></div></span></blockquote><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">My understanding - and if I'm wrong I need to know(!) - is that the sort of data you are talking about (large geometries or blobs - for your pictures) are not stored in the primary table, but in associated storage space, known as TOAST tables. </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">This has important implications for indexing, but is brilliant because the content of these data fields does not directly impact on the number of pages that the table takes, hence rapid searching is still possible.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cheers</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Ben</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal medium/normal Helvetica; white-space: normal; orphans: 2; letter-spacing: normal; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: times, serif; font-size: 10pt; "><br>I am making a simple application to show wind turbines as wms and I wanted to show the turbine in a popup. I´m not sure how to get the popup to display though.<br><br>Any examples?<br>Thanks,<br><br>Rob<br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: times, serif; font-size: 10pt; "><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: times, serif; font-size: 12pt; "><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold; ">Von:</span></b><span class="Apple-converted-space"> </span>Paragon Corporation <<a href="mailto:lr@pcorp.us" rel="nofollow" target="_blank" ymailto="mailto:lr@pcorp.us">lr@pcorp.us</a>><br><b><span style="font-weight: bold; ">An:</span></b><span class="Apple-converted-space"> </span>PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net" rel="nofollow" target="_blank" ymailto="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br><b><span style="font-weight: bold; ">Gesendet:</span></b><span class="Apple-converted-space"> </span>Samstag, den 5. März 2011, 18:21:49 Uhr<br><b><span style="font-weight: bold; ">Betreff:</span></b><span class="Apple-converted-space"> </span>Re: [postgis-users] images in postgresql<br></font><br><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">Robert,</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">Is there a reason why you have the points in a separate table or do you have points in both tables and you want to relate by a spatial join?</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">  If its a 1 to 1 relationship, we would just put them in the same table.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">As far as foreign keys go, you should have some identifier the same in the two tables.  Do you? </font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">So it would be of the form</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">SELECT wt.wt_id, wt.geom, p.picture</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">FROM windturbines As wt INNER JOIN pictures As p ON wt.wt_id = p.wt_id</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">or if they are spatially related by space</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"><font color="#0000ff" size="2" face="Arial">SELECT wt.wt_id, wt.geom, p.picture</font></font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"><font color="#0000ff" size="2" face="Arial">FROM windturbines As wt INNER JOIN pictures As p ON ST_DWithin(wt.geom, pt.geom, 10)</font></font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"></span><font color="#0000ff" size="2" face="Arial"></font> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"></span><font color="#0000ff" size="2" face="Arial"></font> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">The 10 depends on the spatial reference system or if you are using geography type then it means 10 meters.  So I'm treating the wind turbine location and picture location as the same if they are within 10 meters apart.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"></span><font color="#0000ff" size="2" face="Arial"></font> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">BTW: you might want to read the first chapter of our upcoming book.  It's a free download and answers this type of question with concrete examples.</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"><a href="http://www.postgis.us/chapter_01" rel="nofollow" target="_blank">http://www.postgis.us/chapter_01</a></font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"></span><font color="#0000ff" size="2" face="Arial"></font> </div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial">Leo</font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"><a href="http://www.postgis.us" rel="nofollow" target="_blank">http://www.postgis.us</a></font></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"></span><font color="#0000ff" size="2" face="Arial"></font> </div></span></div><div dir="ltr" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="208011417-05032011"><font color="#0000ff" size="2" face="Arial"></font></span> </div><br><div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><hr tabindex="-1"><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:postgis-users-bounces@postgis.refractions.net" rel="nofollow" target="_blank" ymailto="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><span class="Apple-converted-space"> </span>[mailto:postgis-users-bounces@postgis.refractions.net]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Robert Buckley<br><b>Sent:</b><span class="Apple-converted-space"> </span>Saturday, March 05, 2011 5:39 AM<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:postgis-users@postgis.refractions.net" rel="nofollow" target="_blank" ymailto="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>[postgis-users] images in postgresql<br></font><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: times, serif; color: rgb(64, 0, 127); font-size: 10pt; ">Hi,<br><br>I am just experimenting at the moment with a project and could do with some advice.<br><br>I have created a database which contains photos of Windturbines.  I also have a postgis database with the locations (points) of the wind turbines and would like join the photos to the points via a link table or foreign key.<br><br>As you can tell, I haven´t too much experience with postgresql and relational database design. But i can imagine that the task should not be too difficult.<br><br>I am just a bit unsure how to go about it. The photos are on the linux server and the creation of the table and the insert of the image was successfull. But how do i get the  join and how would I display this photo in a geoext project?<br><br>thanks for any tips,<br><br>Robert<br></div></div></div></div></div></span></blockquote></div></div></div></div></div></div></span></blockquote></div><br></div></div></body></html>