3 ms·
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
by sireat 4y ago
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?
- CuriouslyC 4y agoIf 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.
- arethuza 4y agoThere 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.
- datalopers 4y agoForeign 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.