Schema of the Generated Database

The following sections describe the schema of the database created through the SQL backend.

Table IDS

Details of interdependant identifiers appearing in the workspace.

Field name Field type Value description
EIDINTEGERUnique identifier key
NAMECHARACTER VARYINGIdentifier name
READONLYBOOLEANTrue if it appears in at least one read-only file
UNDEFMACROBOOLEANTrue if it is apparantly an undefined macro
MACROBOOLEANTrue if it a preprocessor macro
MACROARGBOOLEANTrue if it a preprocessor macro argument
ORDINARYBOOLEANTrue if it is an ordinary identifier (variable or function)
SUETAGBOOLEANTrue if it is a structure, union, or enumeration tag
SUMEMBERBOOLEANTrue if it is a structure or union member
LABELBOOLEANTrue if it is a label
TYPEDEFBOOLEANTrue if it is a typedef
ENUMBOOLEANTrue if it is an enumeration member
FUNBOOLEANTrue if it is a function name
CSCOPEBOOLEANTrue if its scope is a compilation unit
LSCOPEBOOLEANTrue if it has linkage scope
UNUSEDBOOLEANTrue if it is not used

Table TOKENS

Instances of identifier tokens within the source code.

Field name Field type Value description
FIDINTEGERFile key (references FILES)
FOFFSETINTEGEROffset within the file
EIDINTEGERIdentifier key (references IDS)

Table COMMENTS

Comments in the code.

Field name Field type Value description
FIDINTEGERFile key (references FILES)
FOFFSETINTEGEROffset within the file
COMMENTCHARACTER VARYINGThe comment, including its delimiters

Table STRINGS

Strings in the code.

Field name Field type Value description
FIDINTEGERFile key (references FILES)
FOFFSETINTEGEROffset within the file
STRINGCHARACTER VARYINGThe string, including its delimiters

Table REST

Remaining, non-identifier source code.

Field name Field type Value description
FIDINTEGERFile key (references FILES)
FOFFSETINTEGEROffset within the file
CODECHARACTER VARYINGThe actual code

Table LINEPOS

Line number offsets within each file.

Field name Field type Value description
FIDINTEGERFile key (references FILES)
FOFFSETINTEGEROffset within the file
LNUMINTEGERLine number (starts at 1)

Table PROJECTS

Project details.

Field name Field type Value description
PIDINTEGERUnique project key
NAMECHARACTER VARYINGProject name

Table IDPROJ

Identifiers appearing in projects.

Field name Field type Value description
EIDINTEGERIdentifier key (references IDS)
PIDINTEGERProject key (references PROJECTS)

Table FILES

File details.

Field name Field type Value description
FIDINTEGERUnique file key
NAMECHARACTER VARYINGFile name
ROBOOLEANTrue if the file is read-only
NCHARINTEGERSize in characters
NLCOMMENTINTEGERNumber of line comments
NBCOMMENTINTEGERNumber of block comments
NLINEINTEGERNumber of lines
MAXLINELENINTEGERMaximum line length
NCCOMMENTINTEGERNumber of comment characters
NSPACEINTEGERNumber of spaces
NFUNCTIONINTEGERNumber of functions
NPPDIRECTIVEINTEGERNumber of C preprocessor directives
NINCFILEINTEGERNumber of included files
NSTATEMENTINTEGERNumber of C statements
NSTRINGINTEGERNumber of strings

Table FILEPROJ

Files used in projects.

Field name Field type Value description
FIDINTEGERFile key (references FILES)
PIDINTEGERProject key (references PROJECTS)

Table DEFINERS

Included files defining required elements for a given compilation unit and project.

Field name Field type Value description
PIDINTEGERProject key (references PROJECTS)
CUIDINTEGERCompilation unit key (references FILES)
BASEFILEIDINTEGERFile (often .c) requiring (using) a definition (references FILES)
DEFINERIDINTEGERFile (often .h) providing a definition (references FILES)

Table INCLUDERS

Included files including required files for a given compilation unit and project.

Field name Field type Value description
PIDINTEGERProject key (references PROJECTS)
CUIDINTEGERCompilation unit key (references FILES)
BASEFILEIDINTEGERFile included in the compilation (references FILES)
INCLUDERIDINTEGERFiles that include it (references FILES)

Table PROVIDERS

Included files providing code or data for a given compilation unit and project.

Field name Field type Value description
PIDINTEGERProject key (references PROJECTS)
CUIDINTEGERCompilation unit key (references FILES)
PROVIDERIDINTEGERIncluded file (references FILES)

Table INCTRIGGERS

Included files defining required elements for a given compilation unit and project.

Field name Field type Value description
PIDINTEGERProject key (references PROJECTS)
CUIDINTEGERCompilation unit key (references FILES)
BASEFILEIDINTEGERFile requiring a definition (references FILES)
DEFINERIDINTEGERFile providing a definition (references FILES)
FOFFSETINTEGERDefinition's offset within the providing file
LENINTEGERToken's length

Table FUNCTIONS

C functions and function-like macros.

Field name Field type Value description
IDINTEGERUnique function identifier
NAMECHARACTER VARYINGFunction name (redundant; see FUNCTIONID)
ISMACROBOOLEANTrue if a function-like macro (otherwise a C function)
DEFINEDBOOLEANTrue if the function is defined within the workspace
DECLAREDBOOLEANTrue if the function is declared within the workspace
FILESCOPEDBOOLEANTrue if the function's scope is a single compilation unit (static or macro)
FIDINTEGERFile key of the function's definition, declaration, or use (references FILES)
FOFFSETINTEGEROffset of definition, declaration, or use within the file

Table FUNCTIONID

Identifiers comprising a function's name.

Field name Field type Value description
FUNCTIONIDINTEGERFunction identifier key (references FUNCTIONS)
ORDINALINTEGERPosition of the identifier within the function name (0-based)
EIDINTEGERIdentifier key (references IDS)

Table FCALLS

Function calls.

Field name Field type Value description
SOURCEIDINTEGERCalling function identifier key (references FUNCTIONS)
DESTIDINTEGERCalled function identifier key (references FUNCTIONS)

Table FILECOPIES

Files occuring in more than one copy.

Field name Field type Value description
GROUPIDINTEGERUnique file group identifier
FIDINTEGERKey of file belonging to a group of identical files (references FILES)