![]() | |
#41
| |||
| |||
|
|
On May 19, 11:44 pm, zigzag... (AT) yahoo (DOT) com wrote: On May 19, 11:02 pm, Doug Davis <douglass_da... (AT) earthlink (DOT) net> wrote: I will be teaching a PL/SQL class, and I wanted to get some opinions. I read about PL/SQL, but wanted some practical advice from people who have used it. 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) thanks. --http://www.douglassdavis.com If you know Java or C++, you are better of using them than using PL/ SQL. Computers run so fast that performance advantages gained by PL/ SQL over C++ or Java are very little. On the other hand, if you do not know these languages or do not want to write lot of code in them use PL/SQL. PL/SQL you can write database centric programs quickly (lot less lines of code than JAVA or C++). JAVA or C++ , however, are not limited to calling SQL, you can do lot more things. If you are a software engineer, have complex big software projects, use Java or C+ +. On the other hand if you want to write database centric programs quickly write them in PL/SQL. Certain activity such as writing triggers etc can be best done only using PL/SQL blocks. Event, tough Java in theory can be called from triggers (using Java stored procedures), one has to write convoluted code to do it (you still write lots of PL/SQL code). Ok, from personal experience I have to disagree. However, I am willing to be open minded. Do you have any kind of data to support this? Some examples how the performance is improved enough by using a procedural language that it makes sense to move the business logic out to a different tier? Mike Fullerton- Hide quoted text - - Show quoted text - |
#42
| |||
| |||
|
|
Doug Davis wrote: I will be teaching a PL/SQL class, and I wanted to get some opinions. I read about PL/SQL, but wanted some practical advice from people who have used it. 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) thanks. -- http://www.douglassdavis.com I authored and teach the Oracle program at the University of Washington and I must agree with Frank van Bortel when he questions your qualification to teach the class. And my apology if the following seems a bit cruel... it isn't intended to be such. Several years ago I brought in a PhD Java programmer who was one of the authors of the Hibernate framework to teach one quarter with me. Truly a Java genius. But my students knew more about databases than he did and while they learned a lot of Java they class evaluation form after the quarter was brutal. Let me give you a short self-test to consider before you teach it. 1. When is it appropriate to commit inside of a loop? 2. When is it appropriate in 9i or 10g to use a cursor loop? 3. When should production code be deployed with stand-alone functions and procedures? If your answer to all three isn't ... "essentially never" ... reconsider. If you don't understand database concepts and architecture you should reconsider teaching the class. If you don't understand the difference between thinking in sets and procedural code you should reconsider teaching the class. My interpretation of your two questions is that you are wholly unqualified. Again: sorry if this is a bit harsh. -- Daniel A. Morgan University of Washington damor...@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Groupwww.psoug.org |
#43
| |||
| |||
|
|
On May 20, 6:12 am, Marc Blum <b... (AT) marcblum (DOT) de> wrote: On 19 May 2007 20:02:52 -0700, Doug Davis <douglass_da... (AT) earthlink (DOT) net> wrote: 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) First: when talking about PL/SQL, it always means to me a mixture of SQL and PL/SQL. We follow the first law according to Tom Kyte: - If you can do it in pure SQL, do it in pure SQL. - If you can't do it in pure SQL, do it in PL/SQL. - If you can't do it in PL/SQL, do it in Java, C or whatever... We use PL/SQL as an application server thier. The PL/SQL layer manages all data centric operations. Typically representation and user interaction remains to the 4GLs like Delphi and so on. From a deployability standpoint, putting business requierements into packages makes code management in dev, test and prod much more easier. Security models are much easier to implement. PL/SQL is tightly integrated with the database engine. You have the full power of ORACLE server at your fingertips. The only advantage for other languages seems to be when doing extremely CPU intensive algorithms. When throwing data around, PL/SQL is unbeatable. 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) For about 10 years we use with great success a PL/SQL-centric approach in dozens of big applications, individual solutions and software products. Typically it's the small projects, which don't follow this path. We do incredible big and complex applications. 100.000 and 100.000 and more lines of code, which implement not-so-simplistic business rules. Last shot was a software module to manage time series data, implementing a API-based approach, coded 100% in PL/SQL and SQL. In legacy systems, we successfully migrate code from the app layer to the PL/SQL layer, whenever possible. thanks. real-world experiences such as this are always helpful to me. PL/SQL does seem like it would be good for less CPU intensive tasks. |
|
I would think that if you put business-logic in a client side app, you would have the problems of more network traffic (although this seems very dependent apon how much network traffic is inherent in the app, it seems like it may not even be a problem for some). |
|
Also, if you did a lot of SQL queries on the client side, and wanted to change and develop another client, you may have to reprogram much of the business logic too. So, i could see that being a problem. |
#44
| |||
| |||
|
|
On May 20, 1:18 pm, DA Morgan <damor... (AT) psoug (DOT) org> wrote: Doug Davis wrote: I will be teaching a PL/SQL class, and I wanted to get some opinions. I read about PL/SQL, but wanted some practical advice from people who have used it. 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) thanks. -- http://www.douglassdavis.com I authored and teach the Oracle program at the University of Washington and I must agree with Frank van Bortel when he questions your qualification to teach the class. And my apology if the following seems a bit cruel... it isn't intended to be such. Several years ago I brought in a PhD Java programmer who was one of the authors of the Hibernate framework to teach one quarter with me. Truly a Java genius. But my students knew more about databases than he did and while they learned a lot of Java they class evaluation form after the quarter was brutal. Let me give you a short self-test to consider before you teach it. 1. When is it appropriate to commit inside of a loop? 2. When is it appropriate in 9i or 10g to use a cursor loop? 3. When should production code be deployed with stand-alone functions and procedures? If your answer to all three isn't ... "essentially never" ... reconsider. If you don't understand database concepts and architecture you should reconsider teaching the class. If you don't understand the difference between thinking in sets and procedural code you should reconsider teaching the class. My interpretation of your two questions is that you are wholly unqualified. Again: sorry if this is a bit harsh. -- Daniel A. Morgan University of Washington damor...@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Groupwww.psoug.org Let's see ... this guy is asking a question politely and gets jumped all over. Hmmm ... guess I can't remember anyone else putting out gems like "drop the dba role", "run produciton systems on 10.1 mac osx", "do your performance tuning based on statspack 1 hour snapshots" ... You said that he was unqualified? Wow. |
#45
| |||
| |||
|
|
Doug Davis wrote: On May 20, 6:12 am, Marc Blum <b... (AT) marcblum (DOT) de> wrote: On 19 May 2007 20:02:52 -0700, Doug Davis <douglass_da... (AT) earthlink (DOT) net> wrote: 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) First: when talking about PL/SQL, it always means to me a mixture of SQL and PL/SQL. We follow the first law according to Tom Kyte: - If you can do it in pure SQL, do it in pure SQL. - If you can't do it in pure SQL, do it in PL/SQL. - If you can't do it in PL/SQL, do it in Java, C or whatever... We use PL/SQL as an application server thier. The PL/SQL layer manages all data centric operations. Typically representation and user interaction remains to the 4GLs like Delphi and so on. From a deployability standpoint, putting business requierements into packages makes code management in dev, test and prod much more easier. Security models are much easier to implement. PL/SQL is tightly integrated with the database engine. You have the full power of ORACLE server at your fingertips. The only advantage for other languages seems to be when doing extremely CPU intensive algorithms. When throwing data around, PL/SQL is unbeatable. 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) For about 10 years we use with great success a PL/SQL-centric approach in dozens of big applications, individual solutions and software products. Typically it's the small projects, which don't follow this path. We do incredible big and complex applications. 100.000 and 100.000 and more lines of code, which implement not-so-simplistic business rules. Last shot was a software module to manage time series data, implementing a API-based approach, coded 100% in PL/SQL and SQL. In legacy systems, we successfully migrate code from the app layer to the PL/SQL layer, whenever possible. thanks. real-world experiences such as this are always helpful to me. PL/SQL does seem like it would be good for less CPU intensive tasks. As someone who has been in IT since 1969 and has more than a few years of experience with Oracle your response, the line above this, is an emetic. You truly do not understand PL/SQL. You seem to truly not understand relational databases. You seem to not have any background in Oracle concepts and architecture. And your students deserve to take this class from someone who, if not a subject matter expert, has at least a passing familiarity with the subject. The more you write the more you throw gasoline on the issue. I would think that if you put business-logic in a client side app, you would have the problems of more network traffic (although this seems very dependent apon how much network traffic is inherent in the app, it seems like it may not even be a problem for some). You just don't get it so let me spell it out. No database yet built and put into production has been accessed by only the designated front-end tool. It will be accessed by many tools and all but one of them will not have the business logic. You put business logic into the database to protect the data from people with SQL*Plus, MS Access, and yes even Crystal Reports. Doing so is far more efficient in terms of CPU, Disk I/O, network bandwidth, etc. Plus, in the database, we have tools that we can use to tune DML. The problem in application development these days is that people who have essentially no background in databases, such as you, make decisions based wholly upon their ignorance. No SQL developer would pretend to know how many layers belong in a Java application, or whether to use or not use beans. But front-end developers, reeking of ignorance, quite often think they can write SQL, and worse yet PL/SQL. Also, if you did a lot of SQL queries on the client side, and wanted to change and develop another client, you may have to reprogram much of the business logic too. So, i could see that being a problem. Don't worry. We have DBMS_ADVANCED_REWRITE and we rip your queries out of our databases and replace them with our own when they are too ugly. I would recommend that you pick up a copy of Tom Kyte's books and read them. And again that you find a good DBA to co-teach with you so that your students have a chance of being successful. Essentially every sentence you have written here demonstrates that you do not understand the subject. Please reconsider taking the assignment. |
#46
| |||
| |||
|
|
Doug Davis wrote: On May 20, 6:12 am, Marc Blum <b... (AT) marcblum (DOT) de> wrote: On 19 May 2007 20:02:52 -0700, Doug Davis <douglass_da... (AT) earthlink (DOT) net> wrote: 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) First: when talking about PL/SQL, it always means to me a mixture of SQL and PL/SQL. We follow the first law according to Tom Kyte: - If you can do it in pure SQL, do it in pure SQL. - If you can't do it in pure SQL, do it in PL/SQL. - If you can't do it in PL/SQL, do it in Java, C or whatever... We use PL/SQL as an application server thier. The PL/SQL layer manages all data centric operations. Typically representation and user interaction remains to the 4GLs like Delphi and so on. From a deployability standpoint, putting business requierements into packages makes code management in dev, test and prod much more easier. Security models are much easier to implement. PL/SQL is tightly integrated with the database engine. You have the full power of ORACLE server at your fingertips. The only advantage for other languages seems to be when doing extremely CPU intensive algorithms. When throwing data around, PL/SQL is unbeatable. 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) For about 10 years we use with great success a PL/SQL-centric approach in dozens of big applications, individual solutions and software products. Typically it's the small projects, which don't follow this path. We do incredible big and complex applications. 100.000 and 100.000 and more lines of code, which implement not-so-simplistic business rules. Last shot was a software module to manage time series data, implementing a API-based approach, coded 100% in PL/SQL and SQL. In legacy systems, we successfully migrate code from the app layer to the PL/SQL layer, whenever possible. thanks. real-world experiences such as this are always helpful to me. PL/SQL does seem like it would be good for less CPU intensive tasks. As someone who has been in IT since 1969 and has more than a few years of experience with Oracle your response, the line above this, is an emetic. You truly do not understand PL/SQL. You seem to truly not understand relational databases. You seem to not have any background in Oracle concepts and architecture. And your students deserve to take this class from someone who, if not a subject matter expert, has at least a passing familiarity with the subject. The more you write the more you throw gasoline on the issue. I would think that if you put business-logic in a client side app, you would have the problems of more network traffic (although this seems very dependent apon how much network traffic is inherent in the app, it seems like it may not even be a problem for some). You just don't get it so let me spell it out. No database yet built and put into production has been accessed by only the designated front-end tool. It will be accessed by many tools and all but one of them will not have the business logic. You put business logic into the database to protect the data from people with SQL*Plus, MS Access, and yes even Crystal Reports. Doing so is far more efficient in terms of CPU, Disk I/O, network bandwidth, etc. Plus, in the database, we have tools that we can use to tune DML. The problem in application development these days is that people who have essentially no background in databases, such as you, make decisions based wholly upon their ignorance. No SQL developer would pretend to know how many layers belong in a Java application, or whether to use or not use beans. But front-end developers, reeking of ignorance, quite often think they can write SQL, and worse yet PL/SQL. Also, if you did a lot of SQL queries on the client side, and wanted to change and develop another client, you may have to reprogram much of the business logic too. So, i could see that being a problem. Don't worry. We have DBMS_ADVANCED_REWRITE and we rip your queries out of our databases and replace them with our own when they are too ugly. I would recommend that you pick up a copy of Tom Kyte's books and read them. And again that you find a good DBA to co-teach with you so that your students have a chance of being successful. Essentially every sentence you have written here demonstrates that you do not understand the subject. Please reconsider taking the assignment. |
#47
| |||
| |||
|
|
Doug Davis wrote: On May 20, 6:12 am, Marc Blum <b... (AT) marcblum (DOT) de> wrote: On 19 May 2007 20:02:52 -0700, Doug Davis <douglass_da... (AT) earthlink (DOT) net> wrote: 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) First: when talking about PL/SQL, it always means to me a mixture of SQL and PL/SQL. We follow the first law according to Tom Kyte: - If you can do it in pure SQL, do it in pure SQL. - If you can't do it in pure SQL, do it in PL/SQL. - If you can't do it in PL/SQL, do it in Java, C or whatever... We use PL/SQL as an application server thier. The PL/SQL layer manages all data centric operations. Typically representation and user interaction remains to the 4GLs like Delphi and so on. From a deployability standpoint, putting business requierements into packages makes code management in dev, test and prod much more easier. Security models are much easier to implement. PL/SQL is tightly integrated with the database engine. You have the full power of ORACLE server at your fingertips. The only advantage for other languages seems to be when doing extremely CPU intensive algorithms. When throwing data around, PL/SQL is unbeatable. 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) For about 10 years we use with great success a PL/SQL-centric approach in dozens of big applications, individual solutions and software products. Typically it's the small projects, which don't follow this path. We do incredible big and complex applications. 100.000 and 100.000 and more lines of code, which implement not-so-simplistic business rules. Last shot was a software module to manage time series data, implementing a API-based approach, coded 100% in PL/SQL and SQL. In legacy systems, we successfully migrate code from the app layer to the PL/SQL layer, whenever possible. thanks. real-world experiences such as this are always helpful to me. PL/SQL does seem like it would be good for less CPU intensive tasks. As someone who has been in IT since 1969 and has more than a few years of experience with Oracle your response, the line above this, is an emetic. You truly do not understand PL/SQL. You seem to truly not understand relational databases. You seem to not have any background in Oracle concepts and architecture. And your students deserve to take this class from someone who, if not a subject matter expert, has at least a passing familiarity with the subject. The more you write the more you throw gasoline on the issue. I would think that if you put business-logic in a client side app, you would have the problems of more network traffic (although this seems very dependent apon how much network traffic is inherent in the app, it seems like it may not even be a problem for some). You just don't get it so let me spell it out. No database yet built and put into production has been accessed by only the designated front-end tool. It will be accessed by many tools and all but one of them will not have the business logic. You put business logic into the database to protect the data from people with SQL*Plus, MS Access, and yes even Crystal Reports. Doing so is far more efficient in terms of CPU, Disk I/O, network bandwidth, etc. Plus, in the database, we have tools that we can use to tune DML. The problem in application development these days is that people who have essentially no background in databases, such as you, make decisions based wholly upon their ignorance. No SQL developer would pretend to know how many layers belong in a Java application, or whether to use or not use beans. But front-end developers, reeking of ignorance, quite often think they can write SQL, and worse yet PL/SQL. Also, if you did a lot of SQL queries on the client side, and wanted to change and develop another client, you may have to reprogram much of the business logic too. So, i could see that being a problem. Don't worry. We have DBMS_ADVANCED_REWRITE and we rip your queries out of our databases and replace them with our own when they are too ugly. I would recommend that you pick up a copy of Tom Kyte's books and read them. And again that you find a good DBA to co-teach with you so that your students have a chance of being successful. Essentially every sentence you have written here demonstrates that you do not understand the subject. Please reconsider taking the assignment. |
#48
| |||
| |||
|
|
Let's see ... this guy is asking a question politely and gets jumped all over. |
#49
| |||
| |||
|
|
On May 20, 5:08 am, Frank van Bortel <frank.van.bor... (AT) gmail (DOT) com wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Doug Davis wrote: I will be teaching aPL/SQLclass, and I wanted to get some opinions. I read aboutPL/SQL, but wanted somepracticaladvice from people who have used it. 1. Why usePL/SQLinstead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) 2. What are some examples of "real-world" things that you have done withPL/SQL(or have heard some one do withPL/SQL?) thanks. When asking these questions, I seriously begin to question the authority to teach classes. These are exactly the type of questions *you* should be able to answer, as an instructor! thanks for your opinion. You're welcome. |
#50
| |||
| |||
|
|
On May 22, 6:25 pm, DA Morgan <damor... (AT) psoug (DOT) org> wrote: Doug Davis wrote: On May 20, 6:12 am, Marc Blum <b... (AT) marcblum (DOT) de> wrote: On 19 May 2007 20:02:52 -0700, Doug Davis <douglass_da... (AT) earthlink (DOT) net> wrote: 1. Why use PL/SQL instead of just sending SQL queries from a program written in a procedural language on the client side (Java, Visual Basic, C++, anything.) First: when talking about PL/SQL, it always means to me a mixture of SQL and PL/SQL. We follow the first law according to Tom Kyte: - If you can do it in pure SQL, do it in pure SQL. - If you can't do it in pure SQL, do it in PL/SQL. - If you can't do it in PL/SQL, do it in Java, C or whatever... We use PL/SQL as an application server thier. The PL/SQL layer manages all data centric operations. Typically representation and user interaction remains to the 4GLs like Delphi and so on. From a deployability standpoint, putting business requierements into packages makes code management in dev, test and prod much more easier. Security models are much easier to implement. PL/SQL is tightly integrated with the database engine. You have the full power of ORACLE server at your fingertips. The only advantage for other languages seems to be when doing extremely CPU intensive algorithms. When throwing data around, PL/SQL is unbeatable. 2. What are some examples of "real-world" things that you have done with PL/SQL (or have heard some one do with PL/SQL?) For about 10 years we use with great success a PL/SQL-centric approach in dozens of big applications, individual solutions and software products. Typically it's the small projects, which don't follow this path. We do incredible big and complex applications. 100.000 and 100.000 and more lines of code, which implement not-so-simplistic business rules. Last shot was a software module to manage time series data, implementing a API-based approach, coded 100% in PL/SQL and SQL. In legacy systems, we successfully migrate code from the app layer to the PL/SQL layer, whenever possible. thanks. real-world experiences such as this are always helpful to me. PL/SQL does seem like it would be good for less CPU intensive tasks. As someone who has been in IT since 1969 and has more than a few years of experience with Oracle your response, the line above this, is an emetic. You truly do not understand PL/SQL. You seem to truly not understand relational databases. You seem to not have any background in Oracle concepts and architecture. And your students deserve to take this class from someone who, if not a subject matter expert, has at least a passing familiarity with the subject. The more you write the more you throw gasoline on the issue. I would think that if you put business-logic in a client side app, you would have the problems of more network traffic (although this seems very dependent apon how much network traffic is inherent in the app, it seems like it may not even be a problem for some). You just don't get it so let me spell it out. No database yet built and put into production has been accessed by only the designated front-end tool. It will be accessed by many tools and all but one of them will not have the business logic. You put business logic into the database to protect the data from people with SQL*Plus, MS Access, and yes even Crystal Reports. Doing so is far more efficient in terms of CPU, Disk I/O, network bandwidth, etc. Plus, in the database, we have tools that we can use to tune DML. The problem in application development these days is that people who have essentially no background in databases, such as you, make decisions based wholly upon their ignorance. No SQL developer would pretend to know how many layers belong in a Java application, or whether to use or not use beans. But front-end developers, reeking of ignorance, quite often think they can write SQL, and worse yet PL/SQL. Also, if you did a lot of SQL queries on the client side, and wanted to change and develop another client, you may have to reprogram much of the business logic too. So, i could see that being a problem. Don't worry. We have DBMS_ADVANCED_REWRITE and we rip your queries out of our databases and replace them with our own when they are too ugly. I would recommend that you pick up a copy of Tom Kyte's books and read them. And again that you find a good DBA to co-teach with you so that your students have a chance of being successful. Essentially every sentence you have written here demonstrates that you do not understand the subject. Please reconsider taking the assignment. I'm not really sure how to reply here, you are creating things in your mind that are not even being said. i appreciate any advice you or any one else has on real-world issues with using PL/SQL or what books to study, otherwise, you have made yourself pretty much useless to me at this point. Take care. |
![]() |
| Thread Tools | |
| Display Modes | |
| |