I have a new task now:
The user will input the lat-lon values in a HTML form and when an INSERT button is clicked these values should be stored the database. Now when a submit button is clicked the markers of all the lat-lon values stored in a table in the database should be visible on the map. This is fairly not a tough task, but... when the user provides next value of a point, this should be stored in the same table and this particular point marker should be added to the map (the map already contains markers of previous points)... that is, instead of reading the whole data (including the new point) from the database and projecting on the map, since before adding new point to the database we have already pointed the markers of previous values, now only the new point marker should be added to the map.
For better understanding here is the example...
I already have 999 points in my database and these are pointed on the map. Now the user gives 1000th point values and this will be stored in the DB. now if we reload (click on submit button) the page, instead of reading all the 1000 points from the database and create markers, it should only read the new point and add this to already existing map with 999 markers.
I have a simple logic for this, table1 in the database contains all the values and table2 only the new value. Whenever the user insert a points it is simultaneously added in both the tables and when the user submits the only value from table2 is deleted (so that next new value can be stored). So reading just from table2 works here, but how to add this point to the already existing map is the main task.
I don't have any idea whether this can be done in OpenLayers or not, so please help me how to do this.
Hope my intention is understandable.
Till now I have not worked with databases in OpenLayers, so please suggest me which database (like MySQL, etc...) suits better for this task... and any other suggestions on storing/retrieving to/from the database.