| Author |
Topic |
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-09-20 : 03:46:40
|
| Imagine the scenario (shouldn't be difficult)User - All my queries and reports are wrong because your database stores some datetimes when I just want a date.I have a number of things that I would like to say to this (most unrepeatable on a family forum) but I was wondering what (practical) suggestions people may have regarding this sort of situation. In particular, what would convince one of us that the other was rightthankssteveFacts are meaningless. You could use facts to prove anything that's even remotely true! |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-20 : 03:53:05
|
is this with netadmin again stevie? is your user a developer? if yes, then introduce him to convert functions, format functions in his development software and tell him as nicely as possible that dates are supposed to be saved as datesor you could just force him to use a function that you'll create for him everytime he queries that column --------------------keeping it simple... |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-09-20 : 06:28:34
|
quote: is this with netadmin again stevie?
Jen you're wicked - I like that User is not really a developer, is more an ad hoc query writer. These particular dates are stored as datetimes as I didn't want the overhead of taking the time part out and there was a small chance the time part would provide useful information. User is not convinced by our discussions as he doesn't want to change the way he writes his queries. I'm currently tempted to give him a view and be done with itsteveFacts are meaningless. You could use facts to prove anything that's even remotely true! |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-20 : 07:31:07
|
"give him a view"What? Of your boot? If its a recurring need a VIEW seems best. Or a presentation layer Kristen |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2005-09-20 : 08:50:41
|
| Just checking, Steve, but it's not that they're complaining about there being different intended precisions for the datetimes in different rows of the same column? If they were, that might be a quite legitimate concern. |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-09-20 : 11:38:01
|
Anyone writing queries is a developer, but maybe just a lazy and/or stupid one.If he doesn't like writing queries against the database the way it stands, well, tough. Tell him you are not forcing him to write queries and you aren't his babysitter.quote: Originally posted by elwoosUser is not really a developer...User is not convinced by our discussions as he doesn't want to change the way he writes his queries.
CODO ERGO SUM |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-09-20 : 13:59:48
|
Arnold - no different precisions but that is a good point. This is a single event date.Michael - quote: Anyone writing queries is a developer
I can see your point however in this case the guy is (arguably) a superior and I would certainly much rather deal with him than his bossThanks for the comments guys - what I find interesting and slightly dissapointing is that there are no really compelling reasons suggestedsteveFacts are meaningless. You could use facts to prove anything that's even remotely true! |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-09-20 : 14:15:09
|
so if the time portion isn't needed just set it to 00:00:000 and that should be it, no?Go with the flow & have fun! Else fight the flow |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-09-20 : 17:26:10
|
| Hi spirit, it's not set to 0 as I'm not convinced that this what is needed, the date(time) is the date(and time) that a button was pressed on an app on the other side of the country. I would have thought that was valuable data should there ever be a serious question raised about it (potential albeit slim of legal repercussions). From the users perspective it breaks their way of thinking as to how they should write a query. As I said I didn't zero it as I didn't want the overhead when importing the data into my system as to me it seems a waste of resourcessteveFacts are meaningless. You could use facts to prove anything that's even remotely true! |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-09-20 : 17:53:51
|
i don't understand one thing:you want to leave the time portion or can you set it to zero?if you can set it to zero then it's a matter of one update statement.if not and it's really such a big deal to the dev's put a view over the table and that's it.i'd go to the dev and slap him around a bit, though... Go with the flow & have fun! Else fight the flow |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-09-20 : 22:57:37
|
| The first question seems to be: Is the table design correct the way it is?If the answer is yes, then the developer needs to deal with the data the way it is.Tables should be designed to correcly model the data, not to make life easy for a junior level developer.CODO ERGO SUM |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-20 : 23:34:15
|
| also in addition to MVJ, the table is not exclusive for his use only,think in terms of scalability, to cater to his need, do you want otherfuture users to give you the same problem, asking why didn't you include the time?--------------------keeping it simple... |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-09-21 : 00:10:15
|
| I usually just tell them they're an IDIOT!!MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-09-21 : 03:09:50
|
quote: i'd go to the dev and slap him around a bit
I like these sorts of options - thanks to everyone for their comments. Just for some background, it's a legacy database and the organisation I am in is quite complex and it means that people who aren't employed in any sort of IT role frequently do this sort of stuff and it's very difficult for me to stop them completely (partly coz they won't give me the staff to do this sort of thing and partly coz they would prefer to spend some of the money on Network admins - but that's another story)steveFacts are meaningless. You could use facts to prove anything that's even remotely true! |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-21 : 04:48:57
|
"it's very difficult for me to stop them completely"+1 for Derrick's method then Kristen |
 |
|
|
|