Data Modeling - Generic Data Model

1 - About

You can represent any object in a database using just four tables. It's well known as the generic data model.

Good for the flexibility but not good for the database performance and for the simplicity of the SQL statement.

3 - Data Model

CREATE TABLE objects ( oid int primary key, name VARCHAR2(255) );
 
CREATE TABLE attributes 
( attrId int primary key, attrName VARCHAR2(255), 
datatype VARCHAR2(25) );
 
CREATE TABLE object_Attributes 
( oid int, attrId int, VALUE VARCHAR2(4000), 
primary key(oid,attrId) );
 
CREATE TABLE Links ( oid1 int, oid2 int, 
primary key (oid1, oid2) );

4 - Documentation / Reference

  • Bookmark "Data Modeling - Generic Data Model" at del.icio.us
  • Bookmark "Data Modeling - Generic Data Model" at Digg
  • Bookmark "Data Modeling - Generic Data Model" at Ask
  • Bookmark "Data Modeling - Generic Data Model" at Google
  • Bookmark "Data Modeling - Generic Data Model" at StumbleUpon
  • Bookmark "Data Modeling - Generic Data Model" at Technorati
  • Bookmark "Data Modeling - Generic Data Model" at Live Bookmarks
  • Bookmark "Data Modeling - Generic Data Model" at Yahoo! Myweb
  • Bookmark "Data Modeling - Generic Data Model" at Facebook
  • Bookmark "Data Modeling - Generic Data Model" at Yahoo! Bookmarks
  • Bookmark "Data Modeling - Generic Data Model" at Twitter
  • Bookmark "Data Modeling - Generic Data Model" at myAOL
data_modeling/data_model_generic.txt ยท Last modified: 2012/07/17 21:43 by gerardnico