Domain Analysis of Fitness Tracker

9128 words (37 pages) Dissertation

16th Dec 2019 Dissertation Reference this

Tags: Computer ScienceTechnology

Disclaimer: This work has been submitted by a student. This is not an example of the work produced by our Dissertation Writing Service. You can view samples of our professional work here.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of NursingAnswers.net.

Domain Analysis

Introduction

Fitness trackers have evolved recently and become a norm for people to have as an everyday accessory. They are used to monitor different aspects of fitness and health of the user. To understand the fitness trackers or activity trackers, I will carry out a domain analysis which will define the underlying layer behind the fitness tracker.

General Knowledge

Activity trackers, or better known as fitness trackers refer to wearable devices that monitor and record a person’s fitness activity. It is worn on the wrist and designs vary from every manufacturer. They all consist of a slim design that looks close to a fashion bracelet. Electronic fitness trackers are fundamentally upgraded versions of pedometers. They use accelerometers and gyroscopes to calculate directions, altitude and various other data. The sensors built into the fitness tracker calculate things such as heart rate, steps walked, distance covered from walking and running, flight levels ascended and descended. Advanced fitness trackers can also calculate how long you have been active, sleeping and your average fitness pattern. Based on your goals that you can set for weight loss, it will tell you when you should take a break, go for a walk or for a run to make sure your goal is achieved.

Nearly every single fitness tracker in this day and age allows the user to input data for themselves such as age, gender, height and weight. With this information, it will tell you your BMI and will ask you to input your desired weight. The fitness tracker will then suggest some activities that will help you reach that goal. Along with the hardware components they are accompanied by algorithms which use the data that has been input by the user and the data generated by the tracker to help calculate the number of calories burnt.

Fitness trackers are succeeding in the 21st century, not because of their scientific qualities, but because of the motivational qualities it has psychologically. It enables the user to set targets and will remind them at intervals which has an impact on their motivation, thus resulting in the user exercising more. A good advantage of the fitness tracker is that it has no limitations of when it can be used. You don’t have to be at a gym to use the fitness tracker. You can to various activities whilst outside or even in your own home to reach your targets.

Different Types of Fitness Trackers

There is a very wide range of fitness trackers available on the market. They target a various range of users from users who want to make sure they have a healthy lifestyle, to fitness fanatics who regularly train and want to monitor their activity. The basic fitness trackers are relatively inexpensive and provide less features than the more advanced products. The price reflects what features will be available for the fitness tracker. I have chosen to compare 2 fitness bands. The Fitbit Charge 2 and the Xiaomi Mi Band 2, both of which are very popular fitness trackers. The Xiaomi Mi Band 2 is one of the cheapest reputable fitness trackers that are available for the consumer market whereas the Fitbit charge 2 is a more expensive alternative.

Fitbit Charge 2

The Fitbit charge2 comes at a relatively expensive price point starting from £139.99. The main features that make this product stand out is that it has a heart rate monitor dubbed as “Pure Pulse” which is Fitbits own custom piece of hardware. It also has tracking for different sports and uses GPS to track the location. Calls, texts and calendar alerts is something which is usually not on every Fitness tracker. The Fitbit connects to your phone and will display calls, texts, calendar alerts, time and your goals. This feature is nice because it allows the user to check their information without having to stop and use their phone. The fitness tracker also has a feature to track your sleep schedule along with a silent alarm. The tracker also allows you to input data such as your weight so that it can calculate how much weight you have gained/lost over a set period of time.

Data Tracked

  • Distance
  • Sleep Activity
  • Time
  • Steps Taken
  • Calories Burned
  • Activity
  • Heart Rate

Xiaomi Mi Band 2

The Xiaomi Mi Band 2 is an entry level fitness tracker and is targeted for the consumer who is on a budget. The band tracks your calories burned, steps travelled, total steps, notification alerts in the form of a slight buzz on the wrist and displays the time. The band also connects their own app on mobile which gives the user in depth information about their activity, goals and other useful information.

Data Tracked

  • Steps
  • Calories Burned
  • Distance Travelled
  • Time
  • Heart Rate

I chose the Xiaomi Mi Band 2 simply because it is a cheaper alternative coming in at a mere £27.80 which is a hefty price reduction compared to the Fitbit Charge 2. The Mi Band 2 covers the main aspects of a fitness tracker and provides the user with core details. Users that do not tech savvy would prefer this band due to its simplicity. It enables the user to view their daily steps, how many calories they burned and the distance that they have travelled.

