I saw some databases in Postgres/PostGIS which contains 2 different fields types:
geometry
and
geometry(GeometryZ)
one accepts a 2d coordinates Point ( x y) the other 3d coordinates Point ( x y z)
Point ( x y)
Point ( x y z)
There are also 4d coordinates in postgis
https://postgis.net/workshops/postgis-intro/3d.html