data definition 'syntax'

Posted by marian.edu on 01-Feb-2018 02:25

Having some fun with data definition format and apart from the awkward use of ON/OF it does look like the formatting it's pretty important, line breaks especially seem to break things and the definition file can't be imported.

Is there any place where the 'syntax' used in data definition file is documented?

For instance although data dictionary only let one to define the index as abbreviated if the last field is of character data type the "_field" system table has an abbreviated index on _file-recid+_field-name but also one on _field-name+_file-recid and for several abbreviated indexes in '_file' table the abbreviated keyword appears on one of the fields in the middle not the last one.

ADD INDEX "_File/Field" ON "_Field"
	AREA "Schema Area"
	UNIQUE
	PRIMARY
	INDEX-FIELD "_File-recid" ASCENDING
	INDEX-FIELD "_Field-Name" ASCENDING ABBREVIATED

ADD INDEX "_Field-Name" ON "_Field"
	AREA "Schema Area"
	UNIQUE
	INDEX-FIELD "_Field-Name" ASCENDING ABBREVIATED
	INDEX-FIELD "_File-recid" ASCENDING

ADD INDEX "_Db/File" ON "_File"
	AREA "Schema Area"
	UNIQUE
	INDEX-FIELD "_Db-recid" ASCENDING
	INDEX-FIELD "_File-Name" ASCENDING ABBREVIATED
	INDEX-FIELD "_Owner" ASCENDING

ADD INDEX "_Dump-Name" ON "_File"
	AREA "Schema Area"
	UNIQUE
	INDEX-FIELD "_Db-recid" ASCENDING
	INDEX-FIELD "_Dump-name" ASCENDING ABBREVIATED
	INDEX-FIELD "_Owner" ASCENDING

All Replies

Posted by Stefan Drissen on 01-Feb-2018 02:49

As with all good code, the "documentation" is in the source code - see prodict/dump/_lodsddl.p  

Posted by marian.edu on 01-Feb-2018 04:14

Thanks Stefan, that’s an easy to read documentation ;)

 
Marian Edu

Acorn IT 
+40 740 036 212

Posted by rkumar on 01-Feb-2018 10:59

Link to a similar discussion sometime back: community.progress.com/.../18733

Posted by gus bjorklund on 02-Feb-2018 08:42

note that an abbreviated index is stored /exactly/ the same an index that is not abbreviated. the only difference is that the abbreviated flag in the index definition is set.

further, this is an obsolete feature that should not be used.

Posted by marian.edu on 02-Feb-2018 09:06

Thanks Gus, guess will be nice to have that removed from data dictionary and maybe even definition file generated since it doesn’t make any difference… however that makes my life easier cause I will just go ahead and ignore it ;)


Posted by Rob Fitzpatrick on 02-Feb-2018 09:10

> further, this is an obsolete feature that should not be used.

Can you please elaborate Gus?

Posted by marian.edu on 05-Feb-2018 13:22

I guess there is not much to elaborate on, there isn’t actually any difference between a ‘regular’ and an ‘abbreviated’ index… it’s just some syntactic sugar added by the compiler and that just for a special case which I doubt its even used nowadays - USING phase in FIND statement, for an abbreviated fields the BEGIN operator is used instead of equality match - knowledgebase.progress.com/.../When-should-abbreviated-Indexes-be-used.


Anyway, back to the data definition syntax… not like we don’t have code as ‘documentation’ ourselves but how do one knows what FILE-MISC[XX], FIELD-MISC[XX], SEQ-MISC[XX] actually stands for? For fields there seems to be properties related to schema holder (FOREIGN) and also data server (DSRVR), is there a difference between those too, isn’t a schema holder used with a data server?

Marian Edu

Acorn IT 
+40 740 036 212

Posted by gus bjorklund on 05-Feb-2018 14:14

marian, you are correct. all those misc fields are used for various dataservers in the schema holder database definitions for them..

This thread is closed