This is not the best fitness tracker, but because of the price point is very affordable to the consumer market. It would not be financially feasible for a user who does not do much exercise to spend an upward of £100 for a fitness tracker. As the Fitbit has more features compared to the Xiaomi, it results in more modelling which allows for a more complex system.

Relational Model

I created a relational model which contains entities, relationships, attributes and the data types that go with the attributes. I have implemented primary keys and foreign keys appropriately in my model to reflect the way one entity is related to another.

I have used primary keys to make sure that there is no duplication of data. This is very important specially within the Running, Cycling and Steps tables as the data is always updating and will never be the same. I have included the foreign key from the location table within these 3 activities so that when the user partakes in any of these activities, it will capture their location. Sleep does not need the location foreign key as it does not require the location of where the user is sleeping. The sleep entity has been modelled so that it calculates whether the user is getting sufficient amount of sleep in their day.

I have used a one-to-one relationship in my Steps entity to the Location entity. This is because each fitness activity will have its own record and location data. There is a separate entity called “Activity” which is the parent entity for the different activities. It retrieves individual data from each type of activity: Walking, Running and Cycling. The reason I have modelled the activities as separate tables is so they can calculate the distance through the location entity.

Because the Fitbit requires the user to register the device, I have implemented a one-to-many relationship from the user to the fitness data. This way the fitness data that has been collected is linked to that specific user. I have also implemented many-to-many relationships from the user to friends as many users are able to have many friends. A join table is created automatically once the many to many relationships has been implemented. This enables the database to pull data from the user and the friends table. There is also a join table created for the User activity. The way the system is modelled it allows for multiple users to have multiple activities recorded.

I have used the data type varchar in the majority of my entities. This is because attributes such as name, email, street name, town, city contain all characters which vary in length. I set an appropriate length for each attribute so that it would accommodate for any length entered.  I kept door number as a varchar because some door numbers come with a letter after the number. This becomes from an int to a varchar.

I have used the datatype “smallint” in appropriate locations for the average heart and calories that have been burned. I used a smallint because the values will not surpass 5 digits.

Object-Oriented Model

Using Object Oriented Programming, I created a Class diagram which contained all the different classes that which map to Entities in a Relational model. They have associations, and agrregation to model the fitness tracker that is to be implemented. The class names are the same as the enteties in the relational model and the attributes in the relational model map to the methods in Object Oriented Programming. The main difference between the attributes in both models is the data types that are used.

In the relational model, a varchar is used for attributes such as forrname and surname. However, in an Object Oriented Model, a varchar maps to a String. Some of the data types are the same in both models such as int and date. The format may differ, but in essence, they both do the same thing.

I used aggregation to link the user and the address classes together. This is because a user must have an address. I also used aggregation is a few other places such as body data. I did this because without body data there would be no goals to set. I used composition once for the heart rate. Since the heart rate is the parent class, if the heart rate table is dropped, then the breathing class would no longer exist.

XML

XML stands for Extensible mark-up language. It is used to represent data structures. I created the XML model as it is a hierarchical structured model formed like a tree. XML uses the use of tags to correspond the description of all the data as well as listing all the different entities that will be used for it. To validate XML, some example data is entered within the tags.

The flow of the XML model is very similar to the HTML mark-up language as well as the syntax of opening and closing tags. The natural design makes it very easy to understand what the model is representing and makes it easy to read and follow. HTML has predefined tags such as <h1>, whereas in XML, the user defines the description of the tag, usually something appropriate to the context in question.

This image shows clearly what data is stored along with an example of the syntax inside opening and closing tags. I have followed a similar pattern throughout the rest of my models to ensure the tags match the data stored appropriately.

Please see appendix for full XML source code.

Validation

I have validated the XML code using an XML validator

XML Schema

XML Schema uses the same syntax as XML and is used as an alternative to database design.

The XML Schema uses the same syntax as XML and is used as an alternative to database design.

XML uses the tags to define what the data is and then has an example of the data within the brackets.

As you can see, the first tag is <forename> which immediate tells the person reading it that there is a name in there. They can then see an example of a forename which in this case is john.

In XML Schema, the same example will give an element with a type. The type defines the data type which in this case is a string.

As you can see from the above snippet, there is a big difference from the XML and the XML Schema.

In XML, the forename is located within the tag name and there is an example of what a forename looks like. XML Schema however, defines the elements and attributes along with the data type.

