-2

I'm building a native app tha all its entities should commadate in sqlite database. I was looking over to find a decent ORM tool for android that whould be similar to the CoreData of the Iphone(which supports graphical design and code generation).

I would like to build my entities code according to the graphic design.

Nativ
  • 3,092
  • 6
  • 38
  • 69

2 Answers2

2

If it is just about creating and managing the database and you can use SQLite, then take a look at this page:

List of Management Tools for SQLite

There are a lot of tools listet, that work with SQLite and there should certainly be one that suits your need.

Also, I think you are using the wrong term with ORM. What you want is a management tool, where you can build your DB with a designer. An ORM system is basically a mapper between your database and your programming language. ORM would come in to play, when you want to represent your database in code.

See the description from wikipedia:

Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to create their own ORM tools.

Wikipedia page on ORM

tom van green
  • 1,674
  • 10
  • 14
  • 1
    Yeah actually I'm looking for ORM because I want a tool that generates the code from the Module. I understand that there isn't such a tool for Android. After a long research I studied that this operation can be divided to three separate actions (1) Building the module in some tool like Microsoft Access/Sqlite Studio/Navicat – Nativ Sep 03 '12 at 09:09
  • (2) Using this module to write the Android java code(that corresponds with some "Code generated tool" that takes the module's code and build java code, E.G entity becomes class..for example I heard about GreenDao, SqliteGen..) (3) start the code generator and WALLA(1) you have java code for you sqllite DB – Nativ Sep 03 '12 at 09:10
  • Maybe you should not look into android specific tools, but java might have something... I'm not sure how well java works on android (or if it works at all)... I googled a bit and what I found is this: http://ormlite.com/sqlite_java_android_orm.shtml ... It looks like it is based on the code first principle (create the classes and the system generates your db). – tom van green Sep 04 '12 at 07:56
0

While there are a few (SQLite) ORM Libraries around for Android, there is, to my knowledge, no graphical tool which outputs Java Classes tailored for an arbitrary ORM Class template. ORMs in Java tend to use @Annotations to wrap the given fields from the DB and every ORM pretty much has their own style.

Therefore I would recommend laying out a blueprint of your intended DB (eventually within a Modelling Application) and try to recreate it using the chosen ORM's specific API. Hope this helps you!

Community
  • 1
  • 1
Dr1Ku
  • 2,875
  • 3
  • 47
  • 56
  • Thanks, to bad..Kind of jealous on the Iphone developers – Nativ Sep 03 '12 at 08:02
  • 1
    Do not be so jealous. In this field, there are few unique silver bullets, even if most tools look like silver bullets from afar initially. Also, I'd be willing to bet you could use CoreData (assuming you use a Mac) to generate your database and relational schema and export just the model/SQLite part to another ORM. And re-import the SQLite database into CoreData every time you needed to make major revision to its structure/relations. Doing that should give you a sense of how easy/difficult CoreData is to use (which honestly, I do not even know myself, since I've never used CoreData) . – Stephan Branczyk Sep 03 '12 at 19:33