Thread: Add Metadata to Postgre SQL

Add Metadata to Postgre SQL

From
José Pedro Santos
Date:
Dear Postgre Community,

I would like to know if is possible to add metadata to Schemas. I have shemas with raster layers and I would like to add to them matadata. Is possbile in Postgre? If not how can I solve this problem?

Many thanks in advance.

Best Regards,
José Santos

Re: Add Metadata to Postgre SQL

From
Andreas Kretschmer
Date:

"José Pedro Santos" <zpsantos1@hotmail.com> hat am 14. August 2012 um 11:15
geschrieben:
>
> Dear Postgre Community,
>
> I would like to know if is possible to add metadata to Schemas. I have shemas
> with raster layers and I would like to add to them matadata. Is possbile in
> Postgre? If not how can I solve this problem?

What do you mean with 'metadata'? Comments?

test=# create schema foobar;
CREATE SCHEMA
test=*# comment on schema foobar is 'my new comment';
COMMENT
test=*# \dn+ foobar
                   List of schemas
  Name  | Owner | Access privileges |  Description
--------+-------+-------------------+----------------
 foobar | root  |                   | my new comment
(1 row)



Regards, Andreas


Re: Add Metadata to Postgre SQL

From
John R Pierce
Date:
On 08/14/12 2:15 AM, José Pedro Santos wrote:
> Dear Postgre Community,
>
> I would like to know if is possible to add metadata to Schemas. I have
> shemas with raster layers and I would like to add to them matadata. Is
> possbile in Postgre? If not how can I solve this problem?


raster layers/images stored as BYTEA data in a table?   store your
metadata either as extra fields in the same table, or in seperate
table(s) that you join.

or are you talking about some other sort of metadata?   that term is
fairly ambiguous, it just means data about data, which can mean almost
anything you want it to in practice.





--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast




Re: Add Metadata to Postgre SQL

From
José Pedro Santos
Date:
Hi,

Not comments. In comments i can't use the ISO that rules Metadata XML. Basically put XML Metadata files inside the schemas. Is possible?

Best regards,

José Santos

> Date: Tue, 14 Aug 2012 11:25:55 +0200
> From: andreas@a-kretschmer.de
> To: pgsql-general@postgresql.org; zpsantos1@hotmail.com
> Subject: Re: [GENERAL] Add Metadata to Postgre SQL
>
>
>
> "José Pedro Santos" <zpsantos1@hotmail.com> hat am 14. August 2012 um 11:15
> geschrieben:
> >
> > Dear Postgre Community,
> >
> > I would like to know if is possible to add metadata to Schemas. I have shemas
> > with raster layers and I would like to add to them matadata. Is possbile in
> > Postgre? If not how can I solve this problem?
>
> What do you mean with 'metadata'? Comments?
>
> test=# create schema foobar;
> CREATE SCHEMA
> test=*# comment on schema foobar is 'my new comment';
> COMMENT
> test=*# \dn+ foobar
> List of schemas
> Name | Owner | Access privileges | Description
> --------+-------+-------------------+----------------
> foobar | root | | my new comment
> (1 row)
>
>
>
> Regards, Andreas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

Re: Add Metadata to Postgre SQL

From
John R Pierce
Date:
On 08/14/12 2:55 AM, José Pedro Santos wrote:
> Not comments. In comments i can't use the ISO that rules Metadata XML.
> Basically put XML Metadata files inside the schemas. Is possible?

not sure what the International Standards Organization has to do with
this, but XML is just text, and can be stored in a text field of a
table, or better yet, decompose the XML to whatever data it contains,
and store that data in separate fields in your table of metadata.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast




Re: Add Metadata to Postgre SQL

From
José Pedro Santos
Date:
With the files should came metadata to describe what is inside the file. I can't put in the comment options because is not ISO standart that allow to produce metadata.

I'm rookie with Postgre what do you mean by "stored in a text field of a table"? comment option?

If exist one option in the table options called "Metadata" would be great because allow to insert all the information there.

Best R.
JS