XML Schema also uses the element “sequence” which ensures that all the child elements appear in one sequence. My XML Schema also has complex types which I have implemented, as one parent element contains child elements within it along with their data types and attributes.

Please see appendix for full XML Schema source code

Validation

I have validated the XML Schema alongside the XML file I have created.

RDF/RDF Schema

RDF stands for resource description framework and is primarily the foundation for semantic web. g RDF is used for describing resources on the web using XML syntax. RDF has been designed to be read purely by computer devices and not for human interaction.

As RDF uses the XML syntax, it is accessible to a wide range of devices and can be interpreted my majority of platforms and software applications. RDF uses URI (Unique Reference Identifiers) to describe resources with property values.

RDF has three types of identifiers.

  • Resource (Uniform Resource Identifier) which is a description of the element.
  • Property (Resource Name) which maps to attributes in XML.
  • Property Value (Input Value) which maps to the example text in XML.

The above screenshot shows that I have created an abbreviated version of RDF and RDFS Schema. In the full syntax of RDFS the Class is written as Description and the RDF Type resource is defined after the RDFS Description. In the abbreviated version, the Type is defined at the top which then includes it in the whole document

Please see Appendix for RDF/RDFS Source Code

Validation

PROV Model

The Prov model also known as Provenance model is used to foresee the process of the entire application. It oversees the entities, activities that occur, trusts and risks.

There are in total 6 components to the Prov Model of which I will be talking about 3 of them.

C1: Entities, C1: Activities, C2: Derivation, C3: Responsibilities and C3: Agents.

C1: Entities

Entities are considered the same as relation. They can be based on physical, digital or conceptual objects. I have created 17 entities covering data about activities and fitness and I have based it on my relational model.

C1: Activities

The fitness device that I have modelled contains 4 activities; create, add, edit and track activity. Activities in the Prov model are used as they define something which has been input or a system service that runs in the background. An example of this is ‘create’ as the tracker enables a user to create a new account.

C2: Derivation

In my model I have also used derivation which replicates the data from one entity into a brand new one. An example for my model is the location. The initial location entity already has existing points which can be replicated into a new entity

C3: Responsibilities (Usage and Generations)

Responsibility is linked to activities and it is all the entities which have been created after an activity has run. An example used in my model is the sleep entity has been generated after the track activity has run.

C3: Agents (Attributions and Associations)

One of the main parts to the Prov model is defining an actor who will use the device. For my model I have used the user table to populate the details of the actor. Association in the prov model is everything directly influenced by the actor. The details that have been inputted by the actor is an example of how association is influenced by the actor. Attribution is giving the actor a unique identifier to ensure that all the activities are linked to them.

Validation

Conclusion

To conclude I feel that I have implemented a high level of complexity in all of my data models. From looking at my research I ensured that my models covered the main features of fitness trackers. Currently, my model covers the fitness tracker and how it links in with a connected smartphone. To further improve the model, I would allow the user to be able to store reminders on their calendar within the application. All the models that I created have conformed to strict notation and they have all validated successfully.

References

Fitbit. (2017). Fitbit Charge 2. Retrieved from https://www.fitbit.com/uk/charge2.

Mi. (2017). Mi Band 2. Retrieved from http://www.mi.com/en/miband2/.

https://www.w3.org/TR/prov-dm/

https://www.w3schools.com/xml/xml_rdf.asp

https://www.w3schools.com/

Appendix

XML Source Code

<?xml version=”1.0″ encoding=”UTF-8″?>

<fitness

xmlns=”http://www.w3schools.com”

xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”

xsi:schemaLocation=”file://C:/Users/Ibrahim/Libraries/Documents/XML.xml”>

<user>

<user_id>1</user_id>

<forename>john</forename>

<surname>doe</surname>

<email>[email protected]</email>

<date_of_birth>1994-10-11</date_of_birth>

<sex>male</sex>

<address_id>53</address_id>

<body_id>17</body_id>

</user>

<address>

<address_id>653</address_id>

<door_number>14</door_number>

<street_name>john lane</street_name>

<town>ilford</town>

<city>london</city>

<postcode>lg1 1dg</postcode>

</address>

<friends>

<friends_id>833</friends_id>

<forename>joe</forename>

<surname>bloggs</surname>

<email>[email protected]</email>

<date_of_birth>1994-10-11</date_of_birth>

<sex>male</sex>

</friends>

<device>

<device_id>1</device_id>

<battery>99%</battery>

<serial_num>DNPQQEWWGRY9</serial_num>

