Re: Graph datatype addition - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Graph datatype addition
Date
Msg-id CAHyXU0z1M0q=awLRpyKUXx4x5NrJp4tC2m4bitxUhv3n8LhpOQ@mail.gmail.com
Whole thread Raw
In response to Re: Graph datatype addition  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: Graph datatype addition
Re: Graph datatype addition
List pgsql-hackers
On Mon, Apr 29, 2013 at 9:25 AM, Atri Sharma <atri.jiit@gmail.com> wrote:
>>
>> This is an interesting idea.  Historically I've always decomposed
>> graphs into relational structures because that's the only practical
>> way to query them.   Graphs are not currently able to be transported
>> out of the database currently via JSON so one of the areas to focus
>> your research will be how the client will consume the data.
>> libpqtypes is one way to do it, but that will really restrict you
>> audience so you'll probably need a rich set of functions present the
>> internal data (just like hstore).
>
> I completely agree. Initially, I was thinking of exposing the data to
> user via HStore. But now, after Robert's suggestions, I think it will
> be better to have an alternate representation. JSON seems to be an
> excellent idea for that.

I don't agree with this; JSON is not really designed to store graphs.
You will probably need a customized internal representation, just like
hstore, that expresses a graph like structure.

This is not a trivial project.

merlin



pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: Graph datatype addition
Next
From: Atri Sharma
Date:
Subject: Re: Graph datatype addition