News for hackers. Stuff that matters.
Re:Ask HN: Is DBA still a good job? by sireat on Monday May 09, 2022 @08:23AM (#31313223)
What is the idea behind no foreign keys? Seems quite crazy.

Surely that defeats the whole relational database concept?

Without FKs you have no clearly defined relations.

Is the idea that you have no constraints imposed by FKs, but tables still have some sort of informal relation?

Re:Ask HN: Is DBA still a good job? by arethuza on Monday May 09, 2022 @10:13AM (#31314238)
There were no foreign key constraints at the database level - the application must have been holding and enforcing the relevant constraints.

A bit of a pain when you are looking at the SQL database trying to understand how it is structured so you can extract data in a meaningful way.

Re:Ask HN: Is DBA still a good job? by datalopers on Monday May 09, 2022 @10:40AM (#31314597)
Foreign keys as a concept are a critical portion of a data model, but may reasonably choose to not enable them via schema constraints due to write performance, scaling, sharding, or replication issues.
Re:Ask HN: Is DBA still a good job? by CuriouslyC on Monday May 09, 2022 @08:38AM (#31313333)
If you have a super high write throughput table (say a constant stream of sensor data) foreign keys and extra indexes can slow it down to too much. Besides that, you should always use foreign keys.