For the More Curious: More Databases

For the sake of space and simplicity, we do not go into all the details you might see in a professional app’s application database here. There is a reason people resort to tools like ORMs: this stuff can get complicated.

For a more substantial application you will want to look into adding the following to your database and your description of it:

  • Data types on columns. Technically, SQLite does not have typed columns, so you can get by without them. Giving SQLite hints is kinder, though.

  • Indexes. Queries against columns with appropriate indexes are much faster than columns without them.

  • Foreign keys. Your database here only has one table, but associated data would need foreign key constraints, ...

Get Android Programming: The Big Nerd Ranch Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.