requirements, MySQL table, a log table, the average record of statistical data cycle, in practice to learn, with MySQL may be more trouble, then use just contact with the MongoDB bar, but also with the study of Hadoop last year stained point, and MongoDB support MapReduce, I've been wanting to get to know each other last year, but I'm too busy and have no time to study it right now. Using the command line is tiring, so use the Mongovue tool. The start:
Analysis table structure, useful fields one is record ID (repeatable), one is the time that record produces, import the required fields and data into MongoDB, write the first mapreduce, the time that the record produces merges, form like:
{"ID": "1001", "Dates": [' 2014/2/10 ', ' 2014/2/9 ', ' 2014/2/6 ']}
Write a second mapreduce, the time of each record for the mean operation, such as the above is used:
(February 10-February 9) + (February 9-February 6)) divided by 2
Finally, all records are again the first step, to import data steps (borrowed online to find the picture): choose MySQL Database
Establishing a database connection
Select Table
Select field
Complete