4 ms·
Slightly weird, though grammatically acceptably, as far as I know. But the debate is actually coming from something else your example shows nicely. When you se
by lucumo 3y ago
Slightly weird, though grammatically acceptably, as far as I know.
But the debate is actually coming from something else your example shows nicely. When you select something from a drawer, you select entities. Usually when we select from a relational table, we select properties. In SQL, the drawer is not a thing.
A different way to keep the English-style would be to add a BUT-JUST-[THEIR] clause.
SELECT
FROM socks
WHERE size = 45
BUT JUST [THEIR] color
All fairly tongue in cheek of course. SQL isn't going to change, so there's really no point in worrying too much about it :-)
- Swizec 3y ago> Usually when we select from a relational table, we select properties. In SQL, the drawer is not a thing Ah but that’s by convention! If we want to be super pedantic, they’re all just relations. The drawer table describes a relation between values. And SELECT just defines a new relation! You’re creating an ad-hoc “table”. That’s why “SELECT socks FROM (SELECT socks, pants FROM drawer)” works just fine. Ok yes my brain has definitely been broken by years of SQL. I’m not the right person to understand newbies anymore.
- KittenPassingBy 3y agoThings are records / rows. Collections of the same things are entities (rubber band/ folders). Groups of entities are tables (Drawers). A star schema usually contains one table to one entity mapping. Dynamic tables for custom field on the other hand are usually multi entity tables. In this case, it would be a large junk drawer with various unrelated folders stuffed inside with everything from report cards, to keys to toys, to take out menus. It would have the toys entities, take out menu entities, keys entities, etc inside a mixed table.