dcsimg
JDBC application design issue.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vani_varadhan
Posted On:   Monday, March 29, 2004 04:50 AM

I am working on a JDBC application, I joined this project after it has been done almost 60%. (the person who designed and worked is gone :-) ) I do not have much experience in designing. :-) 1) We are using Jbuilder 9, we use lot of look up queries (ex: having a picklist on student ID in order to show the student's name) we use similar look up queries over and over in many packages, I think that it would be a wise idea to use a single class which will provide the queries and we can use them whereever we need. for example we use the student name look up in student info class and also in course info class. right now we have lookup query in both stuent and course info class. Am I on the right track? (I know after 60% of the project is done it wouldn't be great   More>>

I am working on a JDBC application, I joined this project after it has been done almost 60%. (the person who designed and worked is gone :-) ) I do not have much experience in designing. :-)
1) We are using Jbuilder 9, we use lot of look up queries (ex: having a picklist on student ID in order to show the student's name) we use similar look up queries over and over in many packages, I think that it would be a wise idea to use a single class which will provide the queries and we can use them whereever we need. for example we use the student name look up in student info class and also in course info class. right now we have lookup query in both stuent and course info class. Am I on the right track? (I know after 60% of the project is done it wouldn't be great idea to change all of the existing classes but in future I would like improve)

2) Same JDBC application, this is new section so I can change the design before I write the code. I need to display the faculty information in panel when user clicks on the faculty, I need to display the student information when user clicks on the student, same for course. So I am thinking I can use the same panel and just set the query differently each time according to what ever the user chooses.

for example:
TblInfo
If User chooses instructor,
TblInfo.close()

TblInfo.SetQuery(to instructor)
TblInfo.open();
TblInfo.refresh();

Will this slow down JDBC application or will I encounter any other problem?

Thanks a lot for your inputs.

   <<Less

Re: JDBC application design issue.

Posted By:   venkatesh_tatineni  
Posted On:   Tuesday, March 30, 2004 11:22 AM

Hi vardhan,

Depending on the database server you are using, define Stored procedures for queries that you said are being used multiple times in your code. This makes the database transactions significantly faster since the the query does'nt need to be compiled every time before being executed (like it was happening before). If you need to know how to build stored procedures there are a bunch of tutorials on the web that can help you with that.
About | Sitemap | Contact