Installation and Operations Guide > User Environment > 4.7 The PDB Database System
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
4.7 The PDB Database System
The Patran Database (PDB) includes aspects of both relational and object oriented databases.
Its features include:
Improved performance and stability for Patran products.
Enhanced compatibility between platforms (see Moving Databases Between Platforms, 76).
Automatic compression when you close a database.
Greater control over memory management. See Environment Variables, 50.
No additional installation requirements.
Improved compatibility with NFS mounted databases and working directories
Upgrading Databases
Patran automatically upgrades old databases to the current version when you open them. If you have a large number of databases, we recommend that you upgrade these in one “batch” process. Note that once a database is converted, it cannot be reopened in an older version.
The following command converts files from their current database schema version to the latest version (at least one filename must be supplied):
$P3_HOME/bin/p3convert <file1.db> <file2.db> 
 
Note:  
Multiple database converts do not work on Windows based systems.
Creating Custom Template Databases
Patran provides a file called template.db under the install directory $P3_HOME. By default, this file is copied to the user’s directory when you create a new database. This template.db file becomes your new, empty database.
The template.db file contains information for the many Application Preferences. If your site uses a small number of the Application Preferences and Modules, you may wish to create custom database to reduce the size of empty databases. MSC provides a base.db file to create a customized template file. We also provide an MSC Nastran only database called mscnastran_template.db. See Modifying the Database Using PCL (Ch. 7) in the for more information.
 
Create Custom File from base.db
Follow this procedure to create a custom db.
1. Execute Patran, and create a new database called custom_template.db.
2. Load desired Analysis Preference data sets by entering one or more of the following commands in the Patran Command Line:
load_abaqus()
ABAQUS
load_ansys5()
ANSYS (Revision 5.0 or later)
load_lsdyna3d()
LS-DYNA3D
load_mscdytran()
MSC.Dytran
load_mscmarc()
Marc
load_mscsinda()
MSC Sinda
load_mscnastran()
MSC Nastran
load_pamcrash()
Patran PAMCRASH
load_patran2nf()
PATRAN 2 Neutral File
load_pthermal()
Patran Thermal
load_samcef()
Patran SAMCEF
load_generics()
Loads generic definitions for those developing a Patran custom interface.
3. Exit Patran by selecting Quit from the File menu.
4. Make the custom database available to users by moving the custom_template.db file to either the $P3_HOME directory or to another directory. Users must select this new template when they create a new database.
 
Moving Databases Between Platforms1
Patran databases are directly transportable between supported UNIX platforms. No conversion is necessary. The same is true between Windows and Linux machines. However, moving UNIX to Windows or Linux or vice versa requires conversion.
 
Table 4‑6
Platform
Binary Format
HP-UX (PA-RISC), IBM AIX, SUN SOLARIS
32 bit Big Endian
Intel or clones running Windows or Linux
32 bit Little Endian
Patran will perform this conversion automatically. The utility can also be executed outside of
Patran using:
$P3_HOME/bin/dbport <filename>
64 bit Patran Production Release on Windows 64
To open an existing Patran database that was not created in Patran running on Windows in 64 bit Patran, follow these steps:
1. Open the pre-existing database in Patran 2010 on the same platform the database was created on.
2. Save the database.
3. Start the 64 bit version of Patran
4. Open the database
To open an existing Patran database that was created in Patran running on Windows, simply open the database in the 64 bit version of Patran.
Patran Database Caching and Swapping
The PDB database stores frequently accessed data in a memory cache. The size of this cache is controlled by the PDB_C_CACHE_SIZE environment variable.
While memory space required by the database system is less than the cache size, Patran will write to system memory and swap space normally. If the cache size is exceeded, Patran will write to a scratch file in the directory defined by the PDB_C_SWAP_DIR environment variable.
The scratch file allows you to manage files that would normally exceed available memory/swap space, but is significantly slower. For this reason, the default PDB_C_CACHE_SIZE value is 750MB allowing Patran to use all available system memory and swap (unless more than 750MB is available). You may wish to increase the cache size if your database size exceeds the 750MB default. To modify environment variables see Environment Variables, 50.
Note that these values only affect memory required by database operations. A large meshing operation, for example, will still require system memory and swap. If your system runs out of memory or swap space Patran (or other programs) may shutdown. See Memory and General Requirements, 83 for more information on memory and swap space.
 
Patran Custom Database Conversion
For databases not based on the full default template.db, for example a database based on only the Nastran preference or a custom preference that is NOT in the default template.db, then the following environment variable should be used to point to a special version of template.db. This database version should be built to hold the appropriate data for converting the original database up from the previous version.
P3CONVERT200n_TEMPLATE2
Alternatively, if a database upgrade is not desired then this variable should be an empty string. Error/warning messages related to this can be ignored. For additional information on the environment variables applicable to Patran, and how to set them using the site_setup file, see Environment Variables, 50.

1 Patran and the dbport utility cannot act on files that are in both the wrong binary format and the wrong version. For example, if you have an old database on a SUN workstation and FTP it to a Windows 2000 workstation, the new version will not be able to open the file. You must run p3convert on the SUN before moving the file. See Upgrading Databases, 74 for additional information.

2 The variable name changes with each new version of Patran - the name of the variable reflects the Patran version. A custom database is any database not based on the full default template.db (including a subset of the preferences). If converting a custom database older than the previous database version and the intermediate custom template databases are not available, it is recommended that all the convert environment variables except the last one be set to an empty string. The last variable either an empty string or a custom template database so the template data is properly upgraded.