Join David Gassner for an in-depth discussion in this video Working with multiple database tables, part of Android SDK: Local Data Storage.
My sample application so far uses a single database table to store tours data.…I'm now going to add some new functionality to the application.…I'm going to let the user add a tour to a list that we'll call mytours--a custom list--…and then I'll let them show a filtered view that only shows the tours that they've selected.…I'll need a second database table to manage this, and I'll define it first in my database open helper class.…Now this entire task will take quite a bit of code, so as I have in the past,…I've provided a typing help file called typinghelp.txt that's a part of the Multiple Tables project.…
I'll start with the first snippet where I'm defining the table mytours.…There are two declarations here, one for the new table name, and one for an SQL create statement that will create…the table in the database.…I'll copy that code to the clipboard, and I'll go to the class ToursDBOpenHelper.java.…In the class I'll place the cursor after all of the existing constants and then…I'll paste this new code into place.…
- Exploring local data storage options
- Creating an Android virtual device
- Starting a new project
- Defining preferences with Java and activities
- Creating and reading JSON and XML data files
- Creating a new SQLite database
- Inserting and retrieving data in the database
Skill Level Intermediate
1. Getting Started
2. Using Application Preferences
3. Using Internal and External File Storage
4. Working with SQLite Databases
5. Managing and Displaying SQLite Data
Improving the data display9m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.