pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedkind of a bag of attributes in a DB . . .
11+ messages / 3 participants
[nested] [flat]
* kind of a bag of attributes in a DB . . .
@ 2019-09-07 12:45 Albretch Mueller <lbrtchx@gmail.com>
0 siblings, 2 replies; 11+ messages in thread
From: Albretch Mueller @ 2019-09-07 12:45 UTC (permalink / raw)
To: pgsql-general
Say, you get lots of data and their corresponding metadata, which in
some cases may be undefined or undeclared (left as an empty string).
Think of youtube json files or the result of the "file" command.
I need to be able to "instantly" search that metadata and I think DBs
are best for such jobs and get some metrics out of it.
I know this is not exactly a kosher way to deal with data which can't
be represented in a nice tabular form, but I don't find the idea that
half way off either.
What is the pattern, anti-pattern or whatever relating to such design?
Do you know of such implementations with such data?
lbrtchx
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-07 18:05 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
1 sibling, 1 reply; 11+ messages in thread
From: Adrian Klaver @ 2019-09-07 18:05 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; pgsql-general
On 9/7/19 5:45 AM, Albretch Mueller wrote:
> Say, you get lots of data and their corresponding metadata, which in
> some cases may be undefined or undeclared (left as an empty string).
> Think of youtube json files or the result of the "file" command.
>
> I need to be able to "instantly" search that metadata and I think DBs
> are best for such jobs and get some metrics out of it.
Is the metadata uniform or are you dealing with a variety of different data?
>
> I know this is not exactly a kosher way to deal with data which can't
> be represented in a nice tabular form, but I don't find the idea that
> half way off either.
>
> What is the pattern, anti-pattern or whatever relating to such design?
>
> Do you know of such implementations with such data?
>
> lbrtchx
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-08 10:01 Chris Travers <chris.travers@gmail.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
1 sibling, 0 replies; 11+ messages in thread
From: Chris Travers @ 2019-09-08 10:01 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-general
On Sat, Sep 7, 2019 at 5:17 PM Albretch Mueller <lbrtchx@gmail.com> wrote:
> Say, you get lots of data and their corresponding metadata, which in
> some cases may be undefined or undeclared (left as an empty string).
> Think of youtube json files or the result of the "file" command.
>
> I need to be able to "instantly" search that metadata and I think DBs
> are best for such jobs and get some metrics out of it.
>
> I know this is not exactly a kosher way to deal with data which can't
> be represented in a nice tabular form, but I don't find the idea that
> half way off either.
>
> What is the pattern, anti-pattern or whatever relating to such design?
>
> Do you know of such implementations with such data?
>
We do the debug logs of JSONB with some indexing. It works in some
limited cases but you need to have a good sense of index possibilities and
how the indexes actually work.
> lbrtchx
>
>
>
--
Best Wishes,
Chris Travers
Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-10 16:59 Albretch Mueller <lbrtchx@gmail.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 11+ messages in thread
From: Albretch Mueller @ 2019-09-10 16:59 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
On 9/7/19, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> Is the metadata uniform or are you dealing with a variety of different
> data?
You can expect for all files to have a filename and size, but their
kinds (the metadata describing them) can be really colorful and wild
when it comes to formatting.
lbrtchx
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-10 19:26 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Klaver @ 2019-09-10 19:26 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-general
On 9/10/19 9:59 AM, Albretch Mueller wrote:
> On 9/7/19, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>> Is the metadata uniform or are you dealing with a variety of different
>> data?
>
> You can expect for all files to have a filename and size, but their
> kinds (the metadata describing them) can be really colorful and wild
> when it comes to formatting.
If there is no rhyme or reason to the metadata I am not sure how you
could come up with an efficient search strategy. Seems it would be a
brute search over everything.
>
> lbrtchx
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-11 16:46 Albretch Mueller <lbrtchx@gmail.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 11+ messages in thread
From: Albretch Mueller @ 2019-09-11 16:46 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
On 9/10/19, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> If there is no rhyme or reason to the metadata I am not sure how you
> could come up with an efficient search strategy. Seems it would be a
> brute search over everything.
Not exactly. Say some things have colours but now weight. You could
still Group them as being "weighty" and then tell about how heavy they
are, with the colorful ones you could specify the colours and then see
if there is some correlation between weights and colours ...
lbrtchx
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-11 21:06 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Klaver @ 2019-09-11 21:06 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-general
On 9/11/19 9:46 AM, Albretch Mueller wrote:
> On 9/10/19, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>> If there is no rhyme or reason to the metadata I am not sure how you
>> could come up with an efficient search strategy. Seems it would be a
>> brute search over everything.
>
> Not exactly. Say some things have colours but now weight. You could
> still Group them as being "weighty" and then tell about how heavy they
> are, with the colorful ones you could specify the colours and then see
> if there is some correlation between weights and colours ...
It would help to see some sample data, otherwise any answer would be
pure speculation.
>
> lbrtchx
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-14 09:06 Albretch Mueller <lbrtchx@gmail.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 3 replies; 11+ messages in thread
From: Albretch Mueller @ 2019-09-14 09:06 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
just download a bunch of json info files from youtube data Feeds
Actually, does postgresql has a json Driver of import feature?
the metadata contained in json files would require more than one
small databases, but such an import feature should be trivial
C
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-14 14:31 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
2 siblings, 0 replies; 11+ messages in thread
From: Adrian Klaver @ 2019-09-14 14:31 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-general
On 9/14/19 2:06 AM, Albretch Mueller wrote:
> just download a bunch of json info files from youtube data Feeds
>
> Actually, does postgresql has a json Driver of import feature?
Not sure what you mean by above?
Postgres has json(b) data types that you can import JSON into:
https://www.postgresql.org/docs/11/datatype-json.html
>
> the metadata contained in json files would require more than one
> small databases, but such an import feature should be trivial
Again, not sure I understand why small databases are required?
>
> C
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-14 14:42 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
2 siblings, 0 replies; 11+ messages in thread
From: Adrian Klaver @ 2019-09-14 14:42 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-general
On 9/14/19 2:06 AM, Albretch Mueller wrote:
> just download a bunch of json info files from youtube data Feeds
>
> Actually, does postgresql has a json Driver of import feature?
I'm working without a net(coffee) and so I forgot to mention that for
Python there is:
http://initd.org/psycopg/docs/extras.html?highlight=json
Not sure if this is what you are looking for or not.
>
> the metadata contained in json files would require more than one
> small databases, but such an import feature should be trivial
>
> C
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: kind of a bag of attributes in a DB . . .
@ 2019-09-16 03:01 Chris Travers <chris.travers@gmail.com>
parent: Albretch Mueller <lbrtchx@gmail.com>
2 siblings, 0 replies; 11+ messages in thread
From: Chris Travers @ 2019-09-16 03:01 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
On Sat, Sep 14, 2019 at 5:11 PM Albretch Mueller <lbrtchx@gmail.com> wrote:
> just download a bunch of json info files from youtube data Feeds
>
> Actually, does postgresql has a json Driver of import feature?
>
Sort of.... There are a bunch of features around JSON and JSONB data
types which could be useful.
>
> the metadata contained in json files would require more than one
> small databases, but such an import feature should be trivial
>
It is not at all trivial for a bunch of reasons inherent to the JSON
specification. How to handle duplicate keys, for example.
However writing an import for JSON objects into a particular database is
indeed trivial.
>
> C
>
>
>
--
Best Wishes,
Chris Travers
Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2019-09-16 03:01 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07 12:45 kind of a bag of attributes in a DB . . . Albretch Mueller <lbrtchx@gmail.com>
2019-09-07 18:05 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-09-10 16:59 ` Albretch Mueller <lbrtchx@gmail.com>
2019-09-10 19:26 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-09-11 16:46 ` Albretch Mueller <lbrtchx@gmail.com>
2019-09-11 21:06 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-09-14 09:06 ` Albretch Mueller <lbrtchx@gmail.com>
2019-09-14 14:31 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-09-14 14:42 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-09-16 03:01 ` Chris Travers <chris.travers@gmail.com>
2019-09-08 10:01 ` Chris Travers <chris.travers@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox