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

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Jul
28
comment Is it reasonable to mark all columns but one as primary key?
It does not make a difference what I think. I tried to explain that having the Id or not does not solve any problem of enforcement of uniqueness of the "business" columns in your table. Enforcement of uniqueness must be done by declaring the appropriate keys (which you do - the fact that you used the syntactic word "CONSTRAINT" instead of "KEY" does not mean it isn't a key).
Jul
28
comment Is it reasonable to mark all columns but one as primary key?
@Rubik, you just have things backwards and upside down. It is NOT the "rows" that must be unique, it is what the business says are their identifiers that must be. If that is a combination of attributes FOO and BAR, then it is the combination of attributes FOO and BAR.
Jul
28
comment Is it reasonable to mark all columns but one as primary key?
What you mean, "illustrate" ? If the business rules say that the combination of values in attributes FOO and BAR must be unique, then adding an ID is not going to achieve that. Adding the ID just facilitates avoiding having to include FOO and BAR as such in referencing tables. Which in turn necessitates more joins because the FOO and BAR attributes (which carry BUSINESS identifiers) are not where they could have been (and where they are very likely EXPECTED to be, at least from a business point of view).
Jul
27
answered Is it reasonable to mark all columns but one as primary key?
Apr
24
awarded  Autobiographer
Apr
20
awarded  Yearling
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
26
answered SQL CLR in MySQL?
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.
Jul
11
revised Slow DELETE in MySQL with a subquery
spelled out in more detail how to apply suggested changes.
Jul
11
answered Slow DELETE in MySQL with a subquery
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
20
awarded  Yearling
Apr
1
comment Find actual data size from a query?
"Size" is not a property of "data".
Jan
16
answered SQL Server auto-trim of varchar value in equal comparison but not like comparison
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.