Gramps with a query language

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Gramps with a query language

DS Blank
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

Philip Weiss
I'd love something like that!  Particularly if I could do some things like join with a non-Gramps table of surname equivalents and have access to Gramps functions in the queries.

Phil.

On Tue, Feb 17, 2015 at 6:42 PM, Doug Blank <[hidden email]> wrote:
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

Pat Clark
In reply to this post by DS Blank
Great idea, Doug.

I'm all for it if it can be used instead of filters.
I find SQL much less mystifying than working out filters.

Pat

On 18/02/15 13:12, Doug Blank wrote:
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

paul womack
In reply to this post by DS Blank
Doug Blank wrote:

> Gramps users,
>
> I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?
>
> For example, would you be interested in:
>
> * being able to get a simple listing of data that matched a criteria
> * being able to make batch changes
> * using your database in other ways
> * create filters based on these queries
>
> I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:
>
> https://www.youtube.com/watch?v=ziUgtdJgKoo
>
> (The ideas here are still a bit rough... there are a few things that are done manually.)
>
> Please let me know if you might find something like this useful, or if you have other ideas.
Yes, I do have another idea.

The gramps filters (clearly, I think) started life as single table scans.
and were later extended so that each table could act on a named filter from
an adjacent (AKA "joined" table).

But to exploit this one has to make a number of named queries, which is tedious, error
prone and confusing.

I would like to be able to create anonymous "inner" filters, so that a multi-table
("joined" in SQL parlance) query can be worked on in one go.

For example, I might want to list all the places with birth events for a named family.

At the moment, I would need to make a Place filter (A), which would merely
use the "Places of Events matching the <event filter", event filter B.
Event filter B would filter on event type (Birth), and (literally AND)
"Events of persons matching the person filter C", and we would then
finally create Person filter C, "people with name"

I attach the current XML form and the XML form I propose.

The GUI to create this would look (a lot) like a tree editor, so the usual
"+" toggle type interface would serve nicely.

    BugBear

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users

