Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfLRD-001e7o-BS for pgsql-general@arkaria.postgresql.org; Tue, 04 Feb 2025 16:06:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tfLRC-0054CO-D3 for pgsql-general@arkaria.postgresql.org; Tue, 04 Feb 2025 16:06:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfLRB-0054CG-Gp for pgsql-general@lists.postgresql.org; Tue, 04 Feb 2025 16:06:10 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tfLR5-003GD5-1c for pgsql-general@postgresql.org; Tue, 04 Feb 2025 16:06:08 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6B7721140226; Tue, 4 Feb 2025 11:06:02 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Tue, 04 Feb 2025 11:06:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1738685162; x=1738771562; bh=KilUWKCb/9vrWoXTL7ibhckj0yYhns4RMSA8pZ4MIWA=; b= ZgXxdSJxLG3RzQHV4BJZ3SQYS3q3BUGQdHz8Q4ynWBIjJcfcqTtwoXDCGfs00G8M HixYf1oiSf6dC/WPkv4QeNbhZpgzTrrW7MoIPlxNVZrbFJrE99VwQyVQEhXmhT7G /BjvZYnh2blNQ+Qmd2+EWmXnl/nlY5o1+trF1AEyLZdwA9yoXV37QeLBvGKHkcCy qoPwE9Qe/LFrEDwugMpBmY+n1y5KA5PMK7Ckr9NhX1uXIbhWCxIJyPrHQxYzPck+ XhSdGKWn9IQWMsro7gO6b6DcgSgD7fwW7P5aktagPAXwNy9C1FjIFggzGQSaO3em jeXlJYQgCtxd9uSEZB4AHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738685162; x=1738771562; bh=K ilUWKCb/9vrWoXTL7ibhckj0yYhns4RMSA8pZ4MIWA=; b=D0jLrAzgpE/xfqQpq l6RnteSQaYkfQ39NrOCHxutuO0gwwkuydTJrSRrHAfHPU3jFmU0msgd42sT54kpO mm8lRIR1pU1ivQgUJEcCwf+SPrKP31Zr/SHBBJjsFybXktntLGRdXE1FcFL9OM27 06uITNOpf99zNQ8Rphf/ppWGrB06IgLp5ZlGYRVuEWGl4HgJ7LYhEEj9FPLXM0jy YQY1AF3i93RXM5JhcxxyvlfTQaTE8RbytkL86tGdrzddFdBXFw3LJNrSyKGevBVg TxtYiUV0Mbd4TmHEdQx0FeEq3CF8glnmlZZZCqW0s8o5YjMHF/Zf2PEM6e0tVssS eux9g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdeliecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgg gfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgv rhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrg htthgvrhhnpeehtddttdduvedvteffueefhefgieffieduhedtkefgueejheehieeviedu geelgeenucffohhmrghinhepshhqlhhithgvrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtoheprhhonhhljhhohhhnshhonhhjrhesghhmrghilhdrtghomhdprhgtphht thhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Feb 2025 11:06:01 -0500 (EST) Message-ID: Date: Tue, 4 Feb 2025 08:06:00 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Lookup tables To: Ron Johnson , pgsql-general References: <4e7a338-c7d3-e944-20bd-a6e346e175c7@appl-ecosys.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/4/25 07:19, Ron Johnson wrote: > How big is the database?  A tiny 500MB db just for you can get by with > poor design.  (But then, why are you using PG instead of SQLite?) For the reasons listed here: https://sqlite.org/quirks.html In particular: [...] 2. SQLite Is Embedded, Not Client-Server 3. Flexible Typing SQLite is flexible with regard to datatypes. Datatypes are advisory rather than mandatory. 4. Foreign Key Enforcement Is Off By Default [...] > > More importantly, will you ever update the descriptions?  Of course not! > Famous last words.  Having a separate PK means that you update one row > in one column, while what you've done means that tens/hundreds of > thousands of rows in possibly dozens of tables need to be updated. > > It also means that *you* can easily change things in your ad hoc > database *without forgetting* to update a table. > > This is called an "update anomaly" in relational design theory. > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! -- Adrian Klaver adrian.klaver@aklaver.com