PCL and Customization > Modifying the Database Using PCL > Querying the Patran Database
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Querying the Patran Database
The current version of Patran no longer uses Interbase to provide access to a database. The Interbase product and tools are still supplied with Patran to support conversions of older databases to be compatible with the current version of Patran. The database query tool discussed below can be used to examine the contents of databases built with older versions of Patran. A database query can be used to determine whether an application has successfully accomplished its task, to determine how other applications operate, or to determine what already exists in a database.
The database querying program is located in the $P3_HOME/bin directory. The program is called qli, which is an acronym for Query Language Interpreter and can be used to investigate the contents of a database.
To start qli, simply execute the qli command (for example, $P3_HOME/bin/qli). The qli program supports a subset of SQL, the standard query language, along with having many program specific commands of its own. The six major qli specific commands are “ready,” “show,” “list,” “print,” “help” and “quit.” A brief description of these commands are given below. For further information about qli, see the “help” command within qli. Further information about SQL can be obtained from any SQL reference book.
 
Ready
The ready command opens the specified database and connects it to the qli process. The syntax is “ready <database_name>.” The qli program does not support any on-line arguments, i.e., “qli <database_name>” won’t work. The “ready” command must be made from within qli.
Quit
The quit command will exit the qli process, closing the database if it is open.
Help
The help command provides on-line help for all of the commands and command syntax supported by the qli program.
Show
The show command either shows the names of all the relations in the database (“show relations”) or show the actual definition of a specified relation (“show <relation_name>”, for example: “show point”).
The following is a listing of all the relations in the database delivered with Patran V7.5.
 
ALLOWABLE_MAGIC_PROP
MPC
 
ALLOWABLE_MATL_PROP
MPC_IN_GROUP
 
ALLOWABLE_PHYS_PROP
MPC_TERM
 
ANALYSIS_CODE
MPC_TERM_DOF
 
ANALYSIS_ELEMENTS
MPC_TERM_NODE
 
ANALYSIS_ELEMENT_SUMMARY
MPC_TYPE
 
ANALYSIS_STEP
NODAL_RESULT
Show (continued)
ANALYSIS_TYPE
NODE_PATTERN
 
ANNOTATION
PARAM
 
APPL_GEO_REGION
PARAM_SET
 
ARBITRARY_CLIPPING_PLANE
PERSISTENT_MEMORY
 
ASSIGNED_LOAD_SET
PHYS_PROP_DEFN
 
CLIPPING_PLANE
PHYS_PROP_REGION
 
CONDENSE_OPTION
PHYS_PROP_SET_DEFN
 
CONFIG
PHYS_PROP_SET_MBR_DEFN
 
CONFIG_PARAM
POSTED_ANNOTATION
 
CONSTITUTIVE_MODEL
POSTED_CLIPPING_PLANE
 
CONSTITUTIVE_MODELS_SPECIFIED
POSTED_GROUP
 
CONTROL_INFO
PREFERENCE
 
COORDINATE_FRAME
PRIMARY_RESULT
 
DEGREES_OF_FREEDOM
RANGE
 
DISPLAY_PROPERTY
REGION_LAYER
 
DOF_SET
RENDER
 
DOF_SET_MEMBER
RESULTS_COORD_SYS
 
DS_LBC
RESULTS_DATA_BULK
 
DV_LBC
RESULTS_DATA_REGISTER
 
ELEMENT_EDGE_NODE
RESULTS_INFO
 
ELEMENT_FACE
RESULTS_RDM_TARGET
 
ELEMENT_FACE_EDGE
RESULTS_RDM_TOOL
 
ELEMENT_FACE_NODE
RESULT_TYPE
 
ELEMENT_IN_REGION
RESULT_VALUES
 
ELEMENT_POSITION
SECONDARY_RESULT
 
ELEMENT_TOPOLOGY
SECTION_POSITION
 
ELEMENT_TYPE
SELECTED_ELEMENT_TYPE
 
ELEMENT_VERIFICATION_PARMS
SELECTED_PROPERTY_SET
 
FEM_DS_LBC
SHORT_FIBER
 
FEM_DV_LBC
SOURCE_FILE
 
FEM_SS_LBC
SPECTRUM
 
FEM_SV_LBC
SPECTRUM_COLOR
 
FIELD
SS_LBC
 
FIELD_25_LBC
SUBRANGE
 
FIELD_FEM
SUB_CASE
 
FIELD_FUNCTION
SUB_MPC
 
FIELD_GENERAL
SUM_RES_INFO
 
FIELD_GENERAL_FUNCTIONS
SUPPORTED_ANALYSIS_TYPE
 
FIELD_TABLE
SV_LBC
 
FORMULATION_OPTION
TEMP_MPC
 
FORMULATION_OPTION_ALIAS
TEMP_RESULT
 
GEOMETRIC_OPTION
VALID_ANAL_CODE
 
GEOMETRIC_REGION_LIST
VALID_ANAL_LOAD_TYPE
 
GLOBAL_VARIABLE
VALID_CONSTITUTIVE_MODELS
 
GROUP
VALID_LBC_TARGET_ELEM
 
HALPIN_TSAI
VALID_LBC_TYPES
 
INSTANCE
VALID_MATERIAL_CATEGORIES
 
INSTANCE_IN_GROUP
VALID_MPC_TYPE
 
JOBNAME
VIEW
 
JOBNAME_LIST
VIEWPORT
 
LAMINATE
VIEWPORT_TITLE
 
LAMINATE_LAYER
VPPOSTED_TITLE
 
LAMINATE_OPTION
XXX_CLIENT_ENTITY
 
LAYER_POSITION
XXX_CLIENT_INTEGER_DATA
 
LBC
XXX_CLIENT_LOGICAL_DATA
 
LBC_APP_REGION
XXX_CLIENT_REAL_DATA
 
LBC_GRAPHICS_VECTOR
XXX_CLIENT_STRING_DATA
 
LBC_IN_GROUP
XYAXIS
 
LBC_SELECT_DATATYPE
XYCURVE
 
LBC_TYPE
XYCURVE_DATA
 
LBC_VARIABLE_DEFN
XYLEGEND
 
LIGHT_SOURCE
XYLEGEND_ITEM
 
LOAD_BC
XYPOSTED_CURVE
 
LOAD_CASE
XYPOSTED_LEGEND_ITEM
 
LOOKUP_TABLE
XYPOSTED_TITLE
 
LOOKUP_TABLE_VALUE
XYTITLE_TABLE
 
MATERIAL
XYWINDOW
 
MATERIAL_CATEGORY
 
 
MATERIAL_DIRECTIONALITY
 
 
MATERIAL_LINEARITY
 
 
MATL_CONST_MODEL_DEFN
 
 
MATL_DISPLAY_CATEGORY
 
 
MATL_DISPLAY_SUB_CATEGORY
 
 
MATL_MAGIC
 
 
MATL_MAGIC_ALIAS
 
 
MATL_MAGIC_DEFINITION
 
 
MATL_PROP_ALIAS
 
 
MATL_PROP_DEFN
 
 
MATL_PROP_VALUE
 
 
MEMORY_DATABASE
 
 
MESH_PARAM
 
 
MIX_COMPONENT
 
List
The list command will list the contents of a relation (for example, list all points). The syntax is “list <relation_name>.” This command can have qualifiers associated with it. The main qualifier is “where,” for example: “list point where ID = 12.” Many conditions can be linked with “and” for example: “list point where x > 0.0 and x < 1.0.” The difference between list and show is that show merely displays the structure of the relation whereas list will display the contents of the relation.
Print
The print command is identical to the list command except that the list command displays one value per line whereas the print command displays one relation per line.
 
list: 
id   5 
x   1.0 
y   1.5 
z   -0.5 
 
id   6 
x   0.5 
y   0.0 
z   -1.0 
 
print: 
id       x        y        z 
5      1.0      1.5     -0.5 
6      0.5      0.0     -1.0