• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Creating Multiple Tables in SQLite

neonblues

Lurker
How can i have multiple tables in sqlite?

and what is the trigger for for having multiple tables with Foreign Keys?

example i have a a database with 2 tables

classes -- _id, code, title, units
students -- _id, FKclass, name, course

do i need to create 2 separate database helper?
 
You only need one database helper. All table definitions are placed in the onCreate method. Create your own methods for inserting/selecting/updating each of the tables.
 
Back
Top Bottom