• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLite using app

 
Rehan Zahoor
Ranch Hand
Posts: 83
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not found an android app that creates a relational database. Although we have SQLite on the back end. Is SQLite a complete relational database that offers all P.key, foreign key and table relationships. Because if it is then it does not make sense that there is no such app available where complete relational database can be created by the user.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lots of Android apps create DBs. See http://developer.android.com/guide/topics/data/data-storage.html#db for how to do that. Search your local Android SDK installation for the NotePad and SearchableDictionary code examples mentioned on that page.
 
Rehan Zahoor
Ranch Hand
Posts: 83
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the example, table seems to be created without a primar key mentioned.This seems strange to me in a relational database. Is SQLite a relational database?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is. That's just a simple example, maybe it doesn't need a PKEY. If you look at the source code of the NotePad example I mentioned, it creates a table that does have a PKEY.
 
Ron McLeod
Bartender
Pie
Posts: 1027
64
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rehan Zahoor wrote:Is SQLite a complete relational database that offers all P.key, foreign key and table relationships.

Yes -- SQLite supports primary keys and foreign key relationships.
 
Ron McLeod
Bartender
Pie
Posts: 1027
64
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron McLeod wrote:SQLite supports primary keys and foreign key relationships.

Foreign key support was added in SQLite version 3.6.19 so it should be available in Android SDK 8 (Froyo) or later.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic