Reputation: 11
I am new to android development and I was wondering if it were possible to send a pull request from a sqlite db when a user enters in a value, after clicking through a sequence of buttons. For example.
User 'clicks' PC> 'clicks' GPU> 'clicks' Nvidia> 'clicks' MSI> 'clicks; GTX 980> 'enters length of unit wished' (returns error if unit doesn't exist or returns price of unit)
So ultimately the db would become filtered while clicking through till the user enters the size of the unit and returns a $ amount.
My professor recommended building this db in sqlite because I have to create a python script to 'read' tables and import them into this db and organize them.
If this were all possible does anyone have any tips as to how I would organize this db?
Thank you in advanced community. :)
Upvotes: 0
Views: 661
Reputation: 2416
For details about how to use SQLLite in android app, please read the documentation - http://developer.android.com/training/basics/data-storage/databases.html.
In this particular use case, you can design the tables in such a way that each entity is stored in each table with a primary key/foreign key relationship with it's base table. Eg -
Table PC_T - PC id, PC name
Table GPU_T - GPU id, GPU name, PC id and so on.
Thus, once user selects a PC, you can query GPU_T based on that PC id and fetch only the corresponding GPU values.
Upvotes: 1