Документ взят из кэша поисковой машины. Адрес оригинального документа : http://rtm-cs.sinp.msu.ru/manual/howto/PostgreSQL-HOWTO.html
Дата изменения: Mon May 15 19:09:56 2000
Дата индексирования: Mon Oct 1 21:15:12 2012
Кодировка:

Поисковые слова: lightning
Database-SQL-RDBMS HOW-TO document for Linux (PostgreSQL Object Relational Database System)

Database-SQL-RDBMS HOW-TO document for Linux (PostgreSQL Object Relational Database System)

Al Dev (Alavoor Vasudevan) alavoor@yahoo.com

v21.0, 14 May 2000


This document is a "practical guide" to very quickly setup a SQL Database engine and front end tools on a Unix system. It also discusses the International standard language ANSI/ISO SQL and reviews the merits/advantages of the SQL database engine developed by the world-wide internet in an "open development" environment. It is about HOW-TO setup a next generation Object Relational SQL Database "PostgreSQL" on Unix system which can be used as a Application Database Server or as a Web Database Server. PostgreSQL attempts to implement current and future International ISO/ANSI SQL standards. This document also gives information on the database interface programs like Front End GUIs, RAD tools (Rapid Application Development), ODBC, JDBC drivers, "C", "C++", Java, Perl programming interfaces and Web Database Tools. Information given here applies to all Unix/Windows NT platforms and to all other SQL databases. It will be very useful for people who are new to Databases, SQL language and PostgreSQL. This document also has SQL tutorial, SQL syntax which would be very helpful for beginners. Experienced people will find this document as a useful reference guide. For students, the information given here will enable them to get the source code for PostgreSQL relational database system, from which they can learn as to how a RDBMS SQL database engine is created.

1. Introduction

2. Laws of Physics apply to Software!

3. What is PostgreSQL ?

4. Where to get it ?

5. PostgreSQL Quick-Installation Instructions

6. PostgreSQL Supports Extremely Large Databases greater than 200 Gig

7. How can I trust PostgreSQL ? Regression Test Package builds customer confidence

8. GUI FrontEnd Tool for PostgreSQL (Graphical User Interface)

9. Interface Drivers for PostgreSQL

10. Perl Database Interface (DBI) Driver for PostgreSQL

11. PostgreSQL Management Tools

12. Setting up multi-boxes PostgreSQL with just one monitor

13. Zope Web-Application-Server for PostgreSQL

14. Applications and Tools for PostgreSQL

15. Web Database Design/Implementation tool for PostgreSQL - EARP

16. PHP Hypertext Preprocessor - Server-side html-embedded scripting language for PostgreSQL

17. Python Interface for PostgreSQL

18. Gateway between PostgreSQL and the WWW - WDB-P95

19. "C", "C++", ESQL/C language Interfaces and Bitwise Operators for PostgreSQL

20. Japanese Kanji Code for PostgreSQL

21. PostgreSQL Port to Windows 95/Windows NT

22. Mailing Lists

23. Documentation and Reference Books

24. Technical support for PostgreSQL

25. Economic and Business Aspects

26. List of Other Databases

27. Internet World Wide Web Searching Tips

28. Conclusion

29. FAQ - Questions on PostgreSQL

30. Other Formats of this Document

31. Copyright Notice

Appendix

32. Appendix A - Syntax of ANSI/ISO SQL 1992

33. Appendix B - SQL Tutorial for beginners

34. Appendix C - Linux Quick Install Instructions


1. Introduction

The purpose of this document is to provide comprehensive list of pointers/URLs to quickly setup PostgreSQL and also to advocate the benefits of Open Source Code system like PostgreSQL, Linux.

Each and every computer system in the world needs a database to store/retrieve the information. The primary reason you use the computer is to store, retrieve and process information and do all these very quickly, thereby saving you time. At the same time, the system must be simple, robust, fast, reliable, economical and very easy to use. Database is the most VITAL SYSTEM as it stores mission critical information of every company in this world. Each and every industry in this world needs a database system. Industries like telecom, automobile, banks, airlines, etc.. will not function efficiently without a database system. The most popular database systems are based on the International Standard Organisation (ISO) SQL specifications and ANSI SQL (American) standards. The current specifications widely used in the industry are ISO/ANSI SQL 1992. Upcoming standard is the SQL 1998/99 which is also called SQL-3 is still under development. Popular database like Oracle, Sybase and Informix systems are based on these standards or are trying to implement these standards.

Without a standard like ANSI/ISO SQL, it would be very difficult for the customer to develop a application once and run on all the database systems. End user wants to develop an application ONCE using ISO SQL, ODBC, JDBC and deploy on all variety of database systems in the world.

The world's most popular FREE Database which implements some of the ISO SQL, ANSI SQL/98, SQL/92 and ANSI SQL/89 RDBMS is PostgreSQL. PostgreSQL is next generation Object relational database and is targeting on full compliance of SQL standards like ISO/ANSI SQL. PostgreSQL is the only free RDBMS in the world which supports Object databases and SQL. This document will tell you how-to install the database, how to set up the Web database, application database, front end GUIs and interface programs. It is strongly advised that you MUST write your database applications 100 % compliant to standards of ISO/ANSI SQL, ODBC, JDBC so that your application is portable across multiple databases like PostgreSQL, Oracle, Sybase, Informix etc.

You get the highest quality, and lot many features with PostgreSQL as it follows 'Open Source Code development model'. Open Source Code model is the one where the complete source code is given to you and the development takes place on the internet by a extremely vast network of human brains. Future trend shows that most of the software development will take place on the so called "Information Super-Highway" which spans the whole globe. In the coming years, internet growth will be explosive which will further fuel rapid adoption of PostgreSQL by the industry.

By applying the principles of statistics, mathematics and science to software quality, you get the best quality of software only in a 'Open Source Code System' like PostgreSQL, wherein the source code is open to a very vast number of human brains inter-connected by the information super-highway. Greater the number of human brains working, the better will be the quality of software. Open Source Code model will also prevent RE-INVENTION OF WHEELS, eliminates DUPLICATION OF WORK and will be very economical, saves time in distribution and follows the modern economic laws of optimizing the national and global resources. Once a software work is done by others, then you DO NOT need to re-do that again. You will not be wasting your valuable time on something which had already been WELL DONE. Your time is extremely precious and it must be utilized efficiently, because you have only 8 hours a day for doing work. As we will be entering the 21st century, there will be a change in the way that you get software for your use. Everybody will give first preference for the open source softwares like PostgreSQL, Linux.

If you buy binaries, you will not get any equity and ownership of source code. Source code is a very valuable asset and binaries have no value. Buying software may become a thing of the past. You only need to buy good hardware, it is worth spending money on the hardware and get the software from internet. Important point is that it is the computer hardware which is doing bulk of the work. Hardware is the real work horse and software is just driving it. Computer hardware is so much more complex that only 6 nations in the world so far have demonstrated the capability of designing and manufacturing computer chips/hardware. Design and manufacturing of computer chips is a advanced technology. It is a very complex process, capital intensive, requires large investments in plant and production machines which deal with 0.18 micron (even smaller than 0.18) technology. On a single small silicon chip millions of transistors/circuits are densely packed. Companies like Applied Material, AMD, Intel, Cyrix, Hitachi, IBM and others spent significant number of man-years to master the high-technology like Chip Design, Micro-electronics and Nano-electronics. Micro means (one-millionth of meter 10^-6), Nano means (one-billionth of meter 10^-9). Current technology uses micro-electronics of about 0.35 micron using aluminum as conductors and 0.25 micron sizes using copper as conductors of electrons. In near future the technology of 0.10 micron with copper and even nano-electronics will be used to make computer chips. Aluminum conductors will be phased out by copper on computer chips, as copper is a better conductor of electrons. In photolithography process extreme ultraviolet, X-ray or electron-beam techniques will be used to etch circuits for feature size less than 0.15 micron. In about 20 years from now, silicon chips will be phased out by molecular computers and bio chips which will be billions of times faster than silicon chips. Molecules are a group of atoms. And atoms are tiny particles which makes up everything that you see in this world. Molecular computers will use the molecules of matter as ultra-fast electronic on/off switches. When the switch is ON it indicates 1, and when it is OFF it indicates 0. All the computer programs in this world are based on binary (numbers 1 and 0). Table below shows the progress and future advancement trends of computer chips.

                     Advancement of chip capabilities in future
                    ********************************************
