Questions tagged [eav]

Entity-Attribute-Value. A data model with a potentially big number of attributes of which only few apply to a single entity.

31 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
98 views

Optimality of Columns vs. Complementary Table in MySQL

I'm starting work on a project where I'll have a table of entries as well as a table of descriptors. The entries will be updated infrequently, if ever, and the descriptors table will be largely ...
Cameron Sumpter's user avatar
2 votes
0 answers
133 views

EAV with very few of each entity

I have data that fits an entity-attribute-value structure but with very few entries (same attributes but different values) per entity. The main characterizations of my data are as follows: ~700 ...
user3747260's user avatar
2 votes
0 answers
424 views

Migrating schema from Entity-Attribute-Value (EAV) model to proper tables

I have an Entity-Attribute-Value (EAV) database in Oracle 11. For many, many reasons, I would like to model this using actual tables. Changing all the client code at once is not possible. Existing ...
WW.'s user avatar
  • 131
1 vote
1 answer
78 views

Table filtered for multiple column: eav support table can be the best solution for search performance improvement?

I have a table with 10~15 columns (some varchar, some int, some double, and some date). Table can contain tens of millions of records. User can filter from all columns using all filter operator (equal,...
Claudio's user avatar
  • 11
1 vote
0 answers
2k views

Choosing between Entity-Attribute-Value or JSONB representations

I must store multiple types of documents in my Postgres database. I know the schema of each particular document type, I know what fields will be present. So, in theory, I could create a separate table ...
Daniel Díaz Carrete's user avatar
1 vote
0 answers
160 views

E-A-V entity Attribute Value Generic Model with Min Max Values

I have an entity consisting of several attributes (can be added, can be removed from entity - and new attributes made as well). I need to be able to store the values - so for example I have a list of ...
StixO's user avatar
  • 167
1 vote
0 answers
116 views

Is EAV a good choice for scenario when the number of fields may differ client to client?

Suppose that you are developing an application that could be used by multiple clients. You have to store "basic details" of an employee of a company (your client) into your database. The first 15 ...
SamuraiJack's user avatar
1 vote
1 answer
32 views

SQL to merge related documents into 1 query row (MySQL)

I'm working with the following data structure: users | field| value | --- | --- | id | 123 | email| [email protected] fields | field |value | --- |--- | parentId |123 -> users.id | ...
Tom Maitland's user avatar
1 vote
1 answer
1k views

Database Design - Custom Attributes / Columns

So I'm trying to figure out the best way to go about handling this database design wise. This is a rough idea of how I THINK it should go, but not really sure. If I have orders that have their own ...
smb's user avatar
  • 143
1 vote
0 answers
131 views

how to edit kvp data as crosstab/pivot

I am keeping data in key/value pairs. I know how to convert that data into crosstab form using queries like this: <!-- language: lang-sql --> SELECT master.tag, MAX(CASE WHEN data.key = ...
pppp's user avatar
  • 11
1 vote
0 answers
792 views

Alternative to EAV to store data with an unknown structure

For my bachelor thesis I have to build a reseach database which has to meet the requirement of provenance. In the present case it means that among other things I have to store the results of my ...
Drudge's user avatar
  • 111
1 vote
2 answers
2k views

Mysql: Create a view with multiple self joins without duplicates in result

Just to clarify i can't change the tables structure, so please leave out the "you should change your tables to this and that" answers, thank you. So i have a table entities_attributes_values where an ...
Mr. Sam's user avatar
  • 111
0 votes
1 answer
155 views

EAV or JSONB column for dynamic data that needs good indexing

I have some data in a Postgres database that does not fit into a static schema. There is a table "content" and each piece of content has a user-defined type. Each type can have different ...
Fabian's user avatar
  • 103
0 votes
1 answer
93 views

Products multiple variants

My query looks like: select p.id, p.name, vo.value, v.name from products p join products_variant_options pvo on pvo.product_id = p.id join variant_options vo on vo.id = pvo.variant_option_id join ...
kicaj's user avatar
  • 123
0 votes
1 answer
82 views

Store different data of the same format in one table, or multiple tables of the same format?

Consider I have the following MySQL tables: products id | created_at | updated_at | name | description | barcode stores id | created_at | updated_at | name | description | address product_attributes ...
user2190492's user avatar
0 votes
0 answers
87 views

Store mutiple values for same entity and attribute in EAV

Beginner to eav model,I am having an entity table,attribute table and value table. Entity Table |entity_id|entity_name| Attribute table |attribute_id|attribute_name| value table: |entity_id|...
Atchaya's user avatar
0 votes
0 answers
88 views

Is it good to join on different tables depending on discrimination column?

I want to build a MySQL database with different trading card, all belonging to different games. Each card, depending on the game, has several properties. For example : A Magic: The Gathering card has ...
Altherius's user avatar
  • 101
0 votes
0 answers
941 views

Flatten multiple rows from One to Many to single row

This questions is similar to what I need but the answer seems rather specific to the question rather than a general answer. One to many relationship query result in a single row and dynamic multiple ...
Marc-9's user avatar
  • 23
0 votes
1 answer
129 views

EAV, multiple left join query optimisation

Any assitance would be greatly welcomed. Pardon my ignorance however I am wondering if anyone else has had to encounter bad EAV performance issues. I have a particular query which takes a long time. ...
funnypeople's user avatar
0 votes
0 answers
863 views

Is it practical to use entity-attribute-value (EAV) model to support custom user fields and avoid bloating of tables?

I am currently working on a medium-sized web app project that is already in production using Laravel framework and MySQL 5.6.40. My clients have been asking for the ability to add additional ...
Helioarch's user avatar
  • 101
0 votes
1 answer
53 views

How is it possible to model in a database many different products?

For example, a smartphone might have attributes such as RAM and camera resolution, whereas a fridge has way different attributes. Is there a way to store these data in a relational database?
theodosis's user avatar
  • 101
0 votes
1 answer
130 views

How to store a bunch of columns and where you don't know how many there will be, the columns change, and new columns are introduced

So the so source of the data is the internet, and random bots that submit values to my apache server. Periodically new columns appear, but they are not always present. The other problem is then you ...
cybernard's user avatar
  • 141
0 votes
1 answer
90 views

How to find an entry from filtering with two associated tables

This questions has spinned off of another question I probably did not ask correctly from the get go. I have some tables, where attributes and attributes_entries that hold a pair of dynamic values for ...
gstlouis's user avatar
0 votes
0 answers
42 views

MySQL Query to Display Organized by Date

I'm good with basic types of queries but this has me stumped. I have the table schema listed below, I need display the results in a table, with each row displaying the available results for a given ...
Shane Da Silva's user avatar
0 votes
2 answers
151 views

I would like to get a unique based on email address (MySQL)

I can work on basic queries and have been having a bit of trouble the way Wordpress stores their database information. The below query I have been using to download all form submissions for contests ...
kaykills's user avatar
0 votes
1 answer
279 views

MYSQL Multiple table optimization for advanced search

I have a users table where there is the basic information of each user: CREATE TABLE `users` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `account_type` varchar(10) NOT NULL, `email` varchar(...
Jake's user avatar
  • 1
0 votes
1 answer
85 views

How best to store complex cost information

I am creating a database to store data related to costs. The cost information can be very varied and I won't be able to fully determine all possible columns currently. An example piece of data might ...
Domronic's user avatar
0 votes
1 answer
60 views

DB Design - 1 column for each dataset OR dataset_name AND dataset_value?

I am creating a database table for storing numeric time-series data sets regarding cities that will be accessed via a web app. Primarily annual, quarterly and monthly data will be stored in it. ...
Cato Minor's user avatar
0 votes
2 answers
1k views

Store parameters of various types

I am a (poor, young) scientist working to develop a database to allow a project to scale up. I am experimenting with MySQL and have had very encouraging experiences so far, but I am still novice and ...
Chris Cox's user avatar
0 votes
1 answer
276 views

EAV table question

What's the best design for taxonomies in EAV tables? taxonomy id autoincrement name unique terms id autoincrement tax_id references taxonomy(id) name text unique value text ...
user61637's user avatar
-1 votes
2 answers
141 views

Designing a schema for an entity with 40 attributes

I am having a doubt on designing a schema for my current project in MySQL. It is mainly because there is an entity that I made and has 40 attributes. The table/entity X contain of fields like: ...
Pragmaticoder's user avatar