Chapter 7. Database


Terms you'll need to understand:

  • Structured Query Language (SQL)

  • Query

  • Atomicity

  • Row-level locking

  • Adapter pattern

  • Value Object pattern

  • Remote Method Invocation (RMI)

  • Database

Techniques you'll need to master:

  • Creating a data model and transforming it to a database design

  • Identifying data in a database that should not be duplicated and should remain unique

  • Developing and performing queries against a database using Structured Query Language (SQL)

  • Describing an Adapter design pattern and using it in your assignment

  • Defining a database search algorithm and implementing it for your assignment

  • Knowing the difference between a database read lock and a database write lock

  • Implementing a database design in a Web environment

  • Providing the correct thread management for a multiuser database server

In this chapter, you review the basics of databases and how you should implement one for your certification project. The assignment you download from Sun includes a skeleton for a database. These base classes are not enough to make a database server, however. You have to modify and extend these classes, and add new classes, to meet the certification requirements.

To meet those requirements, you need to master designing, developing, and administering a database system. Although the database you build for the assignment is not a relational database management system (RDBMS), it is a database. To help you understand the key principles, this chapter offers a brief background in database theory and discusses database design concepts from modeling to implementation. You also see a working example of a database system similar to what you should submit to Sun. The example isn't exactly the same as my solution, but several parts have been abstracted to work in many situations, the assignment being one of them.

Sun expects you to demonstrate a solid understanding of database systems. The sample code in this chapter helps you understand database concepts in a practical, rather than logical, manner. The code example is not a true RDBMS. However, you should be able to adapt the ideas it demonstrates for your solution. For a more complete treatment of relational database topics, please refer to the textbooks in "Need to Know More?" at the end of this chapter; these books make use of case studies and supply numerous examples and problem sets for practicing database concepts.

Some candidates think that the search statement coming from the client should be Structured Query Language (SQL) so that the solution is able to upgrade to using a relational database. If you take that route, the "SQL" section of this chapter will be helpful.

This chapter's sample database system consists of an application that approximates the certification assignment, but is not identical to it to comply with Sun's confidentiality requirement for its certification exams. The project code can assist you in designing and building your own solution. The listings in this chapter do not compile by themselves . They don't compile even if you combine all five listings. To compile the code, you'd need other classes, such as SuperBowlException.java and DatabaseInterface.java . However, the entire project is provided on this book's CD, and the code listings in this chapter will compile from their proper directories found in the supplied code files.



JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net