MySQL Forums
Forum List  »  Newbie

Re: quickie.. query from version 3 into version 4.1?
Posted by: Erin ONeill
Date: July 27, 2005 03:12PM

Hey Roland!

I guess I need the background stuff to try to understand why people are doing what they're doing. AND how can I do things better. And WHY I should do certain things. The WHY sometimes gets me into trouble but so far with databases it's just helped in the long run (or until the next upgrade or new database!).

I've been away from database stuff and my return is to MySQL and not Oracle. And unlike more Oracle schemas I've worked with it seems to me that MySQL schemas I've looked at have left me scratching my head and wondering why people are doing things the way they are.... Not that I haven't had to clean up some horrendous mistakes in Oracle, because I have.

Thank you for the thoughtful answers. I see the validity in using '' & 0. especially 0. But when I look at the data in my tables - what I'm seeing leads me to think that some php programmer thought it would be cool to eventually collect this data but hasn't gotten around to it yet and the table is bloated with fields that are full of '' & 0 and really the columns should be dropped! I think that phpMyAdmin puts these defaults in when creating tables and people aren't thinking about their data much less their defaults.

If I have a date do I really want the default to be a series of 0's? Or do I want the default to be the day tickets were first available? Am I going to be doing SELECTS where those 0's will come in handy or do I suspect all the tickets will be sold off in 2 days and I want the first day as the default? or I don't want a default because I want the database to force me to give them a date to do an insert?

I think thoughtful analysis on the DATA (not the coding) first and then the coding will usually point out the best solutions for defaults (and especially datatypes!)

But in the mean time I'm gonna encourage my programmers to think really hard about the data they are collecting and what's the best way to put it into table(s).....

thanks,
erin

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.