Skip to content

The data model why its important

aalbino edited this page Nov 21, 2010 · 4 revisions

The data model, why it's important

As per wikipedia: "A data model is used to organize data.[...]"

In order to avoid repetitive and unmaintainable SQL queries all over the code base, we simply organize our queries into the appropriate data model.

For example, if we have a query that counts the total amount of articles in our database, and we have another query that retrieves a single article, those two queries would belong in an data model named 'articles'.

NOTE: We use the Zend_Db_Table component of the Zend Framework as the representation of our model(s) in our MVC pattern. Our models are NOT, however, located in the default location specified in the Zend Framework documentation. Our application specific data models are located in /library/Zre/Dataset/Model/*

Links

Clone this wiki locally