Thread: Re: Databases for Linux

Re: Databases for Linux

From
"Robert B. Easter"
Date:
A newbie needs some help!  You can subscribe to the pgsql mail lists at
http://www.postgresql.org/ and get lots of help.

On Friday 08 December 2000 13:40, Razvan Sandu wrote:
> Hello!
>
> Would you please help me find some quick answers?
>
> I am in position to have to write, in a relatively short time, a database
> application.I have some previous experience in Microsoft Access, but I'm
> trying to
> eliminate Microsoft products from my LAN (at least in key points). So I try
> to write my small application (for my office) directly in some format that
> can be exploited under Linux.
>
> 1. Can someone recommend me an apropriate DBMS to use ? I have a RedHat
> Linux 7.0 PC acting as server and *no more software than that provided in
> the distro*. I tried Postgres, but it seems pretty cryptic.
>
> 2. Is there some free downloadable manuals for this DBMS ? - since I have
> to learn it from scratch ... In Postgres, I wasn't able to locate enough
> tutorial-like documentation to learn how to build a database and do
> something useful with it.
>
> 3. Is there any integrated system to create output listings and
> personalised reports, or I have to install and use some separate client
> software?
>
>  4. It is possible to use Microsoft Acces as a client/frontend for my
> database system? To have the data "warehouse" on the Linux server and
> create reports, queries and so on using Access, from Windows workstations
> ... Where can I find docs for that?
>
> Thanks a lot! A prompt response will be highly appreciated.
>
> Razvan
>  ---
> Dipl. Eng. Razvan SANDU <rsandu@go.ro>
> Network Administrator at I.R. COLOURS PROD S.R.L. - Bucharest, Romania
> Tel. +40 (94) 629867   ICQ# 46380005  WWW: http://www.rsandu.go.ro
> Powered by RedHat Linux release 7.0 (Guinness)
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.linux-learn.org/faqs

--
-------- Robert B. Easter  reaster@comptechnews.com ---------
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------

PL/pgSQL compatibility?

From
Soma Interesting
Date:
I'm looking to join the camp of people who believe data logic should be
handled within the database(postgreSQL) and not the client code(php).   I
realize there are pros and cons to this approach but its something I want
to explore and be able to take advantage of where applicable. However most
of the elements involved in doing this I know little about, ie: stored
procedures, triggers, referential integrity, constraints, etc.

One con, I understand, would be ability to migrate to another DBMS. If I
were to use PL/pgSQL for my stored procedures - is this language a standard
across DBMS? I'm not expecting this since most DBMS can't seem to follow
SQL standards with simple things like dates or wild-cards.

  .      .       .       .

Another, more specific question: I'd like to know how to make two tables in
PostgreSQL with a relationship between them so that when the parent row is
removed from one table, its children in the other table will also be
removed by PostgreSQL. I don't even know how to specify the foreign key. :)
Conceptually I understand (I believe). I'm just no sure how to define this
within PostgreSQL

I've done some searching through the on-line postgreSQL manual - in hopes
to find a chapter in it akin to "referential integrity", but no such luck.
Its possible I'm confusing the terminology.

So, if someone can point me towards some additional information on this,
that'd be appreciated.

.       .       .       .

Furthermore, my need for information on this topic will obviously goes
beyond this one issue - can someone recommend either an on-line resource to
advanced data modelling and / or database design or books worth purchasing
on the topic.


Summary of questions:

1) How cross database is PL/pgSQL?
2) How to define foreign -> primary key relationship where foreign key
records are deleted
3) recommended readings on any of the above.



-          -          -          -          -          -          -
  -          -          -          -          -
WARNING: Some experts believe that use of any keyboard may cause serious
injury.
Consult Users Guide.
                                                                                                   dfunct@telus.net


Re: PL/pgSQL compatibility?

From
"Joel Burton"
Date:
On 8 Dec 2000, at 13:35, Soma Interesting wrote:

> One con, I understand, would be ability to migrate to another DBMS. If
> I were to use PL/pgSQL for my stored procedures - is this language a
> standard across DBMS? I'm not expecting this since most DBMS can't
> seem to follow SQL standards with simple things like dates or
> wild-cards.

Oracle's PLSQL is very similar; Interbase's procedural language is
similar, but requires some rewriting. MS Access doesn't have
procedural languages (you can use VBA in forms, reports, but not
table operations.) MySQL does not have at all.

Or, of course, you could use plperl or pltcl for your PG procedural
stuff; I doubt other databases offer these as PLs, but, the code
(w/modifications) could live outside the server in some cases.

> Another, more specific question: I'd like to know how to make two
> tables in PostgreSQL with a relationship between them so that when the
> parent row is removed from one table, its children in the other table
> will also be removed by PostgreSQL. I don't even know how to specify
> the foreign key. :) Conceptually I understand (I believe). I'm just no
> sure how to define this within PostgreSQL

CREATE TABLE parent (id INT PRIMARY KEY);
CREATE TABLE child (id REFERENCES parent ON DELETE CASCADE);

> I've done some searching through the on-line postgreSQL manual -
 in
> hopes to find a chapter in it akin to "referential integrity", but no
> such luck. Its possible I'm confusing the terminology.

I recently wrote a (draft) tutorial on referential integrity. If you go
to the PostgreSQL website & dig into the archives of the pgsql-doc
discussion list, you'll see it there from about 5 days ago.

--
Joel Burton, Director of Information Systems -*- jburton@scw.org
Support Center of Washington (www.scw.org)