Suppose I have a system where I have metadata such as:
table:
======
key
name
address
...
Then suppose I have a user-defined type described as so:
datasource
datasource-key
A) are there systems where it's possible to have keys based on user-defined types?
B) if so, how do you decompose the keys into a form suitable for querying?
C) is this a case where I'm just better off with a composite primary key?
Use a composite primary key if this is what the model says
I've not tried it, but SQL Server will probably allow it. However, a primary key is an index so it may not, definitely not if the user type is neither deterministic nor schemabound
Although, I think I'm mixing up types and udfs in my thinking...