<model>E5420</model>

<software_version>v5.62</software_version>

<user_id>345</user_id>

</device>

<device_display>

<display_id>1</display_id>

<clock>15:07:29</clock>

<stopwatch>17:19:16</stopwatch>

<date>1994/10/11</date>

<alarm>12:15:09</alarm>

<steps_id>567</steps_id>

<heart_rate_id>567</heart_rate_id>

<smartphone_id>567</smartphone_id>

<device_id>567</device_id>

</device_display>

<heart_rate>

<heart_rate_id>56</heart_rate_id>

<minimum_heart_rate>35</minimum_heart_rate>

<maximum_heart_rate>90</maximum_heart_rate>

<average_heartrate>70</average_heartrate>

</heart_rate>

<body_data>

<body_id>5</body_id>

<user_height>4.87</user_height>

<user_weight>150.7</user_weight>

<bmi>38.4</bmi>

<calories_id>567</calories_id>

</body_data>

<calories>

<calories_id>5</calories_id>

<calories_burnt>600</calories_burnt>

<activity_id>567</activity_id>

<user_id>567</user_id>

</calories>

<breathing>

<breathing_id>567</breathing_id>

<heart_rate_id>567</heart_rate_id>

</breathing>

<goals>

<goals_id>567</goals_id>

<running_target>37.5</running_target>

<steps_target>330.6</steps_target>

<cycling_target>45678</cycling_target>

<sleep_target>2600.00</sleep_target>

<weight_target>150.5</weight_target>

<activity_id>567</activity_id>

<calories_id>567</calories_id>

</goals>

<activity>

<activity_id>78</activity_id>

<heart_rate_id>567</heart_rate_id>

<sleep_id>567</sleep_id>

<steps_id>567</steps_id>

<running_id>567</running_id>

<cycling_id>567</cycling_id>

</activity>

<smartphone>

<smartphone_id>56</smartphone_id>

<call_data>567</call_data>

<text_data>567</text_data>

<calender_data_alert>567</calender_data_alert>

<device_id>567</device_id>

</smartphone>

<sleep>

<sleep_id>56</sleep_id>

<sleep_start_time>12:15:09</sleep_start_time>

<sleep_end_time>15:21:29</sleep_end_time>

<sleep_average>13:15:27</sleep_average>

</sleep>

<steps>

<steps_id>56</steps_id>

<daily_steps>1334</daily_steps>

<weekly_steps>54676</weekly_steps>

<monthly_steps>4567687</monthly_steps>

<average_steps>34545</average_steps>

<flights_climbed>47</flights_climbed>

<location_id>567</location_id>

</steps>

<cycling>

<cycling_id>56</cycling_id>

<daily_cycle>200</daily_cycle>

<weekly_cycle>1208</weekly_cycle>

<monthly_cycle>48676</monthly_cycle>

<average_cycle>34069</average_cycle>

<location_id>567</location_id>

</cycling>

<running>

<running_id>56</running_id>

<daily_run>15.7</daily_run>

<weekly_run>75.9</weekly_run>

<monthly_run>450.6</monthly_run>

<average_run>124.8</average_run>

<location_id>567</location_id>

</running>

<location>

<location_id>56</location_id>

<latitude>41.40338</latitude>

<longitude>2.17403</longitude>

</location>

</fitness>

XML Schema Source Code

<xs:schema attributeFormDefault=”unqualified” elementFormDefault=”qualified” targetNamespace=”http://www.w3schools.com” xmlns_xs=”http://www.w3.org/2001/XMLSchema”>

<xs:element name=”fitness”>

<xs:complexType>

<xs:sequence>

<xs:element name=”user”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”user_id”/>

<xs:element type=”xs:string” name=”forename”/>

<xs:element type=”xs:string” name=”surname”/>

<xs:element type=”xs:string” name=”email”/>

<xs:element type=”xs:date” name=”date_of_birth”/>

<xs:element type=”xs:string” name=”sex”/>

<xs:element type=”xs:integer” name=”address_id”/>

<xs:element type=”xs:integer” name=”body_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”address”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”address_id”/>

<xs:element type=”xs:string” name=”door_number”/>

<xs:element type=”xs:string” name=”street_name”/>

<xs:element type=”xs:string” name=”town”/>

<xs:element type=”xs:string” name=”city”/>

<xs:element type=”xs:string” name=”postcode”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”friends”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”friends_id”/>

<xs:element type=”xs:string” name=”forename”/>

<xs:element type=”xs:string” name=”surname”/>

<xs:element type=”xs:string” name=”email”/>

<xs:element type=”xs:date” name=”date_of_birth”/>

<xs:element type=”xs:string” name=”sex”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”device”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”device_id”/>

<xs:element type=”xs:string” name=”battery”/>

<xs:element type=”xs:string” name=”serial_num”/>

<xs:element type=”xs:string” name=”model”/>

<xs:element type=”xs:string” name=”software_version”/>

<xs:element type=”xs:integer” name=”user_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”device_display”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”display_id”/>

<xs:element type=”xs:time” name=”clock”/>

<xs:element type=”xs:time” name=”stopwatch”/>

<xs:element type=”xs:date” name=”date”/>

<xs:element type=”xs:time” name=”alarm”/>

<xs:element type=”xs:integer” name=”steps_id”/>

<xs:element type=”xs:integer” name=”heart_rate_id”/>

<xs:element type=”xs:integer” name=”smartphone_id”/>

<xs:element type=”xs:integer” name=”device_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”heart_rate”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”heart_rate_id”/>

<xs:element type=”xs:integer” name=”minimum_heart_rate”/>

<xs:element type=”xs:integer” name=”maximum_heart_rate”/>

<xs:element type=”xs:integer” name=”average_heartrate”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”body_data”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”body_id”/>

<xs:element type=”xs:float” name=”user_height”/>

<xs:element type=”xs:float” name=”user_weight”/>

<xs:element type=”xs:float” name=”bmi”/>

<xs:element type=”xs:integer” name=”calories_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”calories”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”calories_id”/>

<xs:element type=”xs:integer” name=”calories_burnt”/>

<xs:element type=”xs:integer” name=”activity_id”/>

<xs:element type=”xs:integer” name=”user_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”breathing”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”breathing_id”/>

<xs:element type=”xs:integer” name=”heart_rate_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”goals”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”goals_id”/>

<xs:element type=”xs:float” name=”running_target”/>

<xs:element type=”xs:float” name=”steps_target”/>

<xs:element type=”xs:int” name=”cycling_target”/>

<xs:element type=”xs:float” name=”sleep_target”/>

<xs:element type=”xs:float” name=”weight_target”/>

<xs:element type=”xs:integer” name=”activity_id”/>

<xs:element type=”xs:integer” name=”calories_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”activity”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”activity_id”/>

<xs:element type=”xs:integer” name=”heart_rate_id”/>

<xs:element type=”xs:integer” name=”sleep_id”/>

<xs:element type=”xs:integer” name=”steps_id”/>

<xs:element type=”xs:integer” name=”running_id”/>

<xs:element type=”xs:integer” name=”cycling_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”smartphone”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”smartphone_id”/>

<xs:element type=”xs:integer” name=”call_data”/>

<xs:element type=”xs:integer” name=”text_data”/>

<xs:element type=”xs:integer” name=”calender_data_alert”/>

<xs:element type=”xs:integer” name=”device_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”sleep”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”sleep_id”/>

<xs:element type=”xs:time” name=”sleep_start_time”/>

<xs:element type=”xs:time” name=”sleep_end_time”/>

<xs:element type=”xs:time” name=”sleep_average”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”steps”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”steps_id”/>

<xs:element type=”xs:integer” name=”daily_steps”/>

<xs:element type=”xs:int” name=”weekly_steps”/>

<xs:element type=”xs:int” name=”monthly_steps”/>

<xs:element type=”xs:int” name=”average_steps”/>

<xs:element type=”xs:integer” name=”flights_climbed”/>

<xs:element type=”xs:integer” name=”location_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”cycling”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”cycling_id”/>

<xs:element type=”xs:integer” name=”daily_cycle”/>

<xs:element type=”xs:integer” name=”weekly_cycle”/>

<xs:element type=”xs:int” name=”monthly_cycle”/>

<xs:element type=”xs:int” name=”average_cycle”/>

<xs:element type=”xs:integer” name=”location_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”running”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”running_id”/>

<xs:element type=”xs:float” name=”daily_run”/>

<xs:element type=”xs:float” name=”weekly_run”/>

<xs:element type=”xs:float” name=”monthly_run”/>

<xs:element type=”xs:float” name=”average_run”/>

<xs:element type=”xs:integer” name=”location_id”/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name=”location”>

<xs:complexType>

<xs:sequence>

<xs:element type=”xs:integer” name=”location_id”/>

<xs:element type=”xs:float” name=”latitude”/>

<xs:element type=”xs:float” name=”longitude”/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

RDF/RDF Schema Source Code

<rdf:RDF

xmlns:rdf=”http://www.w3.org/1999/02/22-rdf-syntax-ns#”

xmlns:rdfs=”http://www.w3.org/2000/01/rdf-schema#”

xmlns:ns=”http://www.example.com/rdf-schema#”

xml:base=”http://www.example.com/Person#”

xmlns:fitness=”http://www.example.com/fitness#”>

<rdfs:Class rdf_ID=”fitness”/>

<rdfs:Class rdf_ID=”user”>

<fitness:user_id>1</fitness:user_id>

<fitness:forename>john</fitness:forename>

<fitness:surname>doe</fitness:surname>

<fitness:email>[email protected]</fitness:email>

<fitness:date_of_birth>1994-10-11</fitness:date_of_birth>

<fitness:sex>male</fitness:sex>

<fitness:address_id>53</fitness:address_id>

<fitness:body_id>17</fitness:body_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”address”>

<fitness:address_id>653</fitness:address_id>

<fitness:door_number>14</fitness:door_number>

<fitness:street_name>john lane</fitness:street_name>

<fitness:town>ilford</fitness:town>

<fitness:city>london</fitness:city>

<fitness:postcode>lg1 1dg</fitness:postcode>

</rdfs:Class>

<rdfs:Class rdf_ID=”friends”>

<fitness:friends_id>833</fitness:friends_id>

<fitness:forename>joe</fitness:forename>

<fitness:surname>bloggs</fitness:surname>

<fitness:email>[email protected]</fitness:email>

<fitness:date_of_birth>1994-10-11</fitness:date_of_birth>

<fitness:sex>male</fitness:sex>

</rdfs:Class>

<rdfs:Class rdf_ID=”device”>

<fitness:device_id>1</fitness:device_id>

<fitness:battery>99%</fitness:battery>

<fitness:serial_num>DNPQQEWWGRY9</fitness:serial_num>

<fitness:model>E5420</fitness:model>

<fitness:software_version>v5.62</fitness:software_version>

<fitness:user_id>345</fitness:user_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”device_display”>

<fitness:display_id>1</fitness:display_id>

<fitness:clock>15:07:29</fitness:clock>

<fitness:stopwatch>17:19:16</fitness:stopwatch>

<fitness:date>1994/10/11</fitness:date>

<fitness:alarm>12:15:09</fitness:alarm>

<fitness:steps_id>567</fitness:steps_id>

<fitness:heart_rate_id>567</fitness:heart_rate_id>

<fitness:smartphone_id>567</fitness:smartphone_id>

<fitness:device_id>567</fitness:device_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”heart_rate”>

<fitness:heart_rate_id>56</fitness:heart_rate_id>

<fitness:minimum_heart_rate>35</fitness:minimum_heart_rate>

<fitness:maximum_heart_rate>90</fitness:maximum_heart_rate>

<fitness:average_heartrate>70</fitness:average_heartrate>

</rdfs:Class>

<rdfs:Class rdf_ID=”body_data”>

<fitness:body_id>5</fitness:body_id>

<fitness:user_height>4.87</fitness:user_height>

<fitness:user_weight>150.7</fitness:user_weight>

<fitness:bmi>38.4</fitness:bmi>

<fitness:calories_id>567</fitness:calories_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”calories”>

<fitness:calories_id>5</fitness:calories_id>

<fitness:calories_burnt>600</fitness:calories_burnt>

<fitness:activity_id>567</fitness:activity_id>

<fitness:user_id>567</fitness:user_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”breathing”>

<fitness:breathing_id>567</fitness:breathing_id>

<fitness:heart_rate_id>567</fitness:heart_rate_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”goals”>

<fitness:goals_id>567</fitness:goals_id>

<fitness:running_target>37.5</fitness:running_target>

<fitness:steps_target>330.6</fitness:steps_target>

<fitness:cycling_target>45678</fitness:cycling_target>

<fitness:sleep_target>2600.00</fitness:sleep_target>

<fitness:weight_target>150.5</fitness:weight_target>

<fitness:activity_id>567</fitness:activity_id>

<fitness:calories_id>567</fitness:calories_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”activity”>

<fitness:activity_id>78</fitness:activity_id>

<fitness:heart_rate_id>567</fitness:heart_rate_id>

<fitness:sleep_id>567</fitness:sleep_id>

