I want to create a web site using google maps, php, mysql and javascript where users can leave a marker on a map with message so that another users will be able to see thismarker on their map. And all of this in a real time.
I suppose that amount of markers will be huge, so i decided to store markers in database using tiles:
You can see picture explaining this over here
http://kunuk.wordpress.com/2011/11/05/google-map-server-side-clustering-with-asp-net/
http://www.soak.co.uk/blog/server-side-map-marker-clustering/
So for example, at the beginning the coordinates of client viewport are determined and the tiles to be loaded from the server are calculated, after that the server determine the markers that are whithin the requested tiles and sends them to the client.
My question is what is the best way to organise the database that will store markers by tiles?
Can smn show an example or there is already a standart solution to this problem?
I think you are over-complicating this. If the only thing you are storing is the markers (lat & lon), then a single database table will do.
Something like: