public final static String ITEM_TABLE = "item";
public final static String COMPONENT_TABLE = "component";
public static NewAISBuilder createAndFillBuilder(String schema) {
TypesTranslator typesTranslator = MTypesTranslator.INSTANCE;
NewAISBuilder builder = AISBBasedBuilder.create(schema, typesTranslator);
builder.table(CUSTOMER_TABLE).
colBigInt("customer_id", false).
colString("customer_name", 100, false).
pk("customer_id");
builder.table(ADDRESS_TABLE).
colBigInt("customer_id", false).
colInt("instance_id", false).
colString("address_line1", 60, false).
colString("address_line2", 60, false).
colString("address_line3", 60, false).
pk("customer_id", "instance_id").
joinTo("customer").on("customer_id", "customer_id");
builder.table(ORDER_TABLE).
colBigInt("order_id", false).
colBigInt("customer_id", false).
colInt("order_date", false).
pk("order_id").
joinTo("customer").on("customer_id", "customer_id");
builder.table(ITEM_TABLE).
colBigInt("order_id", false).
colBigInt("part_id", false).
colInt("quantity", false).
colInt("unit_price", false).
pk("part_id").
joinTo("order").on("order_id", "order_id");
builder.table(COMPONENT_TABLE).
colBigInt("part_id", false).
colBigInt("component_id", false).
colInt("supplier_id", false).
colInt("unique_id", false).
colString("description", 50, true).