Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

UDC/How is Usage Data Stored

< UDC
Revision as of 14:25, 22 September 2010 by Wayne.eclipse.org (Talk | contribs)

Overview

Usage data is aggressively normalized on the server. Ultimately, the data is stored in multiple tables.

Tables

Profile

A record is created in the profile table, usagedata_profile for each workspace we encounter. When the UDC uploads data, it provides us with two identifiers (both are UUIDs generated by the UDC) representing the user and the workspace. The user identifier effectively represents an individual computer; the workspace identifier represents an individual workspace. This distinction was deemed necessary in order to account for users who run multiple Eclipse workspaces.

A row is created in the profile table for each distinct userId/workspaceId pairing.

Table Description

The table contains an id field which is the primary key. This field is used as the target of the foreign-key reference from the Upload table.

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| id          | int(10) unsigned | NO   | PRI | NULL    | auto_increment | 
| userId      | char(40)         | NO   | MUL |         |                | 
| workspaceId | char(40)         | NO   | MUL |         |                | 
+-------------+------------------+------+-----+---------+----------------+

Example

+----+--------------------------------------+--------------------------------------+
| id | userId                               | workspaceId                          |
+----+--------------------------------------+--------------------------------------+
|  1 | bbb6e4b1-391f-4da5-8ce1-a89a19cdb5ff | 7b38a3b8-a40f-4250-8be2-aa78c1e3ba9e | 
|  2 | bbb6e4b1-391f-4da5-8ce1-a89a19cdb5ff | a680e38b-aa01-4ac7-a11c-8bf457099570 | 
|  3 | bbb6e4b1-391f-4da5-8ce1-a89a19cdb5ff | 8f093d31-ba89-4e54-be98-8c7bc936587f | 
|  4 | 9d4a44d0-302b-4a00-aede-719e975ecfc8 | d4b5add9-cbc8-43cb-a6f8-696bac623429 | 
|  5 | 518e2328-faea-4f07-a46e-c0c97e050171 | 033ae773-8c3e-4240-8423-253d48be6780 | 
|  6 | 02a0ab5b-d51d-4905-ad8d-a66626da2774 | 386208d2-28a5-4ffc-a290-fdd476748857 | 
|  7 | 43d7c638-6f5a-463c-91ca-f0f7da905d4c | 7ea57f59-7f48-42c3-b563-7a1a17f22ab4 | 
|  8 | 77882409-c2c3-4d1a-9117-308fc123af70 | f369e621-2c0e-4dc9-b9c7-44208d6fc6b9 | 
|  9 | e3fe3f74-9510-41f7-a437-2997dc607b0c | 47a7e9f7-dc94-49dd-a344-92c4b321492b | 
| 10 | 04617774-515b-4c72-8327-9733bd52ebce | 9c1f5d31-cd1c-4e48-bd47-0689b58b6467 | 
+----+--------------------------------------+--------------------------------------+

Upload

Each entry in the upload table, usagedata_upload, represents an upload event. That is, every time the UDC "calls home" with an upload, we add a row to this table. Each row records the profileId of the user (from the Profile table using the userId/workspaceId combination provided with the upload event), the country code (ccode), and the time (on the server) of the upload.

Table Description

The table contains an id field which is the primary key. This field is used as the target of the foreign-key reference from a Record table.

+-----------+------------------+------+-----+-------------------+----------------+
| Field     | Type             | Null | Key | Default           | Extra          |
+-----------+------------------+------+-----+-------------------+----------------+
| id        | int(10) unsigned | NO   | PRI | NULL              | auto_increment | 
| profileId | int(10) unsigned | NO   |     |                   |                | 
| ccode     | char(2)          | YES  |     | NULL              |                | 
| time      | timestamp        | NO   | MUL | CURRENT_TIMESTAMP |                | 
+-----------+------------------+------+-----+-------------------+----------------+

Example

+----+-----------+-------+---------------------+
| id | profileId | ccode | time                |
+----+-----------+-------+---------------------+
|  1 |         2 | ca    | 2008-04-04 13:17:07 | 
|  2 |         2 | ca    | 2008-04-04 15:24:18 | 
|  3 |         3 | ca    | 2008-04-04 15:26:45 | 
|  4 |         3 | ca    | 2008-04-04 15:29:37 | 
|  5 |         3 | ca    | 2008-04-04 15:30:20 | 
|  6 |         4 | us    | 2008-04-04 16:04:19 | 
|  7 |         5 | be    | 2008-04-04 16:08:36 | 
|  8 |         6 | us    | 2008-04-04 16:30:33 | 
|  9 |         7 | ca    | 2008-04-04 16:35:54 | 
| 10 |         8 | it    | 2008-04-04 16:41:02 | 
+----+-----------+-------+---------------------+

Copyright © Eclipse Foundation, Inc. All Rights Reserved.