As of May 31, 2023, we have updated our Code of Conduct.

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.

Filter by
Sorted by
Tagged with
2 votes
3 answers

Schema-less data in a database?

I'm wondering if there's any database technology where its structure or schema does not need to be defined upfront? For example it may start off with just one column or row and the user will keep ...
Jeno's user avatar
  • 21
3 votes
3 answers

Field types database design best practice

I am creating a cms system where the user can create fields to use in the templates of the website. I want to create different types like 'string', 'html', 'integer' etc. The user must also have the ...
Jerodev's user avatar
  • 131
1 vote
2 answers

Database Design for Preserving Values and Additional columns

My colleague and I are having some trouble coming up with a database design, and I am doing my best to stay away from EAV for now. We have an entity called Preparation that stores configuration data ...
jmzagorski's user avatar
7 votes
2 answers

Efficient query for an advanced EAV model

I'm kind of stuck on how to build an effecient query which returns the data of the following EAV structure. Today, a product table already exists, containing 4 fixed fields. We want to upgrade the ...
Zeep's user avatar
  • 95
1 vote
1 answer

Horizontal schema vs Vertical schema

I am but a modest SQL DBA. I would like to request your advice on the design of the central part of our new proposed database. Brent Ozar had something to say about this: Building A SQL table ...
lpcoolee10's user avatar
6 votes
1 answer

Why is an additional filtered statistic being ignored (EAV schema)?

I'm trying to improve a row estimate for this sub-query (of a larger query). The estimate is showing 1266 rows. The actual is 117k rows. This particular property (EAV schema) only has two values ...
crokusek's user avatar
  • 2,036
13 votes
2 answers

Alternative to EAV for dynamic fields in a star schema data warehouse

I need to support dynamic fields and values in a big datawarehouse for storing API requests log, my user case is that I need to store all API requests query string and able to perform query against ...
Howard's user avatar
  • 249
3 votes
2 answers

EAV-like table with both primary column pointing to the same foreign column

Background: I'm a programmer who, while had to work with simple databases several times, never had to work with complex ones. I.e. I'm proficient with basic stuff, but clueless about advanced features ...
o0'.'s user avatar
  • 133
5 votes
1 answer

Help with "Flexible" vs Fixed Tables

We are designing a database in SQL Server to handle sales commissions. A diagram of the current schema looks like this: There are only a couple of us on the project, and our boss dropped this design ...
Zairja's user avatar
  • 215
0 votes
1 answer

What is the correct name and significance of EAV table pivot?

I've been forced to use a very uncomfortable structure for a table. After trying to up similar examples, I've discovered the EAV, which seems almost like a pivot of said structure. The attribute order ...
Worse_Username's user avatar
1 vote
1 answer

To EAV or not to EAV?

I am working on an application which records data from different forms. New forms can (and will be) constructed dynamically by an admin. I am wondering what would be the correct way to save this data ...
Bart's user avatar
  • 113
0 votes
1 answer

csv file handling

I am using an EAV like structure to store CSV files. There aren't any predetermined columns, so it needs to be able to expand the columns / data on demand. Is this a fairly good way of handling such a ...
Brian Putt's user avatar
2 votes
1 answer

Multi-variance products

My current system houses different variants of Products in different tables; Productgroups Productcolors Productsizes Productmodels Products can reside under 1 Productgroup and can have multi-...
User2910293's user avatar
6 votes
1 answer

EAV structure explained in Layman's terms

I've read several articles online that explain how EAV structures work, but there are different interpretations of them. Some articles mention that it's a representation of a data model metadata (or ...
Entree's user avatar
  • 2,072
0 votes
0 answers

When is should/shouldn't the Entity Attribute Value (EAV) pattern be used? [duplicate]

Possible Duplicate: Is there a name for this database structure? The Entity Attribute Value (EAV) pattern usually has three columns: foreign key, attribute, and value. Attributes of data are ...
user avatar
74 votes
5 answers

Is there a name for this database schema of key values?

We process a routine data feed from a client who just refactored their database from a form that seems familiar (one row per entity, one column per attribute) to one that seems unfamiliar to me (one ...
prototype's user avatar
  • 853
5 votes
2 answers

Solutions for reporting off of an EAV structured database?

Existing setup SQL Server 2005 with standard EAV table that users want to slice and dice with a BI tool (Cognos). Is there any hope that we can transform this data into a format that we can report ...
IronicMuffin's user avatar
6 votes
2 answers

Which is better for long term database scalability: adding columns or having key/value store

For application, which has few (5-10) settings at the moment but will have a lot more (up to 100) in the future which would be better approach: to add new columns to settings table every time new ...
valentinas's user avatar
11 votes
3 answers

Inventory database structure when inventory items have varying attributes

I'm building an inventory database to store enterprise hardware information. The devices the database keeps track of range from workstations, laptops, switches, routers, mobile phones, etc. I'm using ...
TheSecretSquad's user avatar
6 votes
1 answer

PostgreSQL versus MySQL for EAV structures storage

Is there any practical difference or what are the advantages of using Postgres 9.x versus MySQL 5.x for storing EAV (Entity-Attribute-Value) structures, especially in terms of read performance?
Alex's user avatar
  • 163
5 votes
3 answers

Optimizing query using view on EAV structure

An application is writing into a database that follows an EAV structure, similar to this: CREATE TABLE item ( id INTEGER PRIMARY KEY, description TEXT ); CREATE TABLE item_attr ( item ...
Bruno's user avatar
  • 1,487
4 votes
3 answers

Does separating VARCHAR values based on size have a performance gain?

I am working with a team that is trying to implement an EAV system. They have decided to split the attribute-value tables out by type and they are debating using different tables for different size ...
Justin Obney's user avatar

1 2