samedi 5 septembre 2015

Desining Android database structure using Google Maps

I'm hoping I can get some help here please as I am stuck trying to figure out the best way to implement the next part of my application.

At the moment with my app, I have a simple interface that when a button is clicked, it displays a Google Map screen with 5 markers. When these markers are clicked, a popup window appears that displays prices of a shop, for example:

Food: £1

Water: £2

I am trying to implement a database with my application, so I can store multiple prices of Food and Water. For example -

Shop A has Food and Water which prices can vary from £1 - £10.

How can I design a table that has Shop A as a row, with 10 different prices as columns, and another row called Shop B that also contains 10 different prices? Would it make sense to do something like the following -

Shop A | FoodPrice_1 | WaterPrice_1 | FoodPrice_2 | WaterPrice_2 | FoodPrice_3

Shop B | FoodPrice_1 | WaterPrice_1 | FoodPrice_2 | WaterPrice_2 | FoodPrice_3

Would it be possible to iterate through each column and display the price's to a certain marker?

This doesn't have to be a completely perfect design by the way, the app won't be published. The main thing that I want to do is to be able to display each price separately, so a complex structure isn't needed.

I hope this makes sense in what I am trying to do, if anyone can help me I would greatly appreciate it.

Aucun commentaire:

Enregistrer un commentaire