[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting PSPP compiled version with PostgreSQL support
From: |
John Darrington |
Subject: |
Re: Getting PSPP compiled version with PostgreSQL support |
Date: |
Sat, 19 Mar 2016 21:17:52 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, Mar 19, 2016 at 01:48:13PM -0500, Alan Mead wrote:
I'd be curious to hear how Philip is using this feature because if you
can get data from a database using a single select statement, then you
can also redirect those data into a TAB delimited file. So, this just
saves you a step and I guess it would be mostly useful when you have to
do it frequently.
It saves a step. It also saves the cost of an intermediate copy of the data.
Relational databases like postgress are designed to store billions of data.
Consider the case where you might want to do a factor analysis on a dataset
of 10^9 cases, and you want to see if there is communality among the (say)
500 data.
If you had an enormous disk, you could save the data in a TAB delimited file,
and read it in again. Or you could simply run:
GET DATA /TYPE=PSQL /CONNECT=..... /SQL=....
FACTOR VARIABLES=ALL.
But most of the databases I work with cannot (that I
know of) generate the kind of data I want using a single select. The
typical database I use stores respondent meta data in a table like
"respondents" and item meta data in a table like "items" and responses
in a table like "responses". (Without any promise that all respondents
have answered the same items.) So, I have to write a small script in
some higher-level language to marshal these data and output the
rectangular (rows and columns) data that PSPP expects as a TAB-delimited
file.
You could do that with a single select statement (albeit a complicated one).
You would need to use an inner join and an additional where clause.
J'
--
Avoid eavesdropping. Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature