11.07.2015 Views

Thesis full text PDF (in Italian) - Politecnico di Milano

Thesis full text PDF (in Italian) - Politecnico di Milano

Thesis full text PDF (in Italian) - Politecnico di Milano

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.7 Structure of the database In order to memorize the quantitative data daily collected from the <strong>di</strong>fferentsocials networks, a database called “socialDB” has been created.The def<strong>in</strong>ition of the tables has been done tak<strong>in</strong>g <strong>in</strong>to consideration the<strong>in</strong>formation that the APIs was able to extract.Dur<strong>in</strong>g the data analysis, tak<strong>in</strong>g <strong>in</strong>to consideration temporal aspects, moreimportant <strong>in</strong> order to construct the history charts, two ma<strong>in</strong> type of <strong>in</strong>formationhas been identify:1. Data with temporal references2. Data without temporal referencesFor the first category thanks to the availability of the creation time, the applicationsimply memorizes the date with the related <strong>in</strong>formation <strong>in</strong>to the specific table,while, for the second, a particular schema has been adopted <strong>in</strong> order to memorizetemporal variations of the value observed (see fig. 17).id * object_id date value type_valueFigure 17 - Schema of the table adopted for memorize data without temporal referencesTuples, <strong>in</strong>to this type of tables, are <strong>in</strong>serted as follow (see also fig. 18):ü The fist time the object is crawled, the field “type_value” is set to “<strong>in</strong>it”,and “value” conta<strong>in</strong>s the real numerical data collected.ü For each subsequent updates, related to the same object, the field“type_value” is set to “update” and “value” conta<strong>in</strong>s the upgrade(<strong>di</strong>fference between the new numerical data collected and the sum of allthe previous values <strong>in</strong>serted with the same object id).58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!