<fitness:steps_id>567</fitness:steps_id>

<fitness:running_id>567</fitness:running_id>

<fitness:cycling_id>567</fitness:cycling_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”smartphone”>

<fitness:smartphone_id>56</fitness:smartphone_id>

<fitness:call_data>567</fitness:call_data>

<fitness:text_data>567</fitness:text_data>

<fitness:calender_data_alert>567</fitness:calender_data_alert>

<fitness:device_id>567</fitness:device_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”sleep”>

<fitness:sleep_id>56</fitness:sleep_id>

<fitness:sleep_start_time>12:15:09</fitness:sleep_start_time>

<fitness:sleep_end_time>15:21:29</fitness:sleep_end_time>

<fitness:sleep_average>13:15:27</fitness:sleep_average>

</rdfs:Class>

<rdfs:Class rdf_ID=”steps”>

<fitness:steps_id>56</fitness:steps_id>

<fitness:daily_steps>1334</fitness:daily_steps>

<fitness:weekly_steps>54676</fitness:weekly_steps>

<fitness:monthly_steps>4567687</fitness:monthly_steps>

<fitness:average_steps>34545</fitness:average_steps>

<fitness:flights_climbed>47</fitness:flights_climbed>

<fitness:location_id>567</fitness:location_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”cycling”>

<fitness:cycling_id>56</fitness:cycling_id>

<fitness:daily_cycle>200</fitness:daily_cycle>

<fitness:weekly_cycle>1208</fitness:weekly_cycle>

<fitness:monthly_cycle>48676</fitness:monthly_cycle>

<fitness:average_cycle>34069</fitness:average_cycle>

<fitness:location_id>567</fitness:location_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”running”>

<fitness:running_id>56</fitness:running_id>

<fitness:daily_run>15.7</fitness:daily_run>

<fitness:weekly_run>75.9</fitness:weekly_run>

<fitness:monthly_run>450.6</fitness:monthly_run>

<fitness:average_run>124.8</fitness:average_run>

<fitness:location_id>567</fitness:location_id>

</rdfs:Class>

<rdfs:Class rdf_ID=”location”>

<fitness:location_id>56</fitness:location_id>

<fitness:latitude>41.40338</fitness:latitude>

<fitness:longitude>2.17403</fitness:longitude>

</rdfs:Class>

</rdf:RDF>

PROV Model Source Code

<prov:document

xmlns_xsi=”http://www.w3.org/2001/XMLSchema-instance”

xmlns_xsd=”http://www.w3.org/2001/XMLSchema”

xmlns_prov=”http://www.w3.org/ns/prov#”

xmlns_fitness=”http://fitnesstracker.com/ns/fitness#”

xmlns_tr=”http://fitnesstracker.com/ns/tr#”>

<!– Entities –>

<prov:entity prov_id=”fitness”>

<fitness:title>WearableFitnessDevices</fitness:title>

</prov:entity>

<prov:entity prov_id=”fitness:User”/>

<prov:entity prov_id=”fitness:Address”/>

<prov:entity prov_id=”fitness:Sleep”/>

<prov:entity prov_id=”fitness:HeartRate”/>

<prov:entity prov_id=”fitness:Friends”/>

<prov:entity prov_id=”fitness:Smartphone”/>

<prov:entity prov_id=”fitness:Device”/>

<prov:entity prov_id=”fitness:DeviceDisplay”/>

<prov:entity prov_id=”fitness:Activity”/>

<prov:entity prov_id=”fitness:Goals”/>

<prov:entity prov_id=”fitness:Breathing”/>

<prov:entity prov_id=”fitness:Calories”/>

<prov:entity prov_id=”fitness:Running”/>

<prov:entity prov_id=”fitness:Cycling”/>

<prov:entity prov_id=”fitness:Steps”/>

<prov:entity prov_id=”fitness:BodyData”/>

<prov:entity prov_id=”fitness:Location”/>

<!– Activites –>

<prov:activity prov_id=”fitness:create”/>

<prov:activity prov_id=”fitness:add”/>

<prov:activity prov_id=”fitness:edit”/>

<prov:activity prov_id=”fitness:trackActivity”/>

<!– UsageandGeneration –>

<prov:used>

<prov:activity prov_id=”fitness:create”/>

<prov:entity prov_id=”fitness:user”/>

</prov:used>

<prov:wasGeneratedBy>

<prov:entity prov_ref=”fitness:device”/>

