writing.exchange is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small, intentional community for poets, authors, and every kind of writer.

Administered by:

Server stats:

333
active users

#databases

16 posts13 participants0 posts today

Is it a code smell for a table in Postgres to have mutually exclusive foreign keys?

For example, table A has foreign keys to table B and C, but there's a constraint in place where only one of those foreign keys can be populated.

My gut says I should be creating separate tables for these, as I'm effectively trying to tie a single table to multiple domain models (that happen to share the same fields).

- awstip.com/mastering-django-or

-----------------------
Django ORM turns complex database queries into simple Python code. Instead of writing long SQL statements, you can use:

- Basic filters (filter(), exclude(), get()) to find exactly what you need.
- Smart optimisations (select_related(), prefetch_related()) to speed up your app.
- Handy tricks (annotate(), aggregate()) for calculations without extra code.
-------------------------------------

AWS Tip · Mastering Django ORM: From Models to Advanced QueriesBy Dheeraj Prakash S
Replied in thread

@nixCraft

#LibreOffice

The #free and #private office suite is a powerful, free and private office suite the successor project to #OpenOffice used by people around the world. It's #compatible with Microsoft Office (#365) and is backed by a non-profit organization, The Document Foundation. LibreOffice includes Writer (word processing), Calc (#spreadsheets), Impress (presentations), Draw (vector graphics and #flowcharts), Base (#databases), and Math (formula editing).

libreoffice.org/discover/libre

www.libreoffice.orgWhat is LibreOffice? | LibreOffice - Free and private office suite - Based on OpenOffice - Compatible with MicrosoftLibreOffice, Free Office Suite, Fun Project, Fantastic People, Writer, Calc, Impress, Draw, Base, Charts, Diagrams, extensions, templates, word processor, text editor, spreadsheet, presentation, database, documents, Document Foundation