\section{Conclusion}\label{sec:conclusao}

In this paper, we presented a set of requirements for trajectory modeling and analysis that allow users to: (i) represent and query trajectories of moving objects as first class objects; and (ii) add semantics from the application domain to moving object trajectories thereby allowing real-time and historical analyses. To meet these requirements, we proposed two design patterns, one for semantic trajectories in a transactional object-relational DBMS and another for semantic trajectories in a multidimensional database. We also specified two algorithms to help the construction of trajectory objects from a raw dataset in a transaction environment, as well as to populate multidimensional schemas from the object-relational database. To validate our main contributions, we illustrated our proposals by developing a real world application scenario based on large datasets concerning truck fleet management.

Trajectory management applications require using decision-support tools in both environments to perform both real-time and historical analyses. In addition, specific aggregation functions over moving object trajectories should be developed. This paper contributes with an integrated solution to these requirements. To the best of our knowledge, this is the first paper in the trajectory data management literature that copes with all these issues together.

As future work, we are interested in performing a more formal and detailed requirement analysis and in creating a complete and optimized application for a long period of tests in a real corporation environment. Another point that requires further investigation concerns the design of aggregation functions for trajectories, which needs a formal and complete study to treat trajectories as complex and first class objects, including aggregation with respect to the semantic information (i.e. events) and to other spatial structures, such as polygon geometries (e.g. areas or regions of interest) and points (e.g. clients or truck fleet bases). 