<prov:activity prov_ref=”fitness:create”/>

</prov:wasGeneratedBy>

<prov:used>

<prov:activity prov_id=”fitness:add”/>

<prov:entity prov_id=”fitness:address”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:add”/>

<prov:entity prov_id=”fitness:bodydata”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:add”/>

<prov:entity prov_id=”fitness:friends”/>

</prov:used>

<prov:used>

<prov:activity prov_ref=”fitness:trackActivity”/>

<prov:entity prov_ref=”fitness:running”/>

</prov:used>

<prov:used>

<prov:activity prov_ref=”fitness:trackActivity”/>

<prov:entity prov_ref=”fitness:cycling”/>

</prov:used>

<prov:used>

<prov:activity prov_ref=”fitness:trackActivity”/>

<prov:entity prov_ref=”fitness:heartRate”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:trackActivity”/>

<prov:entity prov_id=”fitness:steps”/>

</prov:used>

<prov:wasGeneratedBy>

<prov:entity prov_ref=”fitness:goals”/>

<prov:activity prov_ref=”fitness:create”/>

</prov:wasGeneratedBy>

<prov:wasGeneratedBy>

<prov:entity prov_ref=”fitness:location”/>

<prov:activity prov_ref=”fitness:trackActivity”/>

</prov:wasGeneratedBy>

<prov:wasGeneratedBy>

<prov:entity prov_ref=”fitness:sleep”/>

<prov:activity prov_ref=”fitness:trackActivity”/>

</prov:wasGeneratedBy>

<prov:used>

<prov:activity prov_id=”fitness:edit”/>

<prov:entity prov_id=”fitness:user”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:edit”/>

<prov:entity prov_id=”fitness:address”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:edit”/>

<prov:entity prov_id=”fitness:bodyMeasurements”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:edit”/>

<prov:entity prov_id=”fitness:friends”/>

</prov:used>

<prov:used>

<prov:activity prov_id=”fitness:edit”/>

<prov:entity prov_id=”fitness:goals”/>

</prov:used>

<prov:wasGeneratedBy>

<prov:entity prov_ref=”fitness:user”/>

<prov:activity prov_ref=”fitness:create”/>

</prov:wasGeneratedBy>

<!–  AgentsandResponsibility  –>

<prov:agent prov_id=”fitness:1″>

<prov:type>prov:User<prov:type>

<fitness:forename>John</fitness:forename>

<fitness:surname>Doe</fitness:surname>

<fitness:email>[email protected]</fitness:email>

<fitness:dob>11-10-94</fitness:dob>

<fitness:sex>male</fitness:sex>

</prov:agent>

<prov:wasAssociatedWith>

<prov:activity prov_ref=”fitness:create”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAssociatedWith>

<prov:wasAssociatedWith>

<prov:activity prov_ref=”fitness:add”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAssociatedWith>

<prov:wasAssociatedWith>

<prov:activity prov_ref=”fitness:edit”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAssociatedWith>

<prov:wasAssociatedWith>

<prov:activity prov_ref=”fitness:trackActivity”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAssociatedWith>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:User”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:Address”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:Sleep”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:Activity”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:Running”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:Cycling”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:Steps”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<prov:wasAttributedTo>

<prov:entity prov_ref=”fitness:BodyData”/>

<prov:agent prov_ref=”fitness:1″/>

</prov:wasAttributedTo>

<!–  RevisionandDerivation  –>

<entity prov_id=”Device1″/>

<entity prov_id=”Goals1″/>

<entity prov_id=”Location1″/>

<prov:wasDerivedFrom>

<prov:generatedEntity prov_ref=”fitness:Device1″/>

<prov:usedEntity prov_ref=”fitness:Device”/>

<prov:type>prov:Revision</prov:type>

</prov:wasDerivedFrom>

<prov:wasDerivedFrom>

<prov:generatedEntity prov_ref=”fitness:Goals1″/>

<prov:usedEntity prov_ref=”fitness:Goals”/>

<prov:type>prov:Revision</prov:type>

</prov:wasDerivedFrom>

<prov:wasDerivedFrom>

<prov:generatedEntity prov_ref=”fitness:Location1″/>

<prov:usedEntity prov_ref=”fitness:Location”/>

<prov:type>prov:Revision</prov:type>

</prov:wasDerivedFrom>

</prov:document>

Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Services

View all

DMCA / Removal Request

If you are the original writer of this dissertation and no longer wish to have your work published on the UKDiss.com website then please: