From a biz strategy perspective, we can scale up a lot faster if all we need to do is find people who know (or can be taught) SQL.
Consider the amount of time it would take to ramp someone on 1 SQL schema vs the entire C# ecosystem.
For us, the application is quickly turning into a dumb funnel that just gets data and requirements (queries) into SQLite databases for eval. We put a web interface around all this so it can be easily managed on a per-customer basis.
When everything is a SQL query, you can trivially export/import/clone customer configurations to rapidly bootstrap new ones.
Disclosure: I write SQL queries just like Tarzan spoke English.
[†] I used to be considered completely “full stack” but that was numerous years ago, and I enjoy my non-techie hobbies too much to have time to keep up-to-date with everything!
[‡] “senior” as in citizen…
Also: I think knowing your way around triggers and such is quite important too though. I should learn them properly some day.
The same table stores: Addresses (primary, secondary), sex, names (up to 3), date of birth, what currency, and many MANY more values.
Yes, that's one table.
Also: Another table literally stores full tables in it. (Basically some kinda key with which to identify the subtable so you can select on it.)
Progress has no real concept of set based queries, instead it accesses all tables like a cursor.
And that's not even scratching the surface. The DB is bad and should feel bad. Just yesterday I went into a 2 hr rant about it with some people I often talk to.
Foreign keys, too, are a foreign concept to progress. But hey, work is work.
Some denormalization is sometimes warranted. As for the rest I agree with you. Sounds like madness.
This DB is many things, but most definitely not thiught out.
Basically nothing is normalized.
However, one thing that could be done is to use views (maybe scoped in their own schema) to make the database look normalized (Facade the database). This would help with writing future SQL.
It is then possible to iteratively normalize the underlying tables by pointing legacy code at the normalized views until the denormalized tables are no longer in use. Finally, "convert" the views into tables and drop the denormalized tables.
(I have to write the sync code from the new system to the old one)
I've had the displeasure of working with databases with triggers that fire other triggers, and all that logic should've been moved into the application itself. They're a powerful tool to have in your toolbox, but should be used sparingly, and should be kept as simple as possible.
Personally, unless there's a compelling reason, I'll stick to SQL for 'core' data storage. NoSQL is cute, but changing data structures over time is horror.