Tallan's Blog

Tallan’s Experts Share Their Knowledge on Technology, Trends and Solutions to Business Challenges

Posts Tagged "ORM"

Android Database Modeling Made Easy with GreenDAO ORM

Rob Rastelli

Recently I attempted to create an application that worked in an “Offline” mode.  However one of the biggest hurdles I encountered was maintaining the data model throughout development.  As most projects go, the definition of the database tables changed frequently, and maintaining the structure became a tangled mess of version numbers, alter statements and data migration scripts.  In trying to solve for this problem and adhere to good practices, I created classes that stored my column names and indexes so I could later read them back from the cursor.  Trying to add columns, though proved to be very code intensive.
After scrapping the idea due to a tight time line, I began researching other solutions in the JAVA/Android community.  I came across GreenDAO ORM (http://greendao-orm.com/).  It is a complete code generation which allows you to generate your data model without having to…

\\\