2,341 reputation
49
bio website
location
age
visits member for 1 year, 8 months
seen 6 hours ago
stats profile views 126

Jun
5
comment Find procedures that haven't been called in <n> days
amazon.com/… If you are doing this, the techniques in here will be invaluable implementing the changes once you identify what you want to change. They will help you keep people informed and help keep you from missing things when you do the drop commands, etc.
Jun
5
comment Need an idea for a complex SQL question
Exactly how do you know how the accepted and any nonaccetped records are relarted? Do they have the same id or some other field that ties them together?
May
29
comment Bit column vs multiple join tables
I like the date idea, conceivably over time someone could be both a student and then an instructor and in reporting you might want to know which one he was at various points in time. One of the biggest weaknesses in many database deisgns is that they don't consider how the data will change over time and what that means for how they intend to use the data (especially in reporting) because the designers are often only concerned with data entry.
May
24
comment Are individual queries faster than joins?
Your answer is so much better than mine, that I deleted mine. This is what I wanted to say but didn't manage to actually say.
May
23
comment Effects of good and bad database designs
Poor Performance is an effect of bad design.
May
14
comment Left Join not giving desired result
Your problem is the data doesn't support the result set you want. You have no payments for fee 300.
May
8
comment Trigger Performance : Is Using Trigger is a good way?
Another benefit of using triggers for auditing it that it catches changes that are made outside the application including those made maliciously by disgruntled employees. Ther are also many times when an ad hoc query is written to change data. Auditing should NEVER be anywhere except the database. Doing it inthe application totally defeats the purpose of auditing.
May
7
comment Tool to view intermediate query results
Of course you are far less likely to get a Cartesian product accidentally if you use explicit joins.
May
3
comment How can we get table name from inside trigger?
and since you would need to change all references to that table why is that a problem? Personally it is rare to ever change a table name in a good design. If you are thinking about changing names, then you probably need to rethink that.
May
3
comment Real-time merge of two databases on different servers
IS there some reason why you haven't tried using replication?
Apr
29
comment Performance issues moving 1 million rows between tables
@dezo, that information is easily avialble in Books Online. This answer is fine as it is. We don't need to spoon feed people.
Apr
18
comment Optimizations Possible - SQLServer
Reallly stop using implict joins, this is the 21st century after all. Those queries are harder to debug, likely to be harder to maintain and are far liklier to return the incorrect result.
Apr
17
comment Why are constraints applied in the database rather than the code?
You should never base a database design on the objects in your application. You would noramlly design this as person, then have a related table to deinfe the persons roles. Then the problem doesn;t come up as you havea realted table for the roles sso people can have multiple roles. If you want to have only one role person, then you constrain the table so that the peopleID is unique. When you want to change that remove teh constraint.
Apr
17
comment Why are constraints applied in the database rather than the code?
Excellent point about application developers designing for the editors and not the users of the data.
Apr
16
comment MySQL: Join one Row in a table with two Rows in other table
If you would never have the case where the person is also the created by or if you would want two records in that case, then use UNION ALL as it tends to be faster.
Apr
16
comment MySQL: Join one Row in a table with two Rows in other table
You did use a join you just used an implict join whch you shoudl stop using as they are SQL antipatterns
Apr
15
comment Approach for a 2,000 table migration
If the structures will be different, it is worth the time to specifically figure out the mappings of every table/column to the new version. That takes a while in 2000 table migration but having amapping document will help you tremendously. Especially when you have differnt datatypes and you must convert them and what to do if the data cannot convert. Your current system may have dates stored in varchar and has some records where the date isn't a real date, if the new system uses date datatypes for dates, then you have to figure out what to do with the data that won't fit into it.
Apr
12
comment How database administrators can see my requests to SQL Server?
Why would a dba answer this question?
Apr
10
comment With SQL Server 2008, how can I roll back a transaction done some time before?
Frankly this is why I believe that any non-trivial database needs audit tables. Any database that stores financial data needs them twice as much.
Apr
10
comment Is there a workaround for lack of support of cascade triggers with MySQL?
That would seem to me to ve a reason not to allow cascade update