Timothée HENRY
Timothée HENRY

Reputation: 14604

Database structure for tracking data across time

I wish to build a MySQL database that will track information across time (once a day).

For example, a list of URLs, and several parameters related to the URL for which I wish to track the values every day.

So I am thinking of a data structure as follows:

URL-ID {
  {
    URL,
    Date { value_parameter1, value_parameter2 }
}

As this is the first time I am working with a time-based information database, I would appreciate some guidance. In particular:

Upvotes: 2

Views: 548

Answers (1)

Quassnoi
Quassnoi

Reputation: 425261

The structure is called Slowly Changing Dimension, type 4. Yes, it is legitimate and usable.

To tell if it fits your needs we would need to know a little more about your model.

To store dates, you should use type DATE.

Upvotes: 2

Related Questions