Dear Polaris Community, This email initiates a discussion regarding the modeling of Realms within the Polaris project, following its recent mention in my JDBC implementation pull request: https://github.com/apache/polaris/pull/1287/files#r2040383971.
My current understanding, based on available information, is that Realms were primarily intended for isolation. Consequently, the EclipseLink implementation treats each Realm as a separate database. As we are re-implementing this functionality, it was suggested that we gather community feedback on the optimal approach to modeling Realms. Based on my current understanding, here are potential modeling options: *1. Separate Databases per Realm:* - Each Realm would correspond to a distinct database. - This could be implemented using Quarkus custom data sources, with one data source per Realm. *2. Separate Schemas per Realm:* - Each Realm would correspond to a distinct database schema within a single database. - Most database systems support two-part identifiers ( <schema_name>.<table_name>), allowing for data isolation. *3. Realm as a Primary Key:* - A realm identifier would be added as a primary key (or part of a composite primary key) to each Polaris table. - Data isolation would be enforced through filtering based on this key during data access. The optimal approach will likely depend on ease of use and maintainability for database administrators. Please share your thoughts and preferences regarding these options. Best regards, Prashant Singh