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.
The problem is traditional databases wont advice for having dynamic tables very much. Does the same apply to spatial databases? How to use ORM Database library with postgis table. I am using C++ and libpq. but would like to change to an ORM model. 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. Each table contains layerId,featureId,geomety, data(hstore) data = field1=>value1, field2=>value2 etcc i need to use hstore for fields "data" because name/type of attributes are not known before runntime. Also layerId will be redundant in the table. 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. But does adding a new table for every layer may become a bottleneck? BTW, I am writing a web app -- Regards, Rashad
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
