From 106dd7d4967bf42831624f9a06a6fb25213b86c7 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 1 Mar 2026 18:03:58 +0100 Subject: Move about relational databases to blog website --- blog/content/notes/index.gmi | 1 + .../notes/tech/about-relational-databases.gmi | 27 +++++++++++++++++++ programming/about_relational_databases.md | 30 ---------------------- 3 files changed, 28 insertions(+), 30 deletions(-) create mode 100644 blog/content/notes/tech/about-relational-databases.gmi delete mode 100644 programming/about_relational_databases.md diff --git a/blog/content/notes/index.gmi b/blog/content/notes/index.gmi index 4c406e81..18311889 100644 --- a/blog/content/notes/index.gmi +++ b/blog/content/notes/index.gmi @@ -21,6 +21,7 @@ Notes about some books I like: => tech/migadu Migadu => tech/ripping Ripping => tech/about-apis About APIs +=> tech/about-relational-databases About relational databases ### Gadgets diff --git a/blog/content/notes/tech/about-relational-databases.gmi b/blog/content/notes/tech/about-relational-databases.gmi new file mode 100644 index 00000000..c66a530f --- /dev/null +++ b/blog/content/notes/tech/about-relational-databases.gmi @@ -0,0 +1,27 @@ +# About relational databases + +## What is a relation? + +A common misconception is that the "relations" in a relational database are about relations between database tables. + +Actually, the relations in a relational database are the tables. + +A relation "relates" a set of values with another set of values. + +For example, a relation can relate the name of a person with their birth date and birth place. For example: + +(person name) => (birth date, birth place) +(Alice) => (1979-12-03, Barcelona) +(Bob) => (1995-03-04, Paris) +... + +Many computer languages have similar concepts: + +* Python mapping types such as dict +* C++ std::map +* Java java.util.Map +* C# System.Collections.Generic.Dictionary +* Javascript Object +* PHP arrays + +Relations are a natural concept, so although non-relational data systems exist, most data can be stored as relations. diff --git a/programming/about_relational_databases.md b/programming/about_relational_databases.md deleted file mode 100644 index 464de330..00000000 --- a/programming/about_relational_databases.md +++ /dev/null @@ -1,30 +0,0 @@ -# About relational databases - -## What is a relation? - -A common misconception is that the "relations" in a relational database are about relations between database tables. - -Actually, the relations in a relational database are the tables. - -A relation "relates" a set of values with another set of values. - -For example, a relation can relate the name of a person with their birth date and birth place. -For example: - -``` -(person name) => (birth date, birth place) -(Alice) => (1979-12-03, Barcelona) -(Bob) => (1995-03-04, Paris) -... -``` - -Many computer languages have similar concepts: - -* [Python mapping types such as `dict`](https://docs.python.org/3/library/stdtypes.html#mapping-types-dict) -* C++ `std::map` -* Java `java.util.Map` -* [C# `System.Collections.Generic.Dictionary`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=net-9.0) -* [Javascript `Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) -* [PHP arrays](https://www.php.net/manual/en/language.types.array.php) - -Relations are a natural concept, so although non-relational data systems exist, most data can be stored as relations. -- cgit v1.2.3