• Sean Lange - Friday, February 24, 2017 1:30 PM

    Lynn Pettis - Friday, February 24, 2017 1:19 PM

    On something completely different, I was just looking at an internal database built by a developer.  If I posted this database schema here you would see Mr. Celko galloping in on his white horse.  Every table has a primary key with the name "id".
    Actually, I can see his point on this one as I am looking at this database.

    Having every table with a primary key name of id is one of the things that I totally agree with Joe on. It is just awful. It forces one of my biggest pet peeves in data design which is a single piece of information (column) having different names across the system. And everything being id forces that for sure. If it is a PersonID it should be a PersonID in every single table. Sure it makes Person.PersonID a little redundant but better than weird predicates like "p.ID = someOtherTable.PersonID". 😀

    Sean, I am actually agreeing with you and Joe on this, just that if I posted he'd ride in on his white horse and beat me over the head.

    Also, I have a feeling this may have been partly done through the tool they used to build the database and application code.  I may be wrong, however.