PHP Manual
PEAR Manual
Smarty Manual
PostgreSQL
MySQL Manual
Perl Manual
Ciekawe adresy
- Prezent dla chłopaka
- Systemy
- Fotografie
- Biuro rachunkowe Opole
- Agencja Interaktywna
- Biuro Rachunkowe Poznań
- Jak Schudnąć
- Vitalitys
Czytnik RSS
» SAP sfinalizował zakup Sybase i poprawia wynikiSybase będzie działać jako osobna firma, kierowana przez dotychczasowego szefa - Johna Chena, nadal zajmując się bazami danych i systemami informacji zarządczej.
» AMD wypuszcza nowe roadmapy, platformia Scorpius w 2011
W Internecie pojawiły się nowe roadmapy AMD. Nową platformą będzie Leo, bazowaną na zgodnymi z przewidywaniami procesorami na jądrze Thuban, które będą sześciordzeniową wersją obecnych procesorów serii Phenom II X4. Procesory będą oparte o serwerowe odpowiedniki o nazwie kodowej Istanbul. Razem z Thubanami pojawi się chipset RD890, przewidziany jako AMD 890FX oraz mostek południowy SB850. Grafika będzie oparta o serię ATI HD 5000 DX11.
» Aktualizacja: Agora odpala sieć reklamy efektywnościowej
Uruchomiona przez Agorę sieć PayPer.pl oferuje powierzchnie reklamowe dla kampanii efektywnościowych. Za rozwój sieci odpowiada Dorota Bachman.
» Amerykańscy naukowcy z MIT przyspieszą Internet
Naukowcy z Massachusetts Institute of Technology opracowali technologię, która pozwala przyspieszyć przesyła danych w Internecie do 100 do 1000 razy przy jednoczesnym obniżeniu kosztów.
chapter 12. jdbc
this chapter covers jdbc ( java database connectivity), which is a set of classes and methods available for the java programming language. the use of jdbc with java is a simple, generic, and portable way of interacting with different types of databases. for this chapter, some existing knowledge of how to program in java is assumed.
the jdbc interfaces, defined by sun, cover all of the interactions you can have with a standard sql database. the vendor (in this case, postgresql) supplies concrete implementations that implement these interfaces. these concrete implementations handle the vendor-specific interactions with the database: connecting, logging in, using stored procedures, and so forth. these interfaces are designed this way so that a program using jdbc can connect to any jdbc-compliant database, without your having to rewrite the code. however, there are some caveats.
one issue is that jdbc does not do any client-side sql parsing or syntax checking. sql statements are passed off transparently to the database, whether or not they are valid. therefore, if the sql is valid on one vendor's database, but invalid on another vendor's database the implementation won't know until the actual connection is made and the sql is sent across. sun is attempting to deal with this problem, and there may be some provisions made to correct this, either in later versions of jdbc or in a different standard.
another issue is that each vendor has additional helper classes specific to that vendor. for instance, postgresql has extensions for geometric data types. other vendors won't support these extensions; they are specific to postgresql. if you use such vendor-specific classes, your program will not work with another jdbc database, despite using the jdbc "standard."
one advantage of the postgresql jdbc driver is that it is a "type 4" driver. this means that it is written in pure java, so it can be taken anywhere, and used anywhere as long as the platform it is used on has tcp/ip capabilities, because the driver only connects via tcp/ip.
building the postgresql jdbc driver
this section assumes that you already have a postgresql database set up and ready to go. make sure that you have it set to accept incoming tcp/ip connections. this can be configured when running the postmaster command. for more information on database start-up options, see chapter 9.
before you can use jdbc, you must build the postgresql jdbc drivers. to do this, you must have the java source code that is used to build the driver. this source is included both in the complete postgresql package, and in the opt package. these can be downloaded from the postgresql site; for more information about downloading and installing these, see chapter 2.
you also need ant. ant is a standard build system for java products, somewhat similar to gmake, and is created by apache's jakarta project. it is required to build the postgresql jdbc driver. for more information on ant, see: http://jakarta.apache.org/ant/index.html. make sure that ant's bin directory is in your path.
first you need to configure the makefile system to recognize that you are using java. if you did not originally build postgresql with java support, move into the top level of the postgresql source tree, and type ./configure with-java, along with any other configure options you originally used. this will regenerate makefiles and, if necessary, will add support for java.
next you must actually build the driver and implementations. change to the src/interfaces/jdbc directory and issue the gmake command. this will build two jar files: postgresql.jar, containing the driver class and other concrete implementations, and postgresql-examples.jar, containing compiled example classes.
Najskuteczniejsza reklama to pozycjonowanie - Pozycjonowanie stron <= zajrzyj tu i dowiedz się więcej o pozycjonowanie stron