Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2012
    Posts
    18

    Unanswered: For PostgreSQL Do I need Apache and PHP?

    Hi everyone.

    I just installed PostgreSQL using the One-Click installer on Windows 7.
    The installation I believe, is fine. I chose to install Apache and PHP.

    The pgAdmin runs OK, and with the user postgres and its password, the postgres database opens.

    That's as far as I am now.

    Before going further, I have these questions:

    1. Do I need Apache to put data in and view it, and modify it?

    2. Same as (1.) do I need PHP?

    3. When I opened the postgres database, as said, using the pgAdmin, did it use Apache, and PHP?

    4. Next I would like to install Postgres FORMS, and the same questions apply: Does Posgtres FORMS have to use Apache and PHP?

    I ask this because after reading some on PostgreSQL, I am not sure if it is meant for using it in the local machine, without using a browser like firefox to interface with the database.

    5. I also would like to know if a created database can be copied to another computer (where I would also install PostgreSQL), for independent use, with the data of course being different as per use. In other words, is a PostgreSQL database PORTABLE?

    I am quite familiar with old-time databases (R-Base) in the DOS systems. I want to start learning PostgreSQL, with no particular project needed right now. But I plan to load data from old ones into PostgreSQL.

    I realize I need Apache and PHP for web applications. But I am not sure if PostgreSQL also can be used on a local machine without them, and in particular using Postgres FORMS?

    Thanks for any help afforded!
    Last edited by elmug; 06-06-12 at 13:34.

  2. #2
    Join Date
    Nov 2008
    Posts
    28
    Quote Originally Posted by elmug View Post
    1. Do I need Apache to put data in and view it, and modify it?
    Nope.

    2. Same as (1.) do I need PHP?
    Negative.

    3. When I opened the postgres database, as said, using the pgAdmin, did it use Apache, and PHP?
    No.

    4. Next I would like to install Postgres FORMS, and the same questions apply: Does Posgtres FORMS have to use Apache and PHP?
    Not familiar with that specific app - looks interesting though - but on a casual glance at its home page I see this:

    Postgres Forms is implemented in Tcl/Tk
    So I would say (again), no specific need for Apache/PHP in this instance.
    I ask this because after reading some on PostgreSQL, I am not sure if it is meant for using it in the local machine, without using a browser like firefox to interface with the database.

    5. I also would like to know if a created database can be copied to another computer (where I would also install PostgreSQL), for independent use, with the data of course being different as per use. In other words, is a PostgreSQL database PORTABLE?
    It's not something I've done personally... but its fairly common for RDBMS software to support backing up and restoring. It makes a certain amount of sense that for a higher-end DB like PostgreSQL to allow restoring to a new machine following a hardware upgrade, for instance. In other words... I haven't done it, and I don't know *how* to do it myself yet... but I'd be willing to bet money that it can be done.


    I realize I need Apache and PHP for web applications. But I am not sure if PostgreSQL also can be used on a local machine without them, and in particular using Postgres FORMS?
    Should be able to...

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by elmug View Post
    5. I also would like to know if a created database can be copied to another computer (where I would also install PostgreSQL), for independent use, with the data of course being different as per use. In other words, is a PostgreSQL database PORTABLE?
    If you are thinking about just "copying" a "database" the way you copy an Excel Sheet or an Access Database, then the answer is a clear NO.

    You can do a backup and then restore that backup on a different computer but that's as "portable" as it gets

  4. #4
    Join Date
    Jun 2012
    Posts
    18
    Thank you memilanuk, for your clear replies. They have been very helpful.
    I am moving forward with PostgreSQL.

    I do have some more related questions in a new thread, having to do with location and dependencies of what's used to interact with PostgreSQL.

  5. #5
    Join Date
    Jun 2012
    Posts
    18
    Quote Originally Posted by shammat View Post
    If you are thinking about just "copying" a "database" the way you copy an Excel Sheet or an Access Database, then the answer is a clear NO.

    You can do a backup and then restore that backup on a different computer but that's as "portable" as it gets
    Thank you for your good answer Shammat.

    1. If possible, would you explain why it is so, since it seems to me that a database should basically be FILES written somewhere on a hard-disk?

    2. Perhaps there is data that PostgreSQL writes in places that are not easy to know where they are?

    3. Now, since I have seen that a database can be created with SQL statements, is it possible to do the opposite: to query a database, loaded or not with data, and obtain the statements that CAN create the database back (with or without data)? This may or not be a practical thing for typical large databases, but perhaps can be for developing purposes, tests, and learning.

    Thanks a lot for any more help on this. I am not after details at this point, but more on concepts. (Some of these things I ask, were part of my way of developing applications on old time database systems).

  6. #6
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by elmug View Post
    1. If possible, would you explain why it is so, since it seems to me that a database should basically be FILES written somewhere on a hard-disk?
    All explained in the manual:
    http://www.postgresql.org/docs/curre...ckup-file.html

    3. Now, since I have seen that a database can be created with SQL statements, is it possible to do the opposite: to query a database, loaded or not with data, and obtain the statements that CAN create the database back (with or without data)?
    Again the strategy for backup and restore is documented in the manual:

    http://www.postgresql.org/docs/curre...ckup-dump.html

  7. #7
    Join Date
    Jun 2012
    Posts
    18
    Thanks Shammat for your good replies.

    I will certainly study the links that you kindly provide.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •