2

I mean, by liquid classes like having Attribute.java

String name;
Object Value;
Long entityId;

And implementing User.java like:

Set<Attribute> attributes;
Long id;

Or Concrete classes implementation of User.java

String realName;
String displayedName;
Int score;    
Long id;

Which one is effective by database concepts and OOP concepts?

Mohsen Heydari
  • 7,256
  • 4
  • 31
  • 46
merveotesi
  • 2,145
  • 15
  • 53
  • 84

1 Answers1

3

That depends on to the problem domain you are trying to solve.

If you are going to use liquid approach (Entity–attribute–value_model) on a problem like logging other entities changes, that would be a good approach.
If the EVA approaches is going to be applied on relational data model that JOINs are inevitable part of queries, using EVA would be an anti pattern.

Community
  • 1
  • 1
Mohsen Heydari
  • 7,256
  • 4
  • 31
  • 46