Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Paul] Missing DATETIME table field type! Several database tables affected

Quote Reply
Re: [Paul] Missing DATETIME table field type! Several database tables affected In reply to
I will not add duplicate columns into a database. Our database already has the needed fields, but it is not correctly designed (or it is sub-designed, if we accept that ``YYYY-MM-DD HH:MM:SS'' would already contain all the informations the ``YYYY-MM-DD'' format has).

Bill Gates said: "640KB are enough for everyone".

Some of you say, it is enough to use ``YYYY-MM-DD'' as add date, and nobody will ever need the time information of this format: ``YYYY-MM-DD HH:MM:SS''.
Really nobody will need the time element?
I'm the first example, that it is required. And maybe there are a few others, who do not read that thread...

Alex, please excuse me, and do not misunderstand me. I do not want to hurt you, or to criticize you. Just want to convince Paul, that he is sticking to something, that could be solved without real big problems (but it seems I can not convince him). Unfortunately the subject is affecting your current database structure a bit (at least Add_Date & Mod_Date fields). Sorry.

Paul, I know, there could be possible to add (better say duplicate) 2 database columns, but I do NOT prefer doing such things, to have add date and mod date fields duplicated in the database.
It seems the database structure was subdesigned (IMPO).

Let me ask opinions about that, on some IRC (database related) channels...
Question:
- I have following database fields: Add_Date (DATE type) and Mod_Date (DATE type). I got suggested to add 2 new columns Add_Date2 (DATETIME type), and Mod_Date2 (DATETIME type), just to avoid upgrading Add_Date and Mod_Date column types from DATE to DATETIME, and change of the perl script which is managing the database.
What do you think, what should I do? Should I do database upgrade and change types from DATE to DATETIME, or should I add Add_Date2 and Mod_Date2 new fields with DATETIME type?


Answer1:
- If you had a lot of code that cared what the format wuz, then maybe you would want to just add more columns.
But, if you don't want to fill up your database with duplicate data, just alter your table and fix it and any code that might have to change.
So why are you asking us? To support you wanting to be lazy?
- Nope. While I say the database, should be not have duplicated data, the other guy who suggested me to add 2 duplicate columns, is sticking to his opinion, that: better to have duplicates, that to need to do the changes in the perl script, which is treating the database.
- oh i see.. you want us to support your side in an argument?
- yep, exactly :)
- yes, W33, i agree with you in principle


Answer2 (another channel):
- We have following database fields: Add_Date (DATE type) and Mod_Date (DATE type).
An another developer says, that we should not upgrade it from DATE to DATETIME, but instead we should add 2 new columns Add_Date2 (DATETIME type), and Mod_Date2 (DATETIME type).
- just use wotever data type is appropriate and ditch the other
- An another developer says, that we should not upgrade it from DATE to DATETIME, but instead we should add 2 new columns Add_Date2 (DATETIME type), and Mod_Date2 (DATETIME type).
- So we will have duplicate data in the database just to avoid upgrade of the Add_Date and Mod_Date fields, and change of the perl script which is managing the database.
- storing the same info more than once is just plain stupid


I bolded the final conclusion of discussions. It seems there are several opinions beside mine.
Paul, I think you failed to prove that you are right. Cool

I do not think, that Alex will do the suggested change to DATETIME, because (likely thanks to your influence) now several users may think, that my suggestion is wrong, and my plugin would destroy their databases.
No, this is not true. A correct upgrade solution could seamlessly correct the problem, without affecting any feature or core functionality of LinksSQL.

Quote:
If you still insist that Alex re-writes the code (I'd be _very_ surprised if he did)....then I guess we have all been wasting our breath and I will put my energies elsewhere.
Finally it seems, you are extorting Alex, that you will leave the forum, if he does that change.
Hmmm. That explains itself.

Webmaster33
Subject Author Views Date
Thread Missing DATETIME table field type! Several database tables affected webmaster33 9417 Aug 28, 2002, 3:18 PM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Alex 9266 Sep 5, 2002, 2:00 PM
Thread Re: [Alex] Missing DATETIME table field type! Several database tables affected
webmaster33 9277 Sep 6, 2002, 3:37 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
yogi 9249 Sep 6, 2002, 4:10 AM
Thread Re: [yogi] Missing DATETIME table field type! Several database tables affected
webmaster33 9256 Sep 6, 2002, 4:56 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9305 Sep 6, 2002, 5:06 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9207 Sep 6, 2002, 6:42 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9219 Sep 6, 2002, 6:53 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9226 Sep 6, 2002, 7:50 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9238 Sep 6, 2002, 7:54 AM
Post Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9210 Sep 6, 2002, 7:59 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
pugdog 9210 Sep 6, 2002, 8:09 AM
Post Re: [pugdog] Missing DATETIME table field type! Several database tables affected
webmaster33 9175 Sep 6, 2002, 8:22 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
yogi 9245 Sep 6, 2002, 5:10 AM
Thread Re: [yogi] Missing DATETIME table field type! Several database tables affected
webmaster33 9185 Sep 7, 2002, 4:16 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9182 Sep 7, 2002, 4:48 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9161 Sep 7, 2002, 9:35 AM
Post Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9146 Sep 7, 2002, 10:12 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9184 Sep 7, 2002, 9:42 AM
Post Off topic again
Ian 9172 Sep 7, 2002, 10:19 AM
Post Re: [Alex] Missing DATETIME table field type! Several database tables affected
webmaster33 9081 Dec 28, 2002, 8:17 AM
Thread Re: [Alex] Missing DATETIME table field type! Several database tables affected
webmaster33 9105 Dec 29, 2002, 5:54 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9062 Dec 29, 2002, 7:32 AM
Post Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9045 Dec 29, 2002, 7:51 AM