ABC.xml (896 bytes) Download Attachment
anon.xml (686 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

Nicholas Robinson
In reply to this post by DS Blank
Hi

I would be interested. I would also be interested in getting a port of my gramps database into a graphical database like neo4j to do some querying. Nick 

Sent from my iPhone

On 18 Feb 2015, at 02:42, Doug Blank <[hidden email]> wrote:

Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

DS Blank
In reply to this post by paul womack
On Wed, Feb 18, 2015 at 4:16 AM, paul womack <[hidden email]> wrote:
Doug Blank wrote:
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:

https://www.youtube.com/watch?v=ziUgtdJgKoo

(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Yes, I do have another idea.

The gramps filters (clearly, I think) started life as single table scans.
and were later extended so that each table could act on a named filter from
an adjacent (AKA "joined" table).

But to exploit this one has to make a number of named queries, which is tedious, error
prone and confusing.

I would like to be able to create anonymous "inner" filters, so that a multi-table
("joined" in SQL parlance) query can be worked on in one go.

For example, I might want to list all the places with birth events for a named family.

At the moment, I would need to make a Place filter (A), which would merely
use the "Places of Events matching the <event filter", event filter B.
Event filter B would filter on event type (Birth), and (literally AND)
"Events of persons matching the person filter C", and we would then
finally create Person filter C, "people with name"

That is an excellent example, shows that putting together the filters is not exactly intuitive, and a bit tedious to put together.

I didn't mention this in the example queries, but the query machinery automatically does such joins. So, you can do what you want with:

result = dbi.query("""
              select event_ref_list.ref.place.name, gramps_id
                        from person 
                        where event_ref_list.role.string == ['Primary'] and
                              event_ref_list.ref.type.string == ['Birth'] and 
                              event_ref_list.ref.place.name != ['None'] and 
                              event_ref_list.ref.place.name != ['']
                              ;
                        """)

and that will show all of the People and Place names from events that have a primary role and is a Birth event. (This query code is just an experiment, and would need to be better refined if it were to be considered for adoption by Gramps. But with such refinement, this shows it could really simplify current complex filter creation. On the other hand, one would have to learn the internal structure of Gramps data, and these queries would be intimately tied to it.)

 

I attach the current XML form and the XML form I propose.

I guess the query syntax would eliminate the need for such a form? Or would these ideas be combined somehow?

-Doug
 

The GUI to create this would look (a lot) like a tree editor, so the usual
"+" toggle type interface would serve nicely.

   BugBear


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

DS Blank
In reply to this post by Nicholas Robinson
On Wed, Feb 18, 2015 at 4:19 AM, Nicholas Robinson <[hidden email]> wrote:
Hi

I would be interested. I would also be interested in getting a port of my gramps database into a graphical database like neo4j to do some querying. Nick 

I guess the idea here is that you wouldn't need to export your data to some other system, but could do it in Gramps.

(If neo4j can import JSON data, then you could fairly easily export from Gramps. Or use the already existing SQL exports).

-Doug

 

Sent from my iPhone

On 18 Feb 2015, at 02:42, Doug Blank <[hidden email]> wrote:

Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

DS Blank
In reply to this post by Philip Weiss
On Tue, Feb 17, 2015 at 10:01 PM, Philip Weiss <[hidden email]> wrote:
I'd love something like that!  Particularly if I could do some things like join with a non-Gramps table of surname equivalents and have access to Gramps functions in the queries.

Probably could integrate with existing filters... that would be very powerful. Not sure about joining with other tables... this isn't really SQL... just a language that sits on top of gramps data.

-Doug
 

Phil.

On Tue, Feb 17, 2015 at 6:42 PM, Doug Blank <[hidden email]> wrote:
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

DS Blank
In reply to this post by Pat Clark
On Tue, Feb 17, 2015 at 10:55 PM, Pat Clark <[hidden email]> wrote:
Great idea, Doug.

I'm all for it if it can be used instead of filters.
I find SQL much less mystifying than working out filters.

Except that there would still be quite a bit of mystery to figure out in determining how the tables are linked up. We might be able to provide some help with that. I usually have to perform many test queries to use to then refine my search.

-Doug

 


Pat


On 18/02/15 13:12, Doug Blank wrote:
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

paul womack
In reply to this post by DS Blank
It's possible we have different goals. I'm trying to extend and generalise the current filtering model, you're trying to replace it!

My suggestions, whilst expressed as changes to the stored queries in XML, are a (fairly...) natural extension to both the
codebase and GUI model in Gramps.

You don't need to be programmer to use my idea (although it probably helps)

  BugBear

Doug Blank wrote:

> On Wed, Feb 18, 2015 at 4:16 AM, paul womack <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Doug Blank wrote:
>
>         Gramps users,
>
>         I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?
>
>         For example, would you be interested in:
>
>         * being able to get a simple listing of data that matched a criteria
>         * being able to make batch changes
>         * using your database in other ways
>         * create filters based on these queries
>
>         I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:
>
>         https://www.youtube.com/watch?__v=ziUgtdJgKoo <https://www.youtube.com/watch?v=ziUgtdJgKoo>
>
>         (The ideas here are still a bit rough... there are a few things that are done manually.)
>
>         Please let me know if you might find something like this useful, or if you have other ideas.
>
>
>     Yes, I do have another idea.
>
>     The gramps filters (clearly, I think) started life as single table scans.
>     and were later extended so that each table could act on a named filter from
>     an adjacent (AKA "joined" table).
>
>     But to exploit this one has to make a number of named queries, which is tedious, error
>     prone and confusing.
>
>     I would like to be able to create anonymous "inner" filters, so that a multi-table
>     ("joined" in SQL parlance) query can be worked on in one go.
>
>     For example, I might want to list all the places with birth events for a named family.
>
>     At the moment, I would need to make a Place filter (A), which would merely
>     use the "Places of Events matching the <event filter", event filter B.
>     Event filter B would filter on event type (Birth), and (literally AND)
>     "Events of persons matching the person filter C", and we would then
>     finally create Person filter C, "people with name"
>
>
> That is an excellent example, shows that putting together the filters is not exactly intuitive, and a bit tedious to put together.
>
> I didn't mention this in the example queries, but the query machinery automatically does such joins. So, you can do what you want with:
>
> result = dbi.query("""
>                select event_ref_list.ref.place.name <http://event_ref_list.ref.place.name>, gramps_id
>                          from person
>                          where event_ref_list.role.string == ['Primary'] and
>                                event_ref_list.ref.type.string == ['Birth'] and
> event_ref_list.ref.place.name <http://event_ref_list.ref.place.name> != ['None'] and
> event_ref_list.ref.place.name <http://event_ref_list.ref.place.name> != ['']
>                                ;
>                          """)
>
> and that will show all of the People and Place names from events that have a primary role and is a Birth event. (This query code is just an experiment, and would need to be better refined if it were to be considered for adoption by Gramps. But with such refinement, this shows it could really simplify current complex filter creation. On the other hand, one would have to learn the internal structure of Gramps data, and these queries would be intimately tied to it.)
>
>
>     I attach the current XML form and the XML form I propose.
>
>
> I guess the query syntax would eliminate the need for such a form? Or would these ideas be combined somehow?
>
> -Doug
>
>
>     The GUI to create this would look (a lot) like a tree editor, so the usual
>     "+" toggle type interface would serve nicely.
>
>         BugBear
>
>


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

ACProctor
In reply to this post by DS Blank

I seem to remember this subject being discussed on a Gramps mailing list before. The point I made then was that any query language that is tied to a specific DB schema would be short-lived. I totally agree that a query language would be extremely useful -- and I did submit a paper to FHISO about it some time ago -- but it would have to be abstracted from anything related to the current DB schema. If based on the underlying logical object model for Gramps then it would survive future enhancements more easily, and would find application in more diverse situations.
 
    Tony Proctor
----- Original Message -----
Sent: Wednesday, February 18, 2015 2:42 AM
Subject: [Gramps-users] Gramps with a query language

Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

DS Blank
In reply to this post by paul womack
On Wed, Feb 18, 2015 at 8:08 AM, paul womack <[hidden email]> wrote:
It's possible we have different goals. I'm trying to extend and generalise the current filtering model, you're trying to replace it!

I don't want to replace the current filtering system, but provide an alternative method. I could imagine that Query would be just another kind of filter. You would just need to specify what "table" (eg, person, place, event) and the "where clause". After that, it is just another subset of the data.
 

My suggestions, whilst expressed as changes to the stored queries in XML, are a (fairly...) natural extension to both the
codebase and GUI model in Gramps.

You don't need to be programmer to use my idea (although it probably helps)

I guess your idea is about an interface for easily constructing filters composed of filters? If so, that sounds useful, and is independent to a Gramps query language. Although the idea of combining filters with a query language sounds quite powerful. 

-Doug
 

 BugBear

Doug Blank wrote:
On Wed, Feb 18, 2015 at 4:16 AM, paul womack <[hidden email] <mailto:[hidden email]>> wrote:

    Doug Blank wrote:

        Gramps users,

        I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

        For example, would you be interested in:

        * being able to get a simple listing of data that matched a criteria
        * being able to make batch changes
        * using your database in other ways
        * create filters based on these queries

        I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:

        https://www.youtube.com/watch?__v=ziUgtdJgKoo <https://www.youtube.com/watch?v=ziUgtdJgKoo>

        (The ideas here are still a bit rough... there are a few things that are done manually.)

        Please let me know if you might find something like this useful, or if you have other ideas.


    Yes, I do have another idea.

    The gramps filters (clearly, I think) started life as single table scans.
    and were later extended so that each table could act on a named filter from
    an adjacent (AKA "joined" table).

    But to exploit this one has to make a number of named queries, which is tedious, error
    prone and confusing.

    I would like to be able to create anonymous "inner" filters, so that a multi-table
    ("joined" in SQL parlance) query can be worked on in one go.

    For example, I might want to list all the places with birth events for a named family.

    At the moment, I would need to make a Place filter (A), which would merely
    use the "Places of Events matching the <event filter", event filter B.
    Event filter B would filter on event type (Birth), and (literally AND)
    "Events of persons matching the person filter C", and we would then
    finally create Person filter C, "people with name"


That is an excellent example, shows that putting together the filters is not exactly intuitive, and a bit tedious to put together.

I didn't mention this in the example queries, but the query machinery automatically does such joins. So, you can do what you want with:

result = dbi.query("""
               select event_ref_list.ref.place.name <http://event_ref_list.ref.place.name>, gramps_id
                         from person
                         where event_ref_list.role.string == ['Primary'] and
                               event_ref_list.ref.type.string == ['Birth'] and
event_ref_list.ref.place.name <http://event_ref_list.ref.place.name> != ['None'] and
event_ref_list.ref.place.name <http://event_ref_list.ref.place.name> != ['']
                               ;
                         """)

and that will show all of the People and Place names from events that have a primary role and is a Birth event. (This query code is just an experiment, and would need to be better refined if it were to be considered for adoption by Gramps. But with such refinement, this shows it could really simplify current complex filter creation. On the other hand, one would have to learn the internal structure of Gramps data, and these queries would be intimately tied to it.)


    I attach the current XML form and the XML form I propose.


I guess the query syntax would eliminate the need for such a form? Or would these ideas be combined somehow?

-Doug


    The GUI to create this would look (a lot) like a tree editor, so the usual
    "+" toggle type interface would serve nicely.

        BugBear





------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

DS Blank
In reply to this post by ACProctor
On Wed, Feb 18, 2015 at 8:20 AM, Tony Proctor <[hidden email]> wrote:
I seem to remember this subject being discussed on a Gramps mailing list before. The point I made then was that any query language that is tied to a specific DB schema would be short-lived. I totally agree that a query language would be extremely useful -- and I did submit a paper to FHISO about it some time ago -- but it would have to be abstracted from anything related to the current DB schema. If based on the underlying logical object model for Gramps then it would survive future enhancements more easily, and would find application in more diverse situations.

Yes, perhaps when I first made the QueryQuickview. The demo here was largely a test to see how one could use any Gramps code outside of the Gramps Gtk GUI. (There were a couple of technical issues to fix to make this possible. But now, Gramps can be used as a library for other Python projects.) 

You hit the nail on the head: One could make a generic query language that operated on the abstract concepts, independent of implementation details. Or, one could make a implementation-specific, no abstraction, minimal query system. The former could be generically used across different models, but would require each model to have a mapping from details to abstractions; the latter (like SQL) needs to only know the schema. The latter is what this is. 

Perhaps one could build a abstraction on top of this. The practical trade-off: allow user's queries to work over time, or require them to update their queries when the schema changes. Also, I don't know how to easily build an abstract query system. I should read your paper! You have a link?

-Doug

 
 
    Tony Proctor
----- Original Message -----
Sent: Wednesday, February 18, 2015 2:42 AM
Subject: [Gramps-users] Gramps with a query language

Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

paul womack
In reply to this post by DS Blank
Doug Blank wrote:

> On Wed, Feb 18, 2015 at 8:08 AM, paul womack <[hidden email] <mailto:[hidden email]>> wrote:
>
>     It's possible we have different goals. I'm trying to extend and generalise the current filtering model, you're trying to replace it!
>
>
> I don't want to replace the current filtering system, but provide an alternative method. I could imagine that Query would be just another kind of filter. You would just need to specify what "table" (eg, person, place, event) and the "where clause". After that, it is just another subset of the data.
>
>
>     My suggestions, whilst expressed as changes to the stored queries in XML, are a (fairly...) natural extension to both the
>     codebase and GUI model in Gramps.
>
>     You don't need to be programmer to use my idea (although it probably helps)
>
>
> I guess your idea is about an interface for easily constructing filters composed of filters? If so, that sounds useful, and is independent to a Gramps query language. Although the idea of combining filters with a query language sounds quite powerful.

Well, at heart my idea is about an object-model, where filters can contain other filters, instead of referring to other filters only by name.

This doesn't seem a big jump from the current model/code (to me).

The XML representation and the GUI for display/manipulation are consequent on this.

I chose to present the XML form in the emails, since it seems to represent the concept
(especially containment/nesting) very clearly.

  BugBear


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

ACProctor
In reply to this post by DS Blank

Here's the link to that old paper Doug: http://fhiso.org/files/cfp/cfps19.pdf.
 
The beauty is that it the model can be programmed-against directly (e.g. from specialised applications wanting to access a Gramps DB), or accessed by users from scripting languages, or even built into a custom scripting tool/addon associated with Gramps. The syntax for any object-based access is also much cleaner than a SQL-like language, and (IMHO) would be more accessible to non-programmers.
 
In the paper, I also suggested it could be used for concepts akin to 'stored procedures', although that's really more of an issue for remote data sources such as when accessing them over a communications link or the Internet.
 
    Tony
----- Original Message -----
Sent: Wednesday, February 18, 2015 1:37 PM
Subject: Re: [Gramps-users] Gramps with a query language

On Wed, Feb 18, 2015 at 8:20 AM, Tony Proctor <[hidden email]> wrote:
I seem to remember this subject being discussed on a Gramps mailing list before. The point I made then was that any query language that is tied to a specific DB schema would be short-lived. I totally agree that a query language would be extremely useful -- and I did submit a paper to FHISO about it some time ago -- but it would have to be abstracted from anything related to the current DB schema. If based on the underlying logical object model for Gramps then it would survive future enhancements more easily, and would find application in more diverse situations.

Yes, perhaps when I first made the QueryQuickview. The demo here was largely a test to see how one could use any Gramps code outside of the Gramps Gtk GUI. (There were a couple of technical issues to fix to make this possible. But now, Gramps can be used as a library for other Python projects.) 

You hit the nail on the head: One could make a generic query language that operated on the abstract concepts, independent of implementation details. Or, one could make a implementation-specific, no abstraction, minimal query system. The former could be generically used across different models, but would require each model to have a mapping from details to abstractions; the latter (like SQL) needs to only know the schema. The latter is what this is. 

Perhaps one could build a abstraction on top of this. The practical trade-off: allow user's queries to work over time, or require them to update their queries when the schema changes. Also, I don't know how to easily build an abstract query system. I should read your paper! You have a link?

-Doug

 
 
    Tony Proctor
----- Original Message -----
Sent: Wednesday, February 18, 2015 2:42 AM
Subject: [Gramps-users] Gramps with a query language

Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

Ron Johnson
In reply to this post by DS Blank
+1

On 02/17/2015 09:55 PM, Pat Clark wrote:
Great idea, Doug.

I'm all for it if it can be used instead of filters.
I find SQL much less mystifying than working out filters.

Pat

On 18/02/15 13:12, Doug Blank wrote:
Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


-- 
My word, man!  Don't you know your quantum statistics?

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

Gerhard Killesreiter
In reply to this post by DS Blank
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 18.02.2015 um 13:55 schrieb Doug Blank:

> On Wed, Feb 18, 2015 at 4:19 AM, Nicholas Robinson
> <[hidden email]> wrote:
>
>> Hi
>>
>> I would be interested. I would also be interested in getting a
>> port of my gramps database into a graphical database like neo4j
>> to do some querying. Nick
>>
>
> I guess the idea here is that you wouldn't need to export your data
> to some other system, but could do it in Gramps.
>
> (If neo4j can import JSON data, then you could fairly easily export
> from Gramps. Or use the already existing SQL exports).
>

There are python bindings for neo4j IIRC so it would be feasible for
somebody with python experience to create a bridge to or from gramps.

I wouldn't mind to be able to just get my data throught XML into neo4j
and process it there.



Cheers,
Gerhard

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlTkvKoACgkQfg6TFvELooTyFACdFJ5H9aQZ9VcocOcH4PQ0fzjC
nsMAn3zgSt2xj8X9NfcfYtLlC6XL0pBF
=tjeq
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

enno
In reply to this post by ACProctor
Tony,
Here's the link to that old paper Doug: http://fhiso.org/files/cfp/cfps19.pdf.
 
The beauty is that it the model can be programmed-against directly (e.g. from specialised applications wanting to access a Gramps DB), or accessed by users from scripting languages, or even built into a custom scripting tool/addon associated with Gramps. The syntax for any object-based access is also much cleaner than a SQL-like language, and (IMHO) would be more accessible to non-programmers.
Yes, I agree with that, and the good thing with Gramps is that we already have a sort of object model, and we have a scripting language too, because that's what Gramps is written in: Python.

So in effect, with Dougs mods, a user can start a Python shell, import the Gramps database object library, open the database, and start scripting in an interactive mode. One can also create procedures in the interactive shell, and once they work, paste them to one's own Gramps procedure library. These are not stored in the database then, so they're not stored procedures in the literal sense.

regards,

Enno


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

enno
In reply to this post by DS Blank
Hi Doug,

>
> I'm wondering how many of you might find it useful to write little
> queries (like SQL) by hand, rather than using filters and reports in
> the standard Gramps GUI?
>
> For example, would you be interested in:
>
> * being able to get a simple listing of data that matched a criteria
> * being able to make batch changes
> * using your database in other ways
> * create filters based on these queries
I am very interested in a tool like that, because I'm looking for a way
to add FamilySearch IDs to all persons in my database. Gramps can not
communicate with the FamilySearch Family Tree today, and writing an
add-on for that is quite a task, partly because it involves
certification by FamilySearch, and because such thing has not been done
for any open source program yet. In fact, there is no usable license for
that at the moment.

Because of above limitations, I must now run a program like Ancestral
Quest or RootsMagic. They both run fine inside VirtualBox, but currently
there is no way to batch merge specific fields from a GEDCOM back into
Gramps.

For this, I would like to run a query like

update PERSON set FSFTID = $fsftid where UID = $uid;

which is the abstracted form. There are no columns named FSFTID or UID,
but their values can be stored in person attributes. The where clause
must therefore search for attributes with key '_UID', and value as
specified, and the set clause must first search for an existing
attribute with key '_FSFTID', and then check what is needed. If it does
not exist, it must be added, so I wonder whether this is still efficient
with an SQL like construct. For this, it may be better to follow Tony's
advice, and create a script on the existing or a modified database API.

I have already hacked an add-on to create UIDs for all persons in my
database, and I need that as a key, because the normal GEDCOM IDs may be
distorted in the transfer. The next step is either to code a simple
GEDCOM parser that reads no more than UIDs and FSFTIDs as written by AQ
or RM, or in the case of RM some code that reads its SQLite database.
The nicest for that would be a single query that does all the work, but
right now I assume that such a thing is not realistic, because there is
no way to have one SQL query parsed by two different pieces of database
code. I must therefore work with code that processed (new) FSFTIDs one
by one, and then runs the query summarized above.

Whether that is a good choice is something I don't know. Can you advise?

regards,

Enno


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Gramps with a query language

ACProctor
In reply to this post by ACProctor

Another issue that I forgot to mention, Doug, is the different semantics for data access. The semantics of a SQL date match (incl. searching) is not the same as a genealogical one. The semantics of a name match (incl. search) is not the same as a genealogical one. And so on...
 
Exposing 'methods' for these operations means that issues such as internationalisation, fall-back for diacritical marks, alternative names, place hierarchies, fuzzy dates, etc., can be neatly encapsulated.
 
    Tony
----- Original Message -----
Sent: Wednesday, February 18, 2015 1:51 PM
Subject: Re: [Gramps-users] Gramps with a query language

Here's the link to that old paper Doug: http://fhiso.org/files/cfp/cfps19.pdf.
 
The beauty is that it the model can be programmed-against directly (e.g. from specialised applications wanting to access a Gramps DB), or accessed by users from scripting languages, or even built into a custom scripting tool/addon associated with Gramps. The syntax for any object-based access is also much cleaner than a SQL-like language, and (IMHO) would be more accessible to non-programmers.
 
In the paper, I also suggested it could be used for concepts akin to 'stored procedures', although that's really more of an issue for remote data sources such as when accessing them over a communications link or the Internet.
 
    Tony
----- Original Message -----
Sent: Wednesday, February 18, 2015 1:37 PM
Subject: Re: [Gramps-users] Gramps with a query language

On Wed, Feb 18, 2015 at 8:20 AM, Tony Proctor <[hidden email]> wrote:
I seem to remember this subject being discussed on a Gramps mailing list before. The point I made then was that any query language that is tied to a specific DB schema would be short-lived. I totally agree that a query language would be extremely useful -- and I did submit a paper to FHISO about it some time ago -- but it would have to be abstracted from anything related to the current DB schema. If based on the underlying logical object model for Gramps then it would survive future enhancements more easily, and would find application in more diverse situations.

Yes, perhaps when I first made the QueryQuickview. The demo here was largely a test to see how one could use any Gramps code outside of the Gramps Gtk GUI. (There were a couple of technical issues to fix to make this possible. But now, Gramps can be used as a library for other Python projects.) 

You hit the nail on the head: One could make a generic query language that operated on the abstract concepts, independent of implementation details. Or, one could make a implementation-specific, no abstraction, minimal query system. The former could be generically used across different models, but would require each model to have a mapping from details to abstractions; the latter (like SQL) needs to only know the schema. The latter is what this is. 

Perhaps one could build a abstraction on top of this. The practical trade-off: allow user's queries to work over time, or require them to update their queries when the schema changes. Also, I don't know how to easily build an abstract query system. I should read your paper! You have a link?

-Doug

 
 
    Tony Proctor
----- Original Message -----
Sent: Wednesday, February 18, 2015 2:42 AM
Subject: [Gramps-users] Gramps with a query language

Gramps users,

I'm wondering how many of you might find it useful to write little queries (like SQL) by hand, rather than using filters and reports in the standard Gramps GUI?

For example, would you be interested in:

* being able to get a simple listing of data that matched a criteria
* being able to make batch changes
* using your database in other ways
* create filters based on these queries

I've made a little video that shows how this might work. Warning: this shows what a programmer would do, so it might not be for everyone:


(The ideas here are still a bit rough... there are a few things that are done manually.)

Please let me know if you might find something like this useful, or if you have other ideas.

Thanks!

-Doug


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users