0 Replies Latest reply on Apr 25, 2002 8:16 PM by alimanji

    Design question: control tables

    alimanji

      Suppose I have 2 relational tables:

      1) City: {cityID, city}
      2) Address: {addressID, cityID}

      Where cityID is a foreign key inside the Address table and a primary key inside the City table.

      Many refer to tables like City as "control" tables that help eliminate redundancy in other tables.

      My question is what is a good way for representing these so called "control" tables like City?

      Is it okay to use an EJB if so, would it make sense to use a CMP bean? Finally, if I do decide to use an CMP bean, is the id field even necessary since the city name itself could act as a primary key field? It seems kind of odd to create a CMP bean with only one attribute (which of course is also the key attribute)?

      Any suggestions on this proposed design, any alternatives,
      thanks in advance,
      Ali