Database/Pointbase Info

Database/Pointbase Info

Simple Instructions on Using PointBase for the Project Nick Duan August 9, 2004 PointBase is bundled with Sun’s Application Server (J2EE SDK 1.4 Package). Its database size is limited to 5 Mbytes. This should be large enough for storing your project data. The PointBase directory (pointbase) is directly under the app server’s installation directory, and all the database utilities is under the directory $APPSERVER/pointbase/tools/serveroption. Once installed Sun’s app server, PointBase will be installed automatically. Starting and stopping PointBase server Before using PointBase for your application, you need to start the PointBase server. There are two ways to start the PointBase server on windows. One way is to start the server from the program menu, i.e. to select the program menu item: Programs -> Sun MicroSystems -> J2EE SDK 1.4 -> Start PointBase. Another way is to enter the command startserver from the directory $APPSERVER/pointbase/tools/serveroption. To stop the server, either select the program menu Programs -> Sun MicroSystems -> J2EE SDK 1.4 -> Stop PointBase, or enter the command stopserver from the PointBase’s serveroption directory. Executing standard SQL using the console utility PointBase provides a convenient GUI tool to allow you to create/modify database schema/tables, and enter data directly into the database. To start the console tool, enter the command startconsole from the PointBase’s serveroption directory. A GUI window will be shown on your screen. Please follow the following steps to create a database for your project: 1. Enter the following information into the initial dialog box: a. Driver (no change) b. URL: jdbc:pointbase:projXXXX (where XXXX is the last 4 digit of your ID) c. User: (choose your own) d. Password: (choose your own) 2. Select the “Create New Database” option and click on the OK button. 3. A new database will be created named projXXXX. A list of database schemas and other entities will be show on the left panel of the console tool. 4. You may use the SQL command panel to enter any standard SQL commands (both DDL and DML command). Select the menu item Refresh Catalog from the Window menu to see the newly created table. 1 2 Three database files associated with the schema projXXXX are created under the databases directory of PointBase: projXXXX.dbn, projXXXX$1.wal, and projXXXX.lck. The last one is a lock file and will be automatically removed once the console tool is terminated. This lock file prevents other application from using the database at the same time. So if the console is up, you can’t run your JDBC application against that particular database. Only the two files, projXXXX.dbn and projXXXX$1.wal are required as part of the project deliverables. You don’t need to start the PointBase server when running the startconsole. Importing and exporting database files Due to fact that only a restricted version of PointBase is bundled with Sun’s App server, you won’t be able to use the import and export functions on the console utility. You can export your table content into a file, but won’t be able to import data from a file. The simplest way to populate a database table in batch mode is to create an sql file with standard SQL statements, then open the file using the console tool and run the execute-all command. Running JDBC applications with PointBase To access PointBase database in your standalone or RMI application via JDBC’s DriverManager API, configure the URL as jdbc:pointbase:server://localhost:9092/projXXXX (projXXXX is the database name). The driver manager of PointBase is defined in class com.pointbase.jdbc.jdbcUniversalDriver. Use this class for initializing the driver class. See the SampleJDBC.java as an example. Make sure that the jar file pbclient.jar (under the lib directory of PointBase) is located in your class path before running your application. Configuring and access PointBase as JNDI resource The PointBase should be configured as a JNDI resource/JDBC data source, if you plan to access the database in EJB or Servlet. Please follow the instructions in Chapter 26 in J2EE Tutorial for how to configure the database as a JNDI resource/JDBC data source. Disclaimer The instructions contained in this document are created without any references to any official PointBase document. There is no information regarding the use of PointBase and DataMirror, the company that purchased the initial PointBase, refused to provide any user documentation to the public. This document is the results of author’s own experiment. Please use with your own caution. PointBase is a trademark of DataMirror. J2EE is a trademark of Sun Microsystems. 3 .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us