+--------------------------+---------+---------+---------+---------+--------+---------+
| Item/Year                | 1997    | 1999    | 2001    | 2003    | 2012   | 2020    |
+--------------------------+---------+---------+---------+---------+--------+---------+
| Feature size(micron)     | 0.25    | 0.18    | 0.15    | 0.13    | 0.05   |< 0.00001|
+--------------------------+---------+---------+---------+---------+--------+---------+
| Wafer size(mm)           | 200     | 300     | 300     | 300     | 450    | Mol/Bio |
+--------------------------+---------+---------+---------+---------+--------+---------+
| Min Operating Voltage    | 1.8-2.5 | 1.5-1.8 | 1.2-1.5 | 1.2-1.5 | 0.5-0.6| < 0.001 |
+--------------------------+---------+---------+---------+---------+--------+---------+
| Max power dissipation    | 70      | 90      | 110     | 130     | 175    | 600     |
+--------------------------+---------+---------+---------+---------+--------+---------+
| On-chip frequencey (MHz) | 750     | 1,250   | 1,500   | 2,100   | 10,000 | > 50,000|
+--------------------------+---------+---------+---------+---------+--------+---------+
| DRAM capacity            | 256 MB  | 1 GB    | 2 GB    | 4 GB    | 256 GB | > 1000GB|
+--------------------------+---------+---------+---------+---------+--------+---------+
As you can see, it is hardware that is high technology and important and software is labor intensive but is a less difficult technology.

On other hand, each and every country in the world develops/makes software. In fact, any person in this world with a small low-cost PC can write software.

Databases like Oracle, Informix, Sybase, IBM DB2 (Unix) are written using the "C" language and binaries are created by compiling the source code and then they are shipped out to customers. Oracle, Sybase, Informix databases are 100 % "C" programs!!

Since a lot of work had been done on PostgreSQL for the past 14 years, it does not make sense to re-create from scratch another database system which satisfies ANSI/ISO SQL. It will be a great advantage to take the existing code and add missing features or enhancements to PostgreSQL and start using it immediately.

Prediction is that demand for "Internet products" like PostgreSQL will grow exponentially as it is capable of maintaining a high quality, low cost, extremely large user-base and developer-base. Those nations which do not use the 'Internet products' will be seriously missing "World-wide Internet Revolution" and will be left far behind other countries. The reason is "Internet" itself is the world's LARGEST "software company" and is a large software "power house"!


2. Laws of Physics apply to Software!

In this chapter, it will be shown how science plays a important role in the creation of various objects like software, this universe, mass, atoms, energy and even yourself! This chapter also shows why knowledge of science is very important before you start using the products of science.

The golden rule is - "You MUST not use a product without understanding how it is created!!" This rule applies to everything - database sytems, computer system, operating system, this universe and even your own human body! It means that you should have complete source code and information about the system. It is important to understand how human body and atoms inside human body works since humans are creating PostgreSQL, MS Windows95 etc..

