Reputation
826
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 9
Impact
~33k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Mar
16
comment Is an ER diagram an example of a conceptual, logical or physical schema?
No it's not a good answer. E.g. documenting which indexes are defined on a table using ER gives crippled results no matter how you toss or turn it. And how do I document the physical details (say, page size) of the set of disk files that hold the database, using ER ?
Feb
24
comment SQL CLR in MySQL?
I would advise you to first think a bit about how you are going to deal with commits and rollbacks.
Nov
24
comment Professor told us to store serialized Java objects as blobs instead of defining relational tables
"The answer by Justin Cave says, that you should go with the second option." That is not true. The answer by Justin Cave said that if you wanted to store serialized objects, you're better off doing it in a (the) file system.
Sep
12
comment DB2 developers can't create table in own schema but SQL and Oracle devs can. Justified?
Well if your agenda is just to dismiss the mainframe as "legacy" technology, there's obviously a lot left for you to learn, and a few comments or answers here won't suffice to do the job. Just be aware that providing isolated environments on the mainframe is most of all an economical (financial) problem, not a technological one.
Sep
11
comment DB2 developers can't create table in own schema but SQL and Oracle devs can. Justified?
Perhaps too philosophical, but the essence of a mainframe is to share. And the software that runs on it typically reflects that essence.
Jul
14
comment Slow DELETE in MySQL with a subquery
Aaaaargh. stackoverflow.com/questions/45494/… Apply solutions suggested over there or switch to a better dbms.
May
19
comment How to SELECT multiple COUNT(*) columns with each GROUP BY having a different WHERE clause?
Are you sure RIGHT outer join is the correct thing to use ?
Apr
1
comment Find actual data size from a query?
"Size" is not a property of "data".
Jan
3
comment An example of a relation without any functional dependency?
You should strike through that incorrect sentence where you say "yes, I believe". Then what remains is the correct answer.
Jan
3
comment Find the highest graded student, using Tuple Relational Calculus
"Tuple relational calculus does not have a set difference operator"
Oct
9
comment How to get performance benefits from a view vs subquery?
More importantly, if a CTE is referenced multiple times, this fact by itself is not sufficient to deduce that the optimal access paths for each of the contexts in which they appear are also identical. Think any CTE, with attributes say A and B, being tested once for "does it contain a tuple where A=1" and elsewhere being tested for "does it contain a tuple where B=7". The CTE is the same, the optimal access paths for the two usages of the CTE most likely aren't, and neither of them necessarily involves full evaluation.
Apr
3
comment Handling expiration in a course registration or ticketing system
And in addition, create views such as REGISTRATION_EXPIRED_WITHOUT_PAYMENT and REGISTRATION_UNPAID_UNEXPIRED.
Mar
13
comment Representing SQL constraints on a table
Chris, The accepted answer in that post does not give a declarative solution, and the answer by AKuznetzov forces three extra columns upon the user, and I'm not sure it is entirely impossible for the user to have the integrity test fail because of mistakes in those extra three columns.
Mar
12
comment Representing SQL constraints on a table
Even if he dropped the floor condition, can he have his constraint enforced declaratively with those engines that you mention ?
Mar
2
comment Why is optimistic locking faster than pessimistic locking?
No it doesn't. That's why it's "faster".
Feb
20
comment Database functional dependency BCNF help
As far as normal forms theory is concerned, yes. As far as logical database design is concerned, remember that xNF is not where the story ends.
Feb
18
comment ORDER BY clause is allowed over column that is not in SELECT list?
Or it wouldn't. A table is explicitly defined by the standard to be an "unordered collection of rows". Make that fit with ORDER BY clauses ...
Feb
18
comment ORDER BY clause is allowed over column that is not in SELECT list?
For the problem the OP describes, just putting the ORDER BY before the SELECT will do the job. Don't read too much into these kinds of "flowcharts of query processing". They are rarely intended for being 100% accurate and complete. Rather, they are intended for illustrating somewhat globally what goes on as a consequence of an SQL statement being issued.
Feb
1
comment What is the correct result for this query?
@Kevin did you ask ISO for permission to copy ? :-)
Jan
29
comment What is the correct result for this query?
Well the key issue is whether it's indeed true that "even if the table has no rows at all, it's still one group of 0 rows". And the standard turns out to be explicit about this : "If there are no grouping columns, then ... is the grouped table consisting of T as its only group". (and that holds even if T is empty - so there is indeed a group.) Further on, the having clause specifies that the condition is applied to each group (in the example thus once). They probably defined it this way to make SUM and COUNT return one row even for empty T's.