> Date: Tue, 14 Aug 2012 03:09:16 -0700
> From: pierce@hogranch.com
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Add Metadata to Postgre SQL
>
> On 08/14/12 2:55 AM, José Pedro Santos wrote:
> > Not comments. In comments i can't use the ISO that rules Metadata XML.
> > Basically put XML Metadata files inside the schemas. Is possible?
>
> not sure what the International Standards Organization has to do with
> this, but XML is just text, and can be stored in a text field of a
> table, or better yet, decompose the XML to whatever data it contains,
> and store that data in separate fields in your table of metadata.
>
>
>
> --
> john r pierce N 37, W 122
> santa cruz ca mid-left coast
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

Re: Add Metadata to Postgre SQL

From
Pavel Stehule
Date:
2012/8/14 José Pedro Santos <zpsantos1@hotmail.com>:
> With the files should came metadata to describe what is inside the file. I
> can't put in the comment options because is not ISO standart that allow to
> produce metadata.
>
> I'm rookie with Postgre what do you mean by "stored in a text field of a
> table"? comment option?
>
> If exist one option in the table options called "Metadata" would be great
> because allow to insert all the information there.

there is nice  goulash :)

you are using terms that has different meaning in GIS and in database
theory probably.

You can create own tables and you can store any text or binary content
to these tables.

Probably PostGIS mailing list
http://postgis.refractions.net/mailman/listinfo/postgis-users will be
probably  better for you

Nice a day

Pavel Stehule

>
> Best R.
> JS
>
>> Date: Tue, 14 Aug 2012 03:09:16 -0700
>> From: pierce@hogranch.com
>> To: pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] Add Metadata to Postgre SQL
>>
>> On 08/14/12 2:55 AM, José Pedro Santos wrote:
>> > Not comments. In comments i can't use the ISO that rules Metadata XML.
>> > Basically put XML Metadata files inside the schemas. Is possible?
>>
>> not sure what the International Standards Organization has to do with
>> this, but XML is just text, and can be stored in a text field of a
>> table, or better yet, decompose the XML to whatever data it contains,
>> and store that data in separate fields in your table of metadata.
>>
>>
>>
>> --
>> john r pierce N 37, W 122
>> santa cruz ca mid-left coast
>>
>>
>>
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general


Re: Add Metadata to Postgre SQL

From
John R Pierce
Date:
On 08/14/12 4:32 AM, José Pedro Santos wrote:
> With the files should came metadata to describe what is inside the
> file. I can't put in the comment options because is not ISO standart
> that allow to produce metadata.
>
> I'm rookie with Postgre what do you mean by "stored in a text field of
> a table"? comment option?
>
> If exist one option in the table options called "Metadata" would be
> great because allow to insert all the information there.
>

you have a table with your data stored in it, right?   something like...

     create table myrasters (id serial, rasterdata bytea);   ?

well, add another text field, metadata, like...

     alter table myrasters add column metadata text;

and store your metadata there.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast




Re: Add Metadata to Postgre SQL

From
José Pedro Santos
Date:
I'm working with vector but is like that. I just add a new column them I will copy the XML file into their..let me see if work.

Thanks,
Best R.

JP

> Date: Tue, 14 Aug 2012 04:52:30 -0700
> From: pierce@hogranch.com
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Add Metadata to Postgre SQL
>
> On 08/14/12 4:32 AM, José Pedro Santos wrote:
> > With the files should came metadata to describe what is inside the
> > file. I can't put in the comment options because is not ISO standart
> > that allow to produce metadata.
> >
> > I'm rookie with Postgre what do you mean by "stored in a text field of
> > a table"? comment option?
> >
> > If exist one option in the table options called "Metadata" would be
> > great because allow to insert all the information there.
> >
>
> you have a table with your data stored in it, right? something like...
>
> create table myrasters (id serial, rasterdata bytea); ?
>
> well, add another text field, metadata, like...
>
> alter table myrasters add column metadata text;
>
> and store your metadata there.
>
>
>
> --
> john r pierce N 37, W 122
> santa cruz ca mid-left coast
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

Re: Add Metadata to Postgre SQL

From
Steve Crawford
Date:
On 08/14/2012 06:34 AM, José Pedro Santos wrote:
I'm working with vector but is like that. I just add a new column them I will copy the XML file into their..let me see if work.

You can store XML in a text field but if the data is truly well-formed XML you may be better off defining the column as XML to take advantage of the operations available on that data type:

http://www.postgresql.org/docs/current/static/datatype-xml.html
http://www.postgresql.org/docs/current/static/functions-xml.html

Cheers,
Steve