Database Reference
In-Depth Information
catalog_product_entity
entity_id
entity_type_id
attribute_set_id
type_id
sku
int(11)
int(5)
int(5)
varchar(32)
ivarchar(64)
catalog_product_entity_datetime
int(11)
smallint(5)
smallint(5)
smallint(5)
int(10)
datetime
value_id
entity_type_id
attribute_id
store_id
entity_id
value
catalog_product_entity_decimal
int(11)
smallint(5)
smallint(5)
smallint(5)
int(10)
decimal(12, 4)
value_id
entity_type_id
attribute_id
store_id
entity_id
value
catalog_product_entity_int
int(11)
smallint(5)
smallint(5)
smallint(5)
int(10)
int(11)
value_id
entity_type_id
attribute_id
store_id
entity_id
value
catalog_product_entity_text
int(11)
smallint(5)
smallint(5)
smallint(5)
int(10)
text
value_id
entity_type_id
attribute_id
store_id
entity_id
value
catalog_product_entity_varchar
int(11)
smallint(5)
smallint(5)
smallint(5)
int(10)
varchar(255)
value_id
entity_type_id
attribute_id
store_id
entity_id
value
Figure 1.2 A portion of the schema for
the PHP e-commerce project Magento.
These tables facilitate dynamic attribute
creation for products.
an administrator to define additional product types and their attributes, but the result
is significant complexity. Think about firing up the MySQL shell to examine or update
a product modeled in this way; the SQL joins required to assemble the product would
be enormously complex. Modeled as a document, no join is required, and new attri-
butes can be added dynamically.
1.2.2
Ad hoc queries
To s a y t h a t a s y s t e m s u p p o r t s a d h o c q u e r i e s i s t o s a y t h a t i t 's n o t n e c e s s a r y t o d e f i n e i n
advance what sorts of queries the system will accept. Relational databases have this
property; they will faithfully execute any well-formed SQL query with any number of
conditions. Ad hoc queries are easy to take for granted if the only databases you've
Search WWH ::




Custom Search