<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Rashad,<br>
<br>
I give you answer about ORM only. I don't program in C++, but in web
application langage (PHP). I know that there is an ORM in Java who
enable spatial field. It's Hibernate Spatial
(<a class="moz-txt-link-freetext" href="http://www.hibernatespatial.org">http://www.hibernatespatial.org</a>). I never user it but I supposed it
take in charge mostly spatial database (Oracle Spatial, PostGIS).
But you don't program in Java... nor me.<br>
<br>
I was looking for a spatial ORM in PHP and I heard about Doctrine
who has "user-defined" type field. Many programmer seem to use this
solution. I think you should looking in that way for an ORM in C++.
It's a short term solution.<br>
<br>
The other way is to write you own ORM or start to improve one who
already exists in C++... I think it's a long term solution who
should be developped in other langages than Java.<br>
<br>
It's my conclusion after a couple of years of spatial programmation
in PHP.<br>
<br>
Best regard<br>
<br>
Sylvain Racine<br>
iGreffe Geomatique<br>
Granby, Quebec, Canada<br>
<br>
<div class="moz-cite-prefix">Le 2013-01-05 00:59, Rashad M a écrit :<br>
</div>
<blockquote
cite="mid:CANNqv9dGbXFU_JN_k2h9FY0a-6J9kRyaED21CZ_cJwFfrkVFpw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div class="">
<p>Is it a good design idea to maintain separate tables for
each layer in a PostGIS database?. Every layer is defined
by users. A user creates his/her layer say ATM location. I
dont have control over the table definition of the layers
much This makes it impossible to predict fields(attribute
fields and type are not known initially) used in the
table/layers. School vs roads have different geometry and
set of attributes. </p>
<p>The problem is traditional databases wont advice for
having dynamic tables very much. Does the same apply to
spatial databases?</p>
</div>
</div>
<div>How to use ORM Database library with postgis table. I am
using C++ and libpq. but would like to change to an ORM model.</div>
<div><br>
</div>
<div>If i am using single table for every layer postgis may not
work because of geometry type. or i can have 3 table point,
line, polygon and data goes into the correct table based on
geometry type.</div>
<div>
<br>
</div>
<div>Each table contains</div>
<div>layerId,featureId,geomety, data(hstore)</div>
<div>data = field1=>value1, field2=>value2 etcc</div>
<div><br>
</div>
<div>i need to use hstore for fields "data" because name/type of
attributes are not known before runntime.</div>
<div><br>
</div>
<div>Also layerId will be redundant in the table. </div>
<div>Fo example: a layer with 1Lakh features will have a column
layerId 1L times which will not be there if I
use separate tables for separate layers. </div>
<div><br>
</div>
<div><br>
</div>
<div>But does adding a new table for every layer may become a
bottleneck? BTW, I am writing a web app</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
-- <br>
<div><font face="arial, helvetica, sans-serif">Regards,<br>
Rashad</font></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
<br>
</body>
</html>