I have an app which is essentially a big form, but one page of that form is variable, depending on the choice of the user. There are about 50 different pages and each one has a particular list and number of possible user inputs.
Since I want to store the data in a SQLite database, how should I proceed? Should I create columns for every possible input and just store nothing on the fields that are not used? Or is it possible to adapt the database to the data being stored?
There's not a lot to go on here, but I'd say create a table for the form, a table for each page, and a table for each one-to-many list.
For example, an invoice requires two tables; one for the invoice, and one for the invoice line items. A "docket" or "customer" record might contain all of the invoices.
Make FormID
a Primary Key in the first table, and a foreign key in the Pages
table. Make "Page[n]ID"
a foreign key in those tables where there are lists of things that you need to attach to the relevant page.