Re: Schema Questions

2020-05-12 Thread Evgenii Zhuravlev
There is no way to define nested collection of addresses as SQL fields. The problem is that there is no such types in JDBC, so, it just won't work. So, if you want to use SQL, just have separate tables for these objects. вт, 12 мая 2020 г. в 06:07, narges saleh : > Thanks Evgenii. > My next

Re: Schema Questions

2020-05-12 Thread narges saleh
Thanks Evgenii. My next two questions are, assuming I go with option 1.1: 1) How do I define these nested addresses via query entities, assuming, I'd use binaryobjects when inserting. There can be multiple primary addresses and secondary addresses. E.g., {john,{primary-address:[addr1, addr2],

Re: Schema Questions

2020-05-11 Thread Evgenii Zhuravlev
Hi, The main question here is how you want to use this data. Do you use SQL? 1) It depends on the use case. If you plan to access only a person object without any filtering by addresses and you will always need the entire object, it makes sense to have one big object. But in this case, you won't

Schema Questions

2020-05-11 Thread narges saleh
Hi All, I would appreciate your feedback, for the following, in terms of performance for both inserts and queries. 1) Which one of these patterns is preferable for the table design? A- Have a fat table/cache with nested objects, e.g. person table with a hashmap of addresses. B- Have person and