Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2012

    Unanswered: Please help clarify "database" meaning.

    Hi everyone,

    I have been with PostgreSQL for a few days. I also installed Postgres Forms.

    Need and would appreciate help on these questions, assuming one is Postgres user with the superuser password:

    1. "postgres" I gathered is the System database. It is created during installation of the postgresql package. When we create another database database2, then we have a "cluster" of TWO databases. I read that one can only be connected to one database at a time. However, when we close postgres and open database2, don't we in a way still have a connection to postgres (the system database)?

    2. This instruction comes with the postgres forms package:
    Using 'Tools -> Install example database', you can install one of these example databases in the currently opened database (my underlining). This database should be completely empty. It should not even contain the pfm_* tables.

    However, it seems to me that a database is not actually installed WITHIN a database, or can that be done?

    3. It seems to me that when using postgresql, one is really always WITHIN a database in order to create another database, and the database is created in parallel to the database from the one where the creation was made. So, being IN a database, one can create a new one, but one can not access the one created unless one closes the current one and opens the new one created. Am I uderstanding this correctly? Please help me get cleared on this, which kind of gives me a headache right now.


  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    A database server may (and almost always does) have multiple databases 'within' it. These databases are stored internally, in files on the server.

    When you 'connect to a database,' you are actually connecting to a database server, which processes your commands, ensuring that they are processed against the correct 'set' of database objects (and the underlying associated data files.)

    Ref the Getting Started, Architecture Fundamentals page in the documentation.

    Another brief description is here.

    Also, reference the first few pages of Tom Lane's 2000 presentation A Tour of PostgreSQL Internals.

    Unlike a PC file based database app like MS Access, there are hundreds to thousands of internal database files that you should not access directly; the database server keeps track of what is stored where, and how. You use a 'front-end' client, which connects to the server 'back end,' to view and/or manipulate the data. The server controls who access what, and the manner in which they do so, via a standard interface.
    Last edited by loquin; 06-18-12 at 13:24.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

  3. #3
    Join Date
    Jun 2012
    Thanks, Loquin.

    My question was to see if what I gather is correct, that databases are all at the same level, and a database can not contain within itself a database, at least as far as Postgres is concerned.

    That's because I read this statement from PgForms after I installed it:
    you can install one of these example databases in the currently opened database.

    I think that statement is not correct, but maybe there is something I am missing?

    Thanks again.

  4. #4
    Join Date
    Nov 2003
    Provided Answers: 23
    I think your confusion comes from the multiple meanings that people put into the word "database".

    Very often this is simply used to denote a "collection of information" or the entirety of tables for a specific business. Some people use the term "database" to refer to the software that is running (e.g. to denote a specific "database product" such as PostgreSQL, Oracle or DB2), some people call a bunch of text files "a database" which - after all - is correct as well. It simply isn't a relational database.

    Sometimes the database server process is simply referred to as "database", sometimes the whole server hardware is referred to as "the database".

    So in the quote "you can install one of these example databases in the currently opened database." the first "database" refers to the collection of tables and their content (=rows), the second term refers to the technical concept inside a Postgres server
    Last edited by shammat; 06-18-12 at 15:12.

  5. #5
    Join Date
    Jun 2012
    Thanks for claryfing, Shammat.

    I think that documentations should be as correct as possible, specially for newbies like me.

    As far as Postgres Forms, I found it not to be what I hoped it would, so I don't think I'll use it for the time being.

    I find I can do most things with Lazarus, so far.

    Since these things are vast, I'm sure I'll be here hoping for some more help.

    I am quite clear on the architecture of the basic things now, as to what is what, and how those elephants combine.

    The details will bring their own devils, though, I'm sure.

Posting Permissions

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