178 Personal Content Experience: Managing Digital Life in the Mobile Age • Segmented(count, min, max): a value range that divides the range between min and max into a number of equally large segments. The Next method of the Segmented range is used to move to the next segment. In addition to query conditions, object queries support property fi lter- ing. Property fi lters restrict the number of properties fetched from the server, reducing the required data transfer between the server and the client. An application can use property fi lters to make a query retrieve only those object properties that the application is interested in. Relation queries are used for retrieving relation instances from the database. An application can query what relationships a given object has or what, if any, relationships two metadata objects have. However, the fi rst implementation does not support recursive querying of seman- tic network. For example, let us assume that there are three metadata objects with relationships in the Metadata Engine: song.MP3, which is part of an album that has a cover image image.jpg. Our current proto- type implementation requires two queries if you are searching for the cover image and you use the song as a starting point. First, you need to fi nd the album the song belongs to, and then, in a subsequent query, to fi nd the cover image associated with the album. A proper RDF query would allow fi nding the cover using just one query. Finally, event queries are used for retrieving event instances from the database. Event queries have either a time range or a metadata object as parameters. With the time range, you can fi nd all events that have occurred during the given time range. Similarly, with the metadata object you can fi nd all events the given metadata object is involved in. 5.7.3 Why Use SQL and Especially SQLite as Persistent Storage While designing the framework, we assumed an application developer’s point of view. The main focus was to create API classes that match well to our metadata model. The goal was to create an as natural, simple to use, and effi cient API as possible. Unfortunately, the amount of com- plexity in any given system tends to be constant, if not increasing. As a consequence, if the goal is to make the APIs simple for developers, then the amount of complexity increases in the engine part. This is especially true in our framework. We wanted to provide an API that is fl exible and useable for all kind of metadata needs. As a result, the management of metadata inside the MdE became more complex. We basically had three different options when designing our inter- nal data models and how to keep metadata intact:
Personal Content Experience Page 201 Page 203