Previous | Table of Contents

Page 506

Figure 21.2.
SQL processing
through the Internet.



Summary

The Internet is providing many opportunities for developers to create enterprisewide applications that access the Oracle relational database. Until recently, such database access from the Internet has not been possible. Through tools such as J/SQL and JDBC, this connectivity between the two has been made possible.

Java is the engine that enables the World Wide Web and the Internet to access data on the relational database. Tools such as J/SQL and Web*SQL have evolved so that you can now embed SQL statements directly in your Java source code. These tools interpret the SQL code into Java code, making for a portable and standard application.

Page 507

Q&A

Q Is it possible to access an Oracle database through the Internet?
A Yes. There are several ways to access an Oracle database from the Internet, such as embedding SQL statements inside your Java code through J/SQL, using JDBC drivers, or using alternatives such as programming languages like C and vendor-specific packages.
Q What is J/SQL?
A J/SQL is a language that embeds SQL in Java with no compatibility issues. J/SQL allows you to access the Oracle database directly from Java.
Q Why should I use J/SQL instead of Pro*C?
A Choosing to develop with one language over another is really a personal preference. I recommend J/SQL because it is specifically developed to take advantage of Java's power as an Internet application language.

Workshop

Use the following workshop to test your comprehension of this chapter and put what you've learned into practice. You'll find the answers to the quiz in Appendix A, "Answers."

Quiz

  1. List several of the options available to access the Oracle database through Java.
  2. What are the differences between PL/SQL and Java?
  3. What role does JDBC play in Internet-to-database connectivity?

Page 508

Page 509

WEEK
3
In Review

Day 15

On Day 15, you learned some advanced topics such as managing large objects new to Oracle8 with the DBMS_LOB package. You also learned how to implement recursive functions in Oracle.

Day 16

On Day 16, you learned how to manage transactions by locking a record as it is processed, which prevents another user from accessing the record and thus prevents data corruption. You also learned how to restore the database to the old data with the ROLLBACK procedure. You learned what a savepoint is when working with COMMIT and ROLLBACK. You looked at optimum ways to lock data from users, sometimes using a row lock and sometimes using a table lock.

Page 510

Day 17

On Day 17, you worked with the DBMS_SQL package. This package offers the capability to create dynamic SQL from within PL/SQL. It also allows you to use DDL from within
PL/SQL.

Day 18

On Day 18, you were able to write and read files with the UTL_FILE package, which is an excellent way to import and export data in any format for any application. In addition, you learned how to output information to the screen with the DBMS_OUTPUT package, which is used primarily for debugging purposes.

Day 19

On Day 19, you learned how to handle the communications between sessions with the DBMS_PIPE package. Some unique features regarding pipes are that they can handle almost any datatype, they are not affected by a rollback, and they communicate asynchronously. In addition, you learned how to manage jobs with the DBMS_JOB package. You should be able to run any job on demand, schedule a future job, or fix a broken job.

Day 20

On Day 20, you learned how to alert someone with the DBMS_ALERT package. Although this package is similar to the DBMS_PIPE package, this is a transaction-based process that uses COMMIT. Communications typically occur one way, and the message sent is of type VARCHAR2. The major advantage of using alerts is that an alert can be broadcasted and thus received by all sessions monitoring that alert. So if an alert is used for an emergency, for example, many people can be notified immediately to evacuate the building!

Day 21

On Day 21, you learned how to implement J/SQL with Oracle for Web-based access to the database. As electronic commerce proliferates, it will become more and more important for you to understand database connectivity with Web pages.

Previous | Table of Contents

Используются технологии uCoz