Skip to content

Instantly share code, notes, and snippets.

@wallclimber21
wallclimber21 / eav.sql
Last active August 29, 2015 14:10 — forked from vwood/eav.sql
-- Entity Attribute Value Model in Postgres
CREATE TABLE public.entity (
id serial NOT NULL,
type varchar(25) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE public.defined_attributes (
key varchar(25) NOT NULL,