1 Reply Latest reply on Apr 1, 2003 5:41 AM by m_korotkov

    Queston about CMR and corresponded database table.

    djyrst

      Hi:
      For example, If I have a EntityA with cmp field named "EntityA_ID" which is the primary key field, and have a EntityB with cmp field named "EntityB_ID" which is the primary key field. The relation of EntityA and EntityB is 1:1.
      But the container will create table EntityA_Table and EntityB_Table:
      CREATE TABLE EntityA_Table (ID varchar (50) PRIMARY KEY,_EntityA_EntityB varchar(50))
      CREATE TABLE EntityB_Table (ID varchar (50) PRIMARY KEY,_EntityB_EntityA varchar(50))

      But the column for relation is as same as the primary key column, the question is below:

      Q1: Does the cmp field and cmr field can not be the same database table column? If so, it will waste the disk space.
      Q2: which one is more common or more better?
      1)create database table first and create CMP based on table.
      2)create CMP first and create table from EJB descriptor thought EJB container when deploying.
      3)create CMP first and create table from EJB descriptor by manual.


      Regards!
      John Lee