On Friday, March 29, 2019 at 4:39:40 AM UTC-4, Xavier Bustamante Talavera wrote: > > > @Ibrahima and @Jonathan, as I understand you are talking about something > like the Entity–Attribute–Value model > <https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model>, > adapted to the multi-tenant case. In my case the data comes form an API in > JSON, so although there is not a special strong case towards this pattern, > I think I will be using a JSON type. >
Yes! That's the name, I could not remember it. I would definitely use JSON instead of EAV due to it's ease of use and overall performance. FWIW, There are two main variations of the EAV pattern I've seen: normalizing the values into their own table & using a table that just has attribute id + value id (Ibrahima's suggestion, i think), and just doing a an attribute id + value table (what I was alluding to). in my experience, the scale of multi tenant applications tends to make the fully normalized implementation incredibly slow, so i just don't bother with it anymore. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.