Op 14/04/2017 om 19:03 schreef Rj
Ewing:
We do know
where we want to end up. We've had the application running for
a while using a triple store db. We're looking to move away
from the triple store due to performance issues. Our core
concept is that each project can define a set of entities and
their relations. Each entity has a set of attributes. We need
to be able to efficiently run ad-hoc queries across multiple
entities in a project, filtering via the attribute values
What kind of queries are you talking about?
I think our
business needs probably eliminate the possibility of data
integrity at the db level. We currently do application level
data validation.
Application level checks can only be done if you exclusively lock
the database from before you start the check until the moment you
nolonger need the certainty.
That's usually a no-go because it makes your data single-user for
the duration of the check.
Regarding EAV,
is there a good way to do this? Most everything I read online
says that EAV is a terrible idea and performance is lack
luster. However there are 6NF advocators who say that done
right, it is highly performant. Are there any articles on the
correct way to implement EAV?
Performance always depends entirely on what you are doing with it,
and on what scale. This is something that you should experiment
with.
would jsonb or
eav likely provide better query performance?
Can't tell without more information about what you actually do with
the data.
But dynamic schemas can be just fine, as long as your application is
100% in control over what can and cannot be done,
and as long as you use separate databases per
customer/project/whatever. You will probably want to scale up at
some point
and move customers to different servers, so you might aswell take
that into account before you start.
|