From: Warren Young Date: October 18 2011 7:47pm Subject: Re: Example for replacefrom() code for mysqlpp List-Archive: http://lists.mysql.com/plusplus/9457 Message-Id: <087DFCDE-3BFC-4CA9-A44E-5A35B0C5F3F1@etr-usa.com> MIME-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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. >=20 > 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.