Creation is a very important step. Persons who are using the objects of science must know how it is created. This applies to even computer systems and PostgreSQL. A majority of people do not have knowledge of science and hence do not know how systems like MS Windows NT/95, Oracle, human body and this universe are created. A vast majority of people do not know what made the universe and MS Windows 95/NT and what is inside it. Complex systems are built from very simple basic building blocks like - millions of universes are created, each universe in turn has millions of super-clusters, each super-cluster has millions of galaxies, each galaxy has millions of stars, some stars system have many planets, each planet in turn is made up billions of atoms.(In the history of this world, only one universe was created by a man in ancient India eons ago, but no other case had been reported in the modern history. Creating a universe is a much more advanced technology and is more advanced than the atomic bomb which was dropped on Hiroshima and Nagasaki causing horrible destruction). Modern nuclear weapons are so tiny and powerful that if such a single nuclear bomb is dropped then it can completely vaporise the planet earth! But there are also weapons which will completely NULLIFY and NEUTRALISE all the nuclear weapons in the world!! Total variety of weapons are infinity!. Software like MS Windows 95 is created simply by "C" and assembler language programs which simply uses 1 and 0 and universes like ours are created simply by dashing TWO dissimilar but proper of combination of tiny atomic particles of other dimensions. A human body is created by dashing two dissimilar but proper combination of tiny cells!! Humans inherited the properties of this universe. The universe you are currently living in was NOT there - all the atoms inside the universe was not there and not even TIME was existing!! Baby universe was born during big bang and started expanding and kept growing. Even today the universe is still expanding!! A person from another universe by name 'Brahma' created this universe you are currently living in. It is indeed possible for man to create a new universe. Total number of universes that can be created is INFINITY and similarly total number of operating systems that can be created is also infinity!! Infinite number universes and infinite variety of multi-dimensional atoms collapse down into few primary-dimensional-universe.

The laws of science and statistics favour the open-source code system like PostgreSQL and Linux. As the internet speed is increasing everyday, and internet is becoming more and MORE reliable, the open-source code system will gain very rapid momentum. And, if rules of statistics and laws of physics are correct, awareness of science grows and when IGNORANT people start learning science then the closed source-code systems will eventually vanish from this planet.

Developing a project like PostgreSQL requires resources like energy and time, hence PostgreSQL is a product of energy and time. Since energy and time can be explained only by science, there is a direct co-relation between physics and software projects like PostgreSQL, Linux. Laws of science (Physics) applies everywhere and at all the times, to anything that you do, even while you are developing the software projects.

Physics is in action even while you are talking (sound waves), walking (friction between ground and your feet), reading a book or writing software. Every science in this world has a deep root in mathematics, including PostgreSQL. PostgreSQL uses 'Modern Algebra' which is a tiny branch of mathematics. Modern algebra deals with 'Set Theory', 'Relational Algebra', science of Groups, Rings, Collections, Sets, Unions, Intersections, Exclusions, Domains, Lists, etc...

The software like PostgreSQL is existing today because of the energy and time. And mass and energy are ONE and the SAME entity. The fact that mass and energy are same was unknown to people 100 years ago! And even today it is unknown to world population that internet is the largest software "power house" and the largest "software company" in the world!

Cells in the human brains consume energy while processing (creating software), by converting the chemical energy from food into electrical and heat energy. Even while you are reading this paragraph, the cells in your brain are burning out the fuel and are using tiny amounts of energy. All of these implies that human brain is a thermodynamic heat engine. Because human brain is a thermodynamic engine, the laws of thermodynamics applies to brain and hence thermodynamics has indirect effects on software like PostgreSQL.

There can be infinite number of colors, computer langauages, computer chip designs and theories but there CANNOT be ONE SINGLE PERFECT color, computer language, design or system! What you can have is only a NEAR PERFECT color(wavelength), system, database, or theory! Nature is like a KALIEDOSCOPE - there are infinite number of dimensions, infinite variety particles of other dimensions but they all combine into very few primary dimensions and vice-versa.

