| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: A simple notation, again
David Cressey wrote:
> Brian Selzer wrote: >> David Cressey wrote:
>> How about something like this
>> {(Last, First, Num) :
>> ("David", "Cressey", 1),
>> ("Marshall", "Spight", 2),
>> ("Bob", "Badour", 3),
>> ("Jan", "Hidders", 4)}
>>
> > I like the colon. I'd like to stay within the square > bracket notation, if possible.
</lurk>
Your call. Hey! It is your notation.
What about the relation name in the literal?
[Person[ ... ?[[ ... would be an anonymous relation ?
colons are also used to denote types.
Combining an relationname and both colons would make the literal look like:
[Person[Last:doublequotedstring First:doublequotedstring Num:decimalnumber]:
["David" "Cressey" 1] ["Marshall" "Spight" 2] ["Bob" "Badour" 3] ["Jan" Hidders" 4]]
... though I would prefer commmas like in Brian's version, avoiding the need for CamelCasing or lots of underscores.
[Person [
Last:doublequoted string,
First:doublequoted string,
Num:decimal number
]
:
["David", "Cressey", 1] ["Marshall", "Spight", 2] ["Bob", "Badour", 3] ["Jan", Hidders", 4]
![]() |
![]() |