Dear Friends, I want to develop Entity beans using Rational Rose. I have a situation in which two RDBMs tables have to be represented. First table holde a column which is foreign Key. Both table do have primary keys. I can define each table into a seperate Entity, but I would like to define in single entity. How it is possible? Please help
As an Entity Bean represents one row in the table depending on the primary key values set, I think u need 2 beans to access both tables. not possible with on bean.
You could use an entity bean to represent rows in different tables but then you must use bean managed persistence (or maybe some tool that can do the mapping for you). Assuming there is no tool to do this you could use JDBC to write the calls to the database to store and retrieve the data from the different tables. It would just be like using JDBC (or SQL) to get data you want to get from two tables and then presenting it together. That's the extent of my knowledge, sorry. John
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Thanks John, Will it be possible to create a View in Oracle Environment which we extract required columns. And then using CMP we can assign one single entity to this View table. As per my experience In DB2/400 we can create logical files and can use up to 32 tables to join. That becomes a join table. I am not sure but is this a good solution. (In this situation this entity bean becomes READONLY???) Jaisinh
Avijeet,John How it is possible to represent relations of RDBMS tables in UML diagrams. how we can handle a situation in which due to this relations related changes in table are not allowed? Suppose we have legasy application, but we are interested in defining and developing an extension for applications. or we are interested in using legasy database like DB2/400 on V3 machine. How we can represent old relations to be handled and represented in UML diagrams while creating Entity Beans? Jaisinh.
I am not sure if i understood the problem. but few things: 1. in the bean managed persisitent entity beans u can write the SQL query which will do the necessary join and return fields from multiple tables. 2. In UML, the association/aggregation among classes represent SQL Joins. So u can draw a composite class digram to represent it. tnx
Originally posted by Jaisinh Nimbalkar: Avijeet,John How it is possible to represent relations of RDBMS tables in UML diagrams. how we can handle a situation in which due to this relations related changes in table are not allowed? Suppose we have legasy application, but we are interested in defining and developing an extension for applications. or we are interested in using legasy database like DB2/400 on V3 machine. How we can represent old relations to be handled and represented in UML diagrams while creating Entity Beans? Jaisinh.
Jaisinh, You can use a view to join up a bunch of columns from different tables. Whether this is the best thing to do is more on a case-by-case basis. It probably depends how much data you are getting and how often you are getting it. I don't think you would use UML to model a table. You would have the class that represents/talks to the table in your model and have you DB model in some other tool. John
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Thanks, John, I got more information about RR2000.And now able to define a datamodel also I can create a object model. I am not sure wether you can map Object model to RDBMS. Do you have more Info? Jaisinh
On projects I have been on we had no tool to translate an object model into an RDBMS an back. Have you done a search on the web to see if any exist? John
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad: