MySQL came bundled with GPS gadget!

I recently purchased Globalsat GH-625. It had a CD-ROM in the box and I was surprised to find that MySQL is included in it. Yes, you guessed it right. The software uses MySQL to store my running/bicycling/walking logs, including latitude/longtitude/altitude, heart rate, lap time.

MySQL is used from the application as 'Embedded', as opposed to 'Deeply Embedded' (Yeah, I learned these are the correct parlance in MySQL world at recent user conference). So..., I can access it from 'mysql' client tool like below. I hope I can
do schema analysis to find entity relationships soon. I think MySQL has a cool tool to do it.

bash-3.2$ /c/e/Program\\ FilesW2K3/GSsport/MySQL/bin/mysql -u root -ppassword --port=3308
Welcome to the MySQL monitor.  Commands end with ; or \\g.
Your MySQL connection id is 59
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)
mysql> use globalsatgh615
Database changed
mysql> show tables;
+--------------------------+
| Tables_in_globalsatgh615 |
+--------------------------+
| tbllogin                 |
| tracklapmaster           |
| tracklappoints           |
| trackmaster              |
| trackmaster2             |
| trackpoints              |
| waypointmaster           |
+--------------------------+
mysql> desc trackmaster2;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| TrackID      | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| TrackName    | varchar(45)      | NO   |     | NULL    |                |
| StartTime    | varchar(12)      | NO   |     | NULL    |                |
| Duration     | varchar(35)      | NO   |     | NULL    |                |
| Distence     | varchar(12)      | NO   |     | NULL    |                |
| Calories     | varchar(12)      | NO   |     | NULL    |                |
| MaxSpeed     | varchar(12)      | NO   |     | NULL    |                |
| MaxHearRate  | varchar(12)      | NO   |     | NULL    |                |
| AvgHeartRate | varchar(12)      | NO   |     | NULL    |                |
| NoOfPoints   | varchar(12)      | NO   |     | NULL    |                |
| Status       | int(10) unsigned | NO   |     | NULL    |                |
| UID          | int(10) unsigned | NO   |     | NULL    |                |
| ActivityID   | int(10) unsigned | NO   |     | 0       |                |
| NoOfLaps     | varchar(12)      | NO   |     | NULL    |                |
| AUpheight    | varchar(12)      | NO   |     | NULL    |                |
| ADownheight  | varchar(12)      | NO   |     | NULL    |                |
+--------------+------------------+------+-----+---------+----------------+
mysql> select TrackID,TrackName,Distence,MaxHearRate,NoOfPoints,NoOfLaps from trackmaster2;
+---------+------------+----------+-------------+------------+----------+
| TrackID | TrackName  | Distence | MaxHearRate | NoOfPoints | NoOfLaps |
+---------+------------+----------+-------------+------------+----------+
|       1 | 2008-11-24 | 7139     | 0           | 2155       | 15       |
|       2 | 2008-11-29 | 0        | 185         | 1          | 2        |
|       3 | 2008-11-30 | 11507    | 0           | 3488       | 23       |
+---------+------------+----------+-------------+------------+----------+
mysql> desc tracklapmaster;
+---------------+---------------------+------+-----+---------+-------+
| Field         | Type                | Null | Key | Default | Extra |
+---------------+---------------------+------+-----+---------+-------+
| TrackMasterID | int(10) unsigned    | NO   | PRI | 0       |       |
| LapNo         | int(10) unsigned    | NO   | PRI | 0       |       |
| AccruedTime   | varchar(45)         | NO   |     | NULL    |       |
| TotalTime     | varchar(45)         | NO   |     | NULL    |       |
| TotalDistance | varchar(45)         | NO   |     | NULL    |       |
| Calory        | varchar(45)         | NO   |     | NULL    |       |
| MaximunSpeed  | varchar(45)         | NO   |     | NULL    |       |
| MaxHR         | varchar(45)         | NO   |     | NULL    |       |
| AverageHR     | varchar(45)         | NO   |     | NULL    |       |
| NoOfPoints    | varchar(45)         | NO   |     | NULL    |       |
| Status        | tinyint(3) unsigned | YES  |     | 1       |       |
| startIndex    | int(10)             | NO   |     | 0       |       |
| endIndex      | int(10)             | NO   |     | 0       |       |
+---------------+---------------------+------+-----+---------+-------+
mysql> select TrackMasterID,count(\*),avg(NoOfPoints) from tracklapmaster group by TrackMasterID;
+---------------+----------+-----------------+
| TrackMasterID | count(\*) | avg(NoOfPoints) |
+---------------+----------+-----------------+
|             1 |       15 |           143.6 |
|             2 |        2 |               0 |
|             3 |       23 | 151.60869565217 |
+---------------+----------+-----------------+
mysql> desc tracklappoints;
+---------------+------------------+------+-----+---------+-------+
| Field         | Type             | Null | Key | Default | Extra |
+---------------+------------------+------+-----+---------+-------+
| TrackMasterID | int(10) unsigned | NO   | PRI | 0       |       |
| SLNo          | int(10) unsigned | NO   | PRI | NULL    |       |
| Latitude      | varchar(18)      | NO   |     | NULL    |       |
| Longitude     | varchar(18)      | NO   |     | NULL    |       |
| Altitude      | varchar(18)      | NO   |     | NULL    |       |
| Speed         | varchar(18)      | NO   |     | NULL    |       |
| HeartRate     | varchar(18)      | NO   |     | NULL    |       |
| IntervalTime  | varchar(18)      | NO   |     | NULL    |       |
| Status        | int(10) unsigned | NO   |     | 0       |       |
+---------------+------------------+------+-----+---------+-------+
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today