Monday, January 3, 2011

ABPP 0005 creating table

In ABPP, a physical table will be created by a MTT file.

Here is a sample MTT file including 1 primary key.

BOOK_MASTER.mtt

To remember,
1. file name is physical table name.
2. property is physical column name.
3. String_xx, Integer, Float_xx_xx, Date
4. primary key will be managed specially.

> <document>
>   <facets>
>     <documentFacets>
>       <documentFacet Type="miscFacet" Active="true" />
>     </documentFacets>
>   </facets>
>   <documentation>Table containing all books in my store.</documentation>
>   <properties>
>     <property Name="BOOK_ID" PhysicalName="BOOK_ID" Active="false" Required="true" Type="String_100">
>       <constraints Caption="constraints" />
>     </property>
>     <property Name="BOOK_NAME" PhysicalName="BOOK_NAME" Active="false" Type="String_100" />
>     <property Name="BOOK_AUTHOR" PhysicalName="BOOK_AUTHOR" Active="false" Type="String_100" />
>     <property Name="BOOK_PRICE" PhysicalName="BOOK_PRICE" Active="false" Type="Float_7_2" />
>     <property Name="BOOK_RELEASE_DATE" PhysicalName="BOOK_RELEASE_DATE" Active="false" Type="Date" />
>     <property Name="BOOK_URL" PhysicalName="BOOK_URL" Active="false" Type="String_100" />
>   </properties>
>   <keys>
>     <key Active="true" Name="PK_BOOK_MASTER" PhysicalName="PK_BOOK_MASTER" Kind="PRIMARY">
>       <property Name="BOOK_ID" />
>     </key>
>   </keys>
>   <links />
> </document>

No comments:

Post a Comment