• You asked for real world examples of problems that can't be solved by SQL. I've given one already: the ability to enforce a constraint that an Order must contain at least one Item in the item table. That's an example of a problem I've encountered many times professionally and is a well-known textbook limitation of SQL. This and other business rule type of problems have to be solved by procedural code or by other software outside the SQL DBMS - frequently at great expense. A RDBMS with more general constraint capabilities would eliminate or reduce that expense.

    Interesting problem, but easily solved by adding a foreign key constraint to the Orders table, referencing the OrdersItems table (a join table between Orders and Items). Expense = one line of code, if you've defined your primary keys correctly and modeled the tables and data correctly. If the people writing those textbooks can't come up with something as simple as that, then they've got bigger problems than they think.

    Next unsolvable problem?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon