aspose file tools
The moose likes JDBC and the fly likes EJB Using the Oracle Database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "EJB Using the Oracle Database" Watch "EJB Using the Oracle Database" New topic
Author

EJB Using the Oracle Database

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
There are multiple tables in my Oracle database (The database is structured by someone and given to me). Each table has a primary key, and the table that relates to other tables has a foreign key. I have an entity bean for each table, and I use the primary key and foreign key matching to go from one table to another. The specifics are spelled out below:
There are three tables in the database. The first table has login, pwd, and a primary key as fields, the second table contains completely different fields plus a primary key and a foreign key. The fields in the third table are different from those in the first and second tables plus its primary key. Queries to the third table can be made only if the user login and pwd are found in the first table, and through the third table's relation to the second table. I have three entity beans for each table and am using the container-managed persistence.
The fields in the third table may be accessed concurrently, but those fields are primarily read-only (not updated frequently). My question is if this is a good design and a correct approach? Or I should ask the data person to restructure the database?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: EJB Using the Oracle Database
 
Similar Threads
Effect of setting primary key constraints on Nested Table
J2EE Design Question -- Am I On The Right Track?
Multiple Tables In the Database -- Use Multiple Entity Beans?
Java Persistence API Entities Enthuware Wrong Answer
can i use one entity bean to access more than one tables