Hi Panagiota, You might also want to check the newer (and more complete) tutorial about Calcite that Julian Hyde and myself did in the context of the BOSS workshop [1, 2].
There is yet another variation of the tutorial [3], which might be more relevant to what you are looking for, that combines a NoSQL datasource (Lucene) and a typical RDBMS (HyperSQL) using multiple schemas. If you follow the slides it might help to check the commit history as you go. Unfortunately, no recording for this one. Ideally, I would like to merge [2, 3] together at some point but haven't had the chance yet. There is nothing preventing you from putting both databases into a single schema or creating deeply nested hierarchies. Schemas are used for namespacing. They can help you group similar concepts together, resolve naming conflicts etc. For instance, If you have tables with the same name in different databases it is convenient to put each database under each own schema to avoid the need to rename your tables etc. Best, Stamatis [1] https://youtu.be/meI0W12f_nw [2] https://github.com/zabetak/calcite-tutorial [3] https://github.com/zabetak/cy-calcite-tutorial On Fri, Jul 1, 2022 at 9:51 PM παναγιωτα χατζη <[email protected]> wrote: > Hello, > I recently watched the video of Stamatis Zampetakis ' An introduction to > query processing and Apache Calcite'. I followed the example provided in > the video tutorial and then I created a sample database of two tables to > test the code. First table contains sample employee data and second table > contains department data . I created a query in the parser as showed. My > question is the following. If i want to create two databases, so if I want > to add one more database how do I proceed with that? Do I need to have two > schemas? I have checked that there is a way adding a subschema into a > schema but because I am new with Java and Calcite a little help or advice > would be great. > I followed this GitHub link given by the video creator. > https://github.com/zabetak/calcite/blob/demo-january-2021/core/src/test/java/org/apache/calcite/examples/foodmart/java/EndToEndExampleBindable.java > The only thing that is different is the objects since I created my own > sample database and the query. > Looking forward to your reply, > Kind Regards,Panagiota Chatzi, Ph.D.
