On 24/08/2024 03:46, frosty wrote:
> I'm teaching a "Pick" training class this week and next, so I've got a
> current perspective on this. Only one trainee in the class, a young man
> with a computer science degree, and some experience with modern
> languages (Python, TypeScript) and SQL databases. The kind that give you
> a blank stare when you try to explain a Pick-like environment. I've got
> a couple basic themes that I've repeated for five days and will repeat
> for another five days: (1) Everything is an Item in a File (2) Every
> Attribute of every Item is a string (3) It's not a database; it's a data
> store (4) If you're rigid in your structure of the shape of the data in
> each attribute, you can treat an Item in a File as if it were, in truth,
> a row in a database.
Thanks to the name of the ScarletDME, I'd change (3) to say it's a Data
Management Environment - I think that's a very good description.
(2) It's not "Every attribute of every item", it's "Everything" is a string.
And (4) It's a DEscriptive database not a PREscriptive database.
Everything in a File should be in 4th Normal Form. You don't normalise
your data to create your tables then denormalise to try and regain what
you've just lost. What you do is an EAR analysis.
Entity - what real-life objects are you storing - these are your tables.
Attributes - what are the attributes of those objects. (This includes
relationships - the foreign keys of related objects are attributes of
this object.) And do you have any "foreign" attributes - this indicates
you've got your entity analysis wrong. Don't forget you can store
multiple values of an attribute in a single row.
Relationships - foreign keys that link to other rows in other tables.
(Knowing how to do a relational analysis is great. Failing to realise
that academic theory is usually fails miserably in the real world is awful.)
You said this guy had a Computer Science degree and "some experience
with SQL databases". That's like claiming your history degree gives you
an understanding of British History simply because you studied the
Tudors! Talk about Google Big Query - how it's re-inventing the
MultiValue data structure. Talk about Amazon DynamoDB - a schema-less
3rd-gen NoSQL database that uses key-value like the underlying Pick
datastore. Basically, in a polite way, tell him if all he knows is SQL
then his degree was seriously lacking in any real-world content
(actually, isn't that true of most degrees?).
And a biggy - Pick is BLINDING FAST. I had this discussion recently on
LWN - the academicians are obsessed with "constant response time" - they
want guaranteed O(log-n) response so they can guarantee the database
will respond. In order to do this, the cost of making the slow queries
faster is to slow everything down - EVERYTHING takes O(log-n) time. Pick
accepts that some queries will be slower than others, but that makes the
majority of queries O(1) - "instant response".
SQL/Relational says "don't worry about optimising your data, we'll do
that for you". Pick says "you're a database analyst - ANALYSE!!!". Pick
pushes far more work onto the analyst programmer up front, but the
result is a database that's a joy for the user, not one like I have at
work where operations typically take 15 minutes or more, and in the
morning pretty much everything falls over with "database timeout" errors!
Cheers,
Wol