April 4, 2025 at 12:00 am
Comments posted to this topic are about the item A Domain for Data
April 4, 2025 at 8:26 am
The Oracle CREATE DOMAIN
looks really interesting.
If you are familiar with the dunder functions in Python it looks like the DISPLAY clause the equivalent of Python's __repr__
. For non-Python people, if you have an object with properties and you say print(my_object) the __repr__
function lets you define which properties will be displayed and how they will be formatted.
The ORDER clause is also of interest. If I understand it correctly it means that you can specify what an ORDER BY would do if the domain was applied to a column. The example given was of a domain for a postal address and the domain ORDER clause specified the concatenated US State and US ZIP code as the desired order.
It seems somewhat like T-SQL's CREATE TYPE
command
April 4, 2025 at 1:27 pm
I've actually been implementing domains in T-SQL for decades. Not with a CREATE DOMAIN statement but using reference tables, table valued functions, and scalar functions.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
April 4, 2025 at 9:21 pm
Domains in reference /lookup tables are a staple, or should be. It's one of the major hassles I see in NoSQ/document stores.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy