On Oct 17, 2011, at 6:20 PM, Adrian Cornish wrote:
>> It wouldn't break my heart to have an AUTOINCREMENT id column in the stock
>> table. It touches lots of things, but the only reason it doesn't have one
>> yet is that there hasn't been a need.
>
> How about I add an auto_increment id to stock (for good DB design)
While auto_increment ID columns are generally good design, they're not a context-free
good. The MySQL++ examples use two unrelated tables only, so the standard reason to have
such a column is missing.
Since adding this column buys nothing, if your replacefrom() example will not use it, and
it probably requires changes to several examples, I don't see a good reason to add it.
Now, if you wanted to add a third table that was tied to `stock` via some relation, that
would be a very different situation.
> also add a unique constraint on the 'item' column - this way the
> example can use the unique constraint
That would be fine with me.