CodeIgniter Forums

Full Version: More base models?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The current CI_Model assumes an RDB.
Should be have other models that could be extended, such as a NoSQL or a file directory model?

--------------------------------
Disclaimer: Putting forward an idea without implying any endorsement of it.
I voted "Maybe" on this one primarily because the model itself makes no assumption about the underlying data, which is, for the most part, a good thing. However, it would be nice if there was a data access layer which was not so strictly bound to a SQL database, so we could easily create models which used other data stores which may (or may not) eventually be migrated to a traditional SQL database.

Since the data access layer in CI is primarily accessed through $this->db, it's a little difficult to fully embrace the idea of simply extending what's already there (vs. creating some sort of replacement, perhaps with $this->db acting as a compatibility layer). On the other hand, replacing $this->db would create a nightmare for upgrading existing projects.
I'm also going with "maybe".  At this time, my designs all use an RDB and it has been years since a "flat-file" was useful (in my work).  That is not to say it may never happen, but it is rare.
[edit] missing word...