How is the performance of these methods different?
This will vary greatly depending on what type of application the database is using.
The first method can be considered an irregular approach, but it might be a good idea if the data is used for an OLAP application. For example, if you often have to collect massive data on a certain day of the month, then this normalization may be justified ... otherwise it would be just a waste of storage and without unnecessary difficulties.
Same thing with the third option ... it's just a de-normalized representation of a date; this may be justified in very limited use, but usually it would be a bad idea.
- EDIT -
De-normalized, I mean the following ...
Say you have an entry with the following fields ...
Date Day Month Year 3/28/2011 28 3 2011
And let's say you need to change the day from the 28th to the 29th. In this case, you need to update two fields: the "Date" and "Day" ... instead of one. If you always remember to upgrade both, then this is not a huge problem. But if you do not, in time you will get something like the following.
Date Day Month Year 3/28/2011 29 2 2009
So what is the actual date? By storing information in one place, you eliminate the possibility of data inconsistency.
- END EDIT -
Which one is best in your opinion and why?
If your database is not used for OLAP ... I would consider the second option as the best.
How will queries to select, insert, and update built for these proposed solutions be carried out?
For the preferred second option, this is trivial.
- SECOND EDIT -
You can pass the date as a string, and MySQL will parse it according to. The date format is "YYYY-MM-DD HH: mm: SS", but you do not need to specify the time if you do not want to store it.
INSERT INTO tablename (date) VALUES ('2011-3-28')
Or if you just want to add the current date ...
INSERT INTO tablename (date) VALUES (CURDATE() )
- END EDIT -