Data encompasses three major types of functionality:
- CRUD: Database reads/writes including those of the type performed by cfinsert/cfupdate
- ActiveSchema: The ability for your code to define your database structure. DataMgr can introspect the database structure or it can define it.
- Prototyping: The ability to use simulated data for prototyping (much like QuerySim, but more powerful and less work).
DataMgr is different from other available options because it doesn't generate any code. It isn't an ORM solution, but you could easily build an ORM solution on top of it.
The syntax for using DataMgr is the same for any supported database and you can add support for a new database by adding a new CFC (about 250-300 lines of code, on average). DataMgr currently supports the following:
- MS Access '97+
- MySQL 4.1+
- PostGreSQL 8+
- SQL Server 2000+
If you want to upgrade from DataMgr 1.X, copy the new DataMgr files over the existing DataMgr files and then reload the DataMgr component and any components that use it (usually via ?reinit=1 or some such). No change in syntax is required.
DataMgr only incurs a minimal performance overhead when compared to SQL in cfquery.
Built into DataMgr's CRUD functions are better error handling (no more "String or binary data would be truncated" errors) and automatic conversion of special MS Word characters to their ASCII equivalents.
DataMgr can introspect your database or you can define your table structure and have DataMgr create it. You can even have DataMgr create tables with data.
In addition to the supported databases, you can also use a simulated database. This effectively creates QuerySim-like queries without having to type out any data (using table definitions as above).