talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

SQL code snippets?

WW
William Wolf
Fri, Dec 16, 2016 5:32 PM

Hi,

I have recently tackled doing some basic reports and while I am an SQL expert and able to get the basics done, I find the Nuxeo schema is tough when it comes to digging out some values like physical measurements/dimensions.

I've read through this: https://issues.collectionspace.org/browse/CSPACE-6879

And I used Aron Roberts article and tutorials including this: https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases

and it was very helpful.  If you know of any implementers sharing more SQL code for reporting purposes would you let me know ?  It would save me a lot of time.

As far as creating an abstraction layer I anticipate creating and sharing with all of you some 'views' in postgres that will encapsulate the more difficult SQL.  Then the reports can just be based on easy SQL selections/joins from those views; and not having to keep joining back to the hierarchy table with reporting SQL.

Willi Wolf

Hi, I have recently tackled doing some basic reports and while I am an SQL expert and able to get the basics done, I find the Nuxeo schema is tough when it comes to digging out some values like physical measurements/dimensions. I've read through this: https://issues.collectionspace.org/browse/CSPACE-6879 And I used Aron Roberts article and tutorials including this: https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases and it was very helpful. If you know of any implementers sharing more SQL code for reporting purposes would you let me know ? It would save me a lot of time. As far as creating an abstraction layer I anticipate creating and sharing with all of you some 'views' in postgres that will encapsulate the more difficult SQL. Then the reports can just be based on easy SQL selections/joins from those views; and not having to keep joining back to the hierarchy table with reporting SQL. Willi Wolf