Ok, here is a real challenge.
I am building a Ajax-based web app that has a very rich data in each page.
Ok, let see this scenarios.
User can retrieve variety of product within a period. For example, when user enters the url mydomain.com?getProduct;startDate=2012-11-10;endDate=2014-12-11
, the system will retrive all product within that range & show all products on the page. Each product will has an ID and will be stored inside a checkbox as depicted in the following:
Date - Name - ID [] 2012-11-10 - car -10 [] 2012-11-11 - bike -11 ..... [] 2014-12-11 - bin -110
Now the user will select some checkboxes Randomly & some other info will be displayed accordingly. And the user wishes that he can show a SnapShot of his current Working Gui to his bos.
SO, the current solution that I am doing is to store the productID in the url. For example, the user checked 2 productIDs 10
& 11
then the url should become mydomain.com?getProduct;startDate=2012-11-10;endDate=2014-12-11;selectedIds=10_11
. The user then sends this url to his bos, the bos opens the url & saw the exact same Gui as the user had before like the following:
Date - Name - ID [x] 2012-11-10 - car -10 [x] 2012-11-11 - bike -11 ..... [] 2014-12-11 - bin -110
The problem is the thr url could become very very long & Google don't want to crawl on a very long url. Also, very long url is pretty inconvenient when sent to email.
So, what is the best solution to this requirement? Should I have another table to store info instead of storing info on the url. But if that is the case then my DB will be very big cos user will produce lots of urls / day.
I am using MYSQL, but this is a general DB question so it doesn't matter which DB platform u r using.