By combining the energies of millions of people around the world via internet it is possible to achieve a NEAR PERFECT system (including a database software system). Individually, the energy of each person will be minute, but by networking a large number of people, the total energy will be huge which can be focused on a project to generate a near perfect system.

The energy is measured in Joules, kiloJoules or kilograms of mass, and time is measured in seconds or hours. And power is energy divided by time and is measured in Watts or kiloWatts .


        Energy of each person = y Joules
or in terms of mass
        Energy of each person = y grams
The conversion factor between mass and energy is E = m * c * c  
where 'c' is the speed of light and 'm' is the mass.
        Time = 8 hours (This is constant since each person has only 8 hours a day)
        Power = Energy / Time
                  = (y / (8 * 60 * 60) ) Watts
        Total Power of the world = n * (y / (8 * 60 * 60) ) Watts
where n = number of persons working on the project.

From the above equation it is clear that increasing the 'n' will greatly improve the quality of product.

It is very clear that internet can network a vast number of people, which implies internet has a lot of energy and time which can produce much higher quality software products in much shorter time as compared to commercial companies. Even very big companies like Microsoft and IBM cannot overpower and overrule the laws of Physics but will eventually SURRENDER UNTO laws of science!

Conclusion is - because of laws of science, 'open source code' system like PostgreSQL, Linux will prevail and will be always much better than 'closed source code' system and it is possible to prove this statement scientifically. Man should not waste time creating too many duplicate software products.


3. What is PostgreSQL ?

PostgreSQL is a free database, complete source code is given to you and is a Object-Relational Database System targetting on ANSI ISO/SQL 1998, 92 and runs on diverse hardware platforms and Operating systems. The ultimate objective and the final goal of PostgreSQL is to become 100 % compliant to ANSI/ISO SQL and also to become the number ONE open generic Database in the world.

Informix Universal server (released 1997) is based on earlier version of PostgreSQL because Informix bought Illustra Inc. and integrated with Informix. Illustra database was based on Postgres (earlier version of PostgreSQL).

PostgreSQL is an enhancement of the POSTGRES database management system, a next-generation DBMS research prototype. While PostgreSQL retains the powerful data model and rich data types of POSTGRES, it replaces the PostQuel query language with an extended subset of SQL.

PostgreSQL development is being performed by a team of Internet developers who all subscribe to the PostgreSQL development mailing list. The current coordinator is Marc G. Fournier

This team is now responsible for all current and future development of PostgreSQL. Ofcourse, the database customer himself is the developer of PostgreSQL! The development load is distributed among a very large number of database end-users on internet.

The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many others have contributed to the porting, testing, debugging and enhancement of the code. The original Postgres code, from which PostgreSQL is derived, was the effort of many graduate students, undergraduate students, and staff programmers working under the direction of Professor Michael Stonebraker at the University of California, Berkeley.

The original name of the software at Berkeley was Postgres. When SQL functionality was added in 1995, its name was changed to Postgres95. The name was changed at the end of 1996 to PostgreSQL.

Millions of PostgreSQL is installed as Database servers, Web database servers and Application data servers. It is very sophisticated object relational database system (ORDBMS).

PostgreSQL runs on Solaris, SunOS, HPUX, AIX, Linux, Irix, Digital Unix, BSDi,NetBSD, FreeBSD, SCO unix, NEXTSTEP, Unixware and all and every flavor of Unix. Port to Windows NT is done using Cygnus cygwin32 package.

PostgreSQL and related items in this document are subject to the COPYRIGHT from University of California, Berkeley.

4. Where to get it ?

You can buy Redhat Linux CDROM, Debian Linux CDROM or Slackware Linux CDROM which already contains the PostgreSQL in package form (both source code and binaries) from :

PostgreSQL organisation is also selling 'PostgreSQL CDROM' which contains the complete source code and binaries for many Unix operating systems as well as full documentation.

Binaries only distribution of PostgreSQL: