Reputation: 14604
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:
is the data structure I mention above a good way to start? or what would we your recommendation?
what MySQL data Type is usually used for the Date parameter, in similar project?
Upvotes: 2
Views: 548
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