likwidmonster
Lurker
I am looking for recommendations on how to have the data setup for a car wash appointment scheduler app I am making for fun.
I think there is a better way to store and search through the information with the way I have it setup below.
So far this is what I have,
On an online MYSQL Database:
User Table: name, street, zipcode, state, phone, username, password
Vehicles Table: username, year, make, model, color
On the App:
SharedPreferences with name, username, street, zipcode, state, phonenumber, password
SQLiteDatabase with year, make, model and color.
When the user logins on the main activity it checks for the username and password in the User Table on the online server. If there is a match it downloads the full user data. It also downoads all the vehicles that have the correct username from the Vehicles Table. Then this data is stored in the app in its proper place (user data in the Shared Preferences and the vehicles each entered into the SQLiteDatabase).
What I am having trouble implementing is a full history of service per vehicle. I think there is a more efficient way of getting the vehicle history without searching through an appointments of every users appointments every time I want to show the vehicles history.
Any recommendations?
EDIT: The only other idea I have is to create a table on the server and the local SQLite that is the named "username-vehicle-appointments". That way it has to search through a smaller table and there is less data to download.
I am still trying to think a way to have the appointment request and confirmation setup.
EDIT:
Maybe have a new table on the server that is named new-appointments. The app could check the new-appointments table every few minutes to see if there are new appointment requests?
Does this sound like a good way to do this?
Thanks!
I think there is a better way to store and search through the information with the way I have it setup below.
So far this is what I have,
On an online MYSQL Database:
User Table: name, street, zipcode, state, phone, username, password
Vehicles Table: username, year, make, model, color
On the App:
SharedPreferences with name, username, street, zipcode, state, phonenumber, password
SQLiteDatabase with year, make, model and color.
When the user logins on the main activity it checks for the username and password in the User Table on the online server. If there is a match it downloads the full user data. It also downoads all the vehicles that have the correct username from the Vehicles Table. Then this data is stored in the app in its proper place (user data in the Shared Preferences and the vehicles each entered into the SQLiteDatabase).
What I am having trouble implementing is a full history of service per vehicle. I think there is a more efficient way of getting the vehicle history without searching through an appointments of every users appointments every time I want to show the vehicles history.
Any recommendations?
EDIT: The only other idea I have is to create a table on the server and the local SQLite that is the named "username-vehicle-appointments". That way it has to search through a smaller table and there is less data to download.
I am still trying to think a way to have the appointment request and confirmation setup.
EDIT:
Maybe have a new table on the server that is named new-appointments. The app could check the new-appointments table every few minutes to see if there are new appointment requests?
Does this sound like a good way to do this?
Thanks!