QUESTION: What are the \"pb*\" tables used for in PowerSeller/InfoMaker?
ANSWER: The pbcat tables store various system-related information concerning the PowerBuilder validation/display of the data. They are system tables in the sense that PowerBuilder, not the user, maintains them. But they are useful only to the extent that you are using PB/IM against the database.
For example, if you had a completely different, non-PB application that uses the PowerSeller database, the pbcat tables will not be used at all for that application.
There are 5 pbcat tables:
pbcatcol -- stores column information (mostly display info like font, height, etc.) pbcatedt -- stores column edit masks
pbcatfmt -- stores column formats
pbcattbl -- stores table display information
pbcatvld -- stores user-defined data validation rules
These tables are automatically created and maintained by PowerBuilder. PB/IM will automatically add data to these tables when you modify the database structure (add tables, add a column to an existing table, etc.) using the PB/IM graphical DBA tools (DB Admin). We do not create our own database-level edit masks or formats. Nor do we use database-level validation rules; instead, we write code to verify user input. We\'ve found that it works better that way. As such, we do not use the pbcatedt, pbcatfmt, or pbcatvld tables at all.
We also do not use the other two tables (pbcatcol and pbcattbl), which provide the formatting styles to be used when displaying that table/column in a datawindow. Those tables provide defaults that will be used only if we have not provided formatting information. Since we have explicitly designed datawindows in PowerSeller about 99.5% of the time, and since datawindow objects contain their own formatting information, the data in those pbcat tables almost never gets used. The only exception is when we (a) dynamically create the datawindow object using code (which we do in a few places in the application -- the query results window in File - Open, the available loans list in Pools - Open, the search results list when using the default search object for any AppMaker based routine) and (b) do not implement code that automatically modifies the presentation style.
The only PowerSeller routine where (a) and (b) are true is File - Open/Bid Packaging.