Modeling and Quering Periodic Temporal Databases