DBIx::EAV::Manual - Users Manual
EAV is a data model where instead of representing each entity using a physical table with columns representing its attributes, everything is stored as rows of the eav tables. Each entity is stored as a row of the 'entities' table, and each of its attributes values are stored as a row of one of the values table. There is one value table for each data type.
For a better explanation of what an Entity-Attribute-Value data model is, check this Wikipedia article. The specific tables used by this implementation are described in "TABLES" in DBIx::EAV::Schema.
EAV modeling has been used by health and clinical software by decades because the number of possible attributes like tests results and diagnostics are huge and just a few of those attributes are acctualy filled (non-NULL).
E-commerce solutions use EAV modeling to allow the definition of any kind of product and still be able to do filtering/sorting of results based of product attributes. For example, the entity 'HardDrive' would have atrributes 'capacity' and 'rpm', while entity 'Monitor' would have attributes 'resolution' and 'contrast_ratio'.
Many SaaS platforms use EAV modeling to offer database services to its custormers, without exposing the physical database system.
An open-schema data model can be useful for app prototyping.
An EntityType is the blueprint of an entity. Like a Class in OOP. Each type has a unique name, one or more attributes and zero or more relationships. See DBIx::EAV::EntityType.
An actual entity record (of some type) that has its own id and attribute values. See DBIx::EAV::Entity.
Attributes are analogous to columns in traditional database modeling. Its the actual named properties that describes an entity type. Every attribute has a unique name and a data type. Unlike traditional table columns, adding/removing attributes to an existing entity type is very easy and cheap.
The actual attribute data stored in one of the value tables. There is one value table for each data type. See "data_types", DBIx::EAV::Schema.
Concept borrowed from DBIx::Class, a ResultSet represents a query used for fetching a set of entities of a type, as well as other CRUD operations on multiple entities.
This is the actual database tables used by the EAV system. Its represented by DBIx::EAV::Schema.
Its the total set of Entity Types registered on the system, which form the actual application business model. See "register_types".
A Cursor is used internally by the ResultSet to prepare, execute and traverse through SELECT queries.
Copyright (C) Carlos Fernando Avila Gratz.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Carlos Fernando Avila Gratz <cafe@kreato.com.br>
To install DBIx::EAV, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::EAV
CPAN shell
perl -MCPAN -e shell install DBIx::EAV
For more information on module installation, please visit the detailed CPAN module installation guide.