minimum postgres installation - Mailing list pgsql-general
From | Stephen Ince |
---|---|
Subject | minimum postgres installation |
Date | |
Msg-id | 057601c7d0c2$2849b360$8700a8c0@desktop2 Whole thread Raw |
In response to | How best to represent relationships in a database generically? (Lincoln Yeoh <lyeoh@pop.jaring.my>) |
List | pgsql-general |
Hi. I am new to postgres. I would like some advise on how to get a minimum postgres installation. I want to use postgres embedded in application on windows. I have done the following. C:\Program Files\PostgreSQL>msiexec /i postgresql-8.2-int.msi /qr INTERNALLAUNCH=1 ADDLOCAL=server,psql SERVICEDOMAIN="%COMPUTERNAME%" SERVICEPASSWORD="postgres" SUPERPASSWORD="postgres" BASEDIR="c:\postgres". This gave me some what of a smaller footprint. I am looking to reduce it even further. I am at 75m sofar. I am assume I need the following. <postgres>\data <postgres>\bin\postgres <postgres>\bin\pg_ctl <postgres>bin\*.dll Questions. Do I need the other exes in <postgres>\bin? Do I need the <postgres>\lib directory? Do I need the <postgres>\share directory? What other files can I delete? Steve ----- Original Message ----- From: "Edward Macnaghten" <eddy@edlsystems.com> To: <pgsql-general@postgresql.org> Cc: "Lincoln Yeoh" <lyeoh@pop.jaring.my> Sent: Friday, July 27, 2007 2:50 PM Subject: Re: [GENERAL] How best to represent relationships in a database generically? > Lincoln Yeoh wrote: >> Hi, importantly do searches and other processing by those relationships. >> >> So, what would be the best way to store them so that a search for the >> relationship like "grass is to cow", will also turn up cow is to tiger, >> and goat is to tiger, and fish is to penguin (and penguin is to bigger >> fish ;) ), and electricity is to computer. And a search for cow is to >> goat, could turn up tiger is to lion, and goat is to cow. >> >> Is the only way to store all the links explicitly? e.g. have a huge link >> table storing stuff like obj => cow, subj => grass, type => consumes, >> probability=90% ( => means points/links to). Or even just have one table >> (links are objects too). > > Hi > > This is a generic database design problem rather than a Postgres or SQL > one, but here goes > > Excuse ASCII art.. > > What you really have is a multi - multi relationship, such as.... > > > A <---> B > > > Where A is a table containing grass, cow, fish > and B is the table containing cow, tiger and penguin > > I know, A and B are the same table, so the multi - relationship is in fact > > A <----> A > > As you cannot have a multi-multi relationship in a RDBMS, you need a > "link" table... > > A ---> C <----B > > or more precisely > > A ---> C < --- A > > This would be represented as tables as something like > > create table thingy ( > thingy_key varchar(12) primary key, > thingy_desc varchar(30) > .... > ); > or whatever > > and... > > create table munchies ( > eater varchar(12) not null, > dinner varchar(12) not null > probablility_pc number(4,2) > constraing pkey_munchies primary key(eater, dinner) ); > > or whatever, where "eater" and "dinner" are foreign keys for "thingy_key" > > The munchies table can get big, but do not worry about that. It is small > and RDBMS (especially Postgres) should handle it well even on a smallish > machine. > > Hope that makes sense > > Eddy > > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match >
pgsql-general by date: