This work addresses the problem of obtaining the degree of similarity between trajectories of moving objects. Typically, a Moving Objects Database (MOD) contains sequences of (location, time) points describing the motion of individual objects, however, they also implicitly storethe velocity - an important attribute describing the dynamics the motion. Our main goal is to extend the MOD capability with reasoning about how similar are the trajectories of objects, possibly moving along geographically different routes. We use a distance function which balances the lack of temporal-awareness of the Hausdorff distance with the generality (and complexity of calculation) of the Fréchet distance. Based on the observation that in practice the individual segments of trajectories are assumed to have constant speed, we provide efficient algorithms for: (1) optimal matching between trajectories; and (2) approximate matching between trajectories, both under translations and rotations, where the approximate algorithm guarantees a bounded error with respect to the optimal one.