<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=Tables</id>
	<title>Tables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=Tables"/>
	<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=Tables&amp;action=history"/>
	<updated>2026-09-22T02:56:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.infinite-erp.co.id/index.php?title=Tables&amp;diff=4574&amp;oldid=prev</id>
		<title>Wikiadmin: Halaman baru: Tables dari Etendo Documentation, rebrand Etendo→InfiniteERP</title>
		<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=Tables&amp;diff=4574&amp;oldid=prev"/>
		<updated>2026-09-20T17:32:53Z</updated>

		<summary type="html">&lt;p&gt;Halaman baru: Tables dari Etendo Documentation, rebrand Etendo→InfiniteERP&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Languages}}&lt;br /&gt;
{{BackTo|Main Page}}&lt;br /&gt;
&lt;br /&gt;
= Tables =&lt;br /&gt;
&lt;br /&gt;
Physical database tables are the basis the Application Dictionary Data Model is built on. This document discusses the particularities all tables in InfiniteERP must have.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
All tables in InfiniteERP must have some common columns. All these columns must be defined as not nullable.&lt;br /&gt;
&lt;br /&gt;
== Common Columns ==&lt;br /&gt;
&lt;br /&gt;
=== Primary Key ===&lt;br /&gt;
&lt;br /&gt;
All tables in InfiniteERP have a single column primary key. This column will be automatically populated with a generated UUID; therefore the type for this column must be &amp;lt;code&amp;gt;VARCHAR2(32)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The primary key column must be named like its table with an ID suffix. Thus, the primary key column for the &amp;lt;code&amp;gt;HT_Salary&amp;lt;/code&amp;gt; table would be &amp;lt;code&amp;gt;HT_Salary_ID&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This column must also be set as primary key in the database; it is not enough to define it as ID in the Application Dictionary.&lt;br /&gt;
&lt;br /&gt;
=== Client/Organization ===&lt;br /&gt;
&lt;br /&gt;
As InfiniteERP is a [[Multi Client and Multi Org|multi-client and multi-organization]] application, all data belongs to a client and an organization, so all tables must have these two columns:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AD_Client_ID&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AD_Org_ID&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These columns are a foreign key to &amp;lt;code&amp;gt;AD_Client&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AD_Org&amp;lt;/code&amp;gt; tables. So, their types must also be &amp;lt;code&amp;gt;VARCHAR2(32)&amp;lt;/code&amp;gt;, and there must be a foreign key to these tables.&lt;br /&gt;
&lt;br /&gt;
=== Audit Information ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are some columns that store information about whether a record is active and when and who created and last modified it. This information is maintained in the following columns:&lt;br /&gt;
&lt;br /&gt;
* '''IsActive''': It is a boolean value (Y/N) indicating whether the record is active or not. Its type must be &amp;lt;code&amp;gt;CHAR(1)&amp;lt;/code&amp;gt; and generally, its default value is 'Y'. It is also good practice to create a check constraint forcing its value to be either 'Y' or 'N'.&lt;br /&gt;
* '''Created''': It contains the date and time when the record was created. Its type is &amp;lt;code&amp;gt;DATE&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''CreatedBy''': Indicates the user that created the record. It is a foreign key to &amp;lt;code&amp;gt;AD_User&amp;lt;/code&amp;gt; so its type is &amp;lt;code&amp;gt;VARCHAR2(32)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''Updated''': It contains the last date and time when the record was modified (or created if no modification was performed later). Its type is &amp;lt;code&amp;gt;DATE&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''UpdatedBy''': Indicates the last user that updated the record. It is a foreign key to &amp;lt;code&amp;gt;AD_User&amp;lt;/code&amp;gt; so its type is &amp;lt;code&amp;gt;VARCHAR2(32)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
When creating new tables, it is necessary to pay special attention to the names given to tables and columns, particularly regarding modularity.&lt;br /&gt;
&lt;br /&gt;
=== Tables ===&lt;br /&gt;
&lt;br /&gt;
The only element to take into consideration is the module's '''DB Prefix'''. The table's name must start with this DB prefix followed by an underscore character (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The following table prefixes are used by InfiniteERP core and are '''not allowed''' to be used by any modules:&lt;br /&gt;
&lt;br /&gt;
| Table prefix | Description |&lt;br /&gt;
| --- | --- |&lt;br /&gt;
| A | Asset management |&lt;br /&gt;
| AD | Application dictionary |&lt;br /&gt;
| C | Core functionality |&lt;br /&gt;
| I | Import temporary tables and processes |&lt;br /&gt;
| M | Material management |&lt;br /&gt;
| FACT | Accounting |&lt;br /&gt;
| GL | General ledger |&lt;br /&gt;
| MA | Manufacturing |&lt;br /&gt;
| MRP | Material resource planning |&lt;br /&gt;
| S | Service management |&lt;br /&gt;
| AT, AU, EM, FIN, I, MA, R, RV, T | Other Core prefixes |&lt;br /&gt;
| CUS, PD, US, ZZ | Personal developments |&lt;br /&gt;
| APRM | Advanced Payables and Receivables Management |&lt;br /&gt;
| OBUIAPP, NAVBA | User Interface Application |&lt;br /&gt;
| OBCHW | HTML Widget |&lt;br /&gt;
| OBCLFRE, OBCLKER | User Interface Client Kernel |&lt;br /&gt;
| OBKMO | Workspace &amp;amp; Widgets |&lt;br /&gt;
| OBCQL | Query/List Widget |&lt;br /&gt;
| OBSERDS | JSON Datasource |&lt;br /&gt;
| OBJSON | JSON REST Webservice |&lt;br /&gt;
| OBUISEL | User Interface Selector |&lt;br /&gt;
| OBUISC | Smartclient |&lt;br /&gt;
| FINPR | Orders Awaiting Delivery |&lt;br /&gt;
&lt;br /&gt;
=== Columns ===&lt;br /&gt;
&lt;br /&gt;
==== Modularity ====&lt;br /&gt;
&lt;br /&gt;
In case the column belongs to the same module as its table, no special rule must be followed for its name. But if the column is going to be added to a table belonging to a different module, the column name must start with &amp;lt;code&amp;gt;EM_&amp;lt;/code&amp;gt; + the DB Prefix of the module the column belongs to. For instance: &amp;lt;code&amp;gt;EM_MYMODULEDBPREFIX_COLUMNNAME&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Note''': The column name must not exceed 30 characters, that includes the EM plus the DB Prefix of the module.&lt;br /&gt;
&lt;br /&gt;
'''Info''': In PostgreSQL, all column names must be defined in lower case. This restriction also applies for naming constraints, triggers and functions.&lt;br /&gt;
&lt;br /&gt;
==== Primary Key Column ====&lt;br /&gt;
&lt;br /&gt;
Naming for primary key column is explained in the [[#Primary_Key|Primary Key]] section of this document.&lt;br /&gt;
&lt;br /&gt;
==== Foreign Key Columns ====&lt;br /&gt;
&lt;br /&gt;
It is a best practice to name, if possible, foreign key columns in the same manner as the primary key column of the table they link to. The reason for this is that in Oracle, foreign key (and the rest of the DB constraints) names must be unique at a database-level. So, for example, if we have in our table a column that contains a business partner, it should be named &amp;lt;code&amp;gt;C_BPartner_ID&amp;lt;/code&amp;gt; because it is a foreign key to &amp;lt;code&amp;gt;C_BPartner&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Following this naming rule allows to define standard references as &amp;lt;code&amp;gt;TableDir&amp;lt;/code&amp;gt; when the column is defined in the Application Dictionary.&lt;br /&gt;
&lt;br /&gt;
==== Naming of Columns and the Data Access Layer ====&lt;br /&gt;
&lt;br /&gt;
In InfiniteERP, Java classes are generated from the tables definition. A DAL entity is generated from every table defined in the Application Dictionary. See [[Data Access Layer]] for more information.&lt;br /&gt;
&lt;br /&gt;
It is important to take this into account when thinking about the names for your columns. The columns you define in a table will correspond to Java properties in a generated Java class. Therefore, '''you must not choose names which collide with Java keywords''', such as &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
Here you can find a list of the [https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html Java keywords].&lt;br /&gt;
&lt;br /&gt;
== Supported Column Data Types ==&lt;br /&gt;
&lt;br /&gt;
'''DBSourceManager''', the utility that InfiniteERP uses to manage database related operations, supports a subset of the datatypes that Oracle and PostgreSQL databases support. Below is the currently supported data types:&lt;br /&gt;
&lt;br /&gt;
| Oracle | PostgreSQL |&lt;br /&gt;
| --- | --- |&lt;br /&gt;
| (n)char | char |&lt;br /&gt;
| (n)varchar(2) | varchar |&lt;br /&gt;
| blob | bytea |&lt;br /&gt;
| date | timestamp |&lt;br /&gt;
| number | numeric |&lt;br /&gt;
| clob | text |&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Data Access Layer]]&lt;br /&gt;
* [[Application Dictionary]]&lt;br /&gt;
* [[Multi Client and Multi Org]]&lt;br /&gt;
* [[DBSourceManager]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://docs.etendo.software/developer-guide/etendo-classic/concepts/tables/ Tables — Etendo Documentation]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
''This page is a derivative of [http://wiki.openbravo.com/wiki/Tables Tables] by [http://wiki.openbravo.com/wiki/Welcome_to_Openbravo Openbravo Wiki], used under [https://creativecommons.org/licenses/by-sa/2.5/es/ CC BY-SA 2.5 ES]. This work is licensed under [https://creativecommons.org/licenses/by-sa/2.5/ CC BY-SA 2.5].''&lt;br /&gt;
&lt;br /&gt;
[[Category:Developers Guide]]&lt;br /&gt;
[[Category:Documentation ERP]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>