14.06.2013 Views

Databases and Systems

Databases and Systems

Databases and Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

114<br />

AI in the form of LISP association lists (20). Subsequently, they have been used for<br />

applications as diverse as Clinical Data Repositories (21) <strong>and</strong> are the basis for the<br />

structure of Web cookies (22) <strong>and</strong> the Microsoft Windows Registry, as well as<br />

various tagged formats for data interchange, such as ASN.l (23). We have<br />

implemented an EAV design in ACT/DB a production system for managing clinical<br />

trials data (24).<br />

Conceptually, in an EAV design, we have a table with three columns, Entity ID<br />

(Object ID), Attribute (or Attribute ID) <strong>and</strong> the Value for the attribute. Thus, one<br />

describes an object through several rows in a table, one row per Attribute-Value pair.<br />

Thus, to record information about the enzyme "Cholinesterase" (object ID 250),<br />

which destroys the neurotransmitter Acetylcholine by hydrolysis, one might have the<br />

following rows:<br />

<br />

<br />

<br />

...<br />

Attributes are analogous to fields in a conventional table. In the examples, all<br />

values are strings. In practice, relational databases are strongly typed. Rather than<br />

have a single EAV table (with the Values coerced into string form) it is often<br />

advantage to segregating values into separate EAV tables based on their intrinsic<br />

datatype, for the following reasons.<br />

One can improve retrieval performance by creating an index on a combination of<br />

the attribute <strong>and</strong> value fields, to permit queries based on the values of the<br />

attribute. (Indexes on numeric fields stored in string form are essentially useless<br />

because of a different collating order.)<br />

One can create EAV tables to hold values that are long text (e.g., sequences, or<br />

PDF data) or BLOB data (such as vector graphics or photographic images). The<br />

ACT/DB system uses six EAV tables for integer, float, string, date, long text <strong>and</strong><br />

BLOB data.<br />

The success of an EAV system depends critically on the supporting metadata. We<br />

describe our metaschema in Figure 2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!