471,108 Members | 1,301 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

Groff and Weinberg SQL Complete Reference - Sample database?



Not really a PostgreSQL question, but maybe somebody here knows the
answer!
I recently purchased Groff and Weinberg's The Complete Reference SQL,
and a fine meaty tome it is too!
However, I find to my absolute *_horror_* that there doesn't appear to
be an electronic version of the sample database - it's all down on paper
in Appendix A, but no way of downloading it electronically.

On the CD, there are files such as office.dat where the data is in the
format

22|Denver|Western|108|300000.00|186042.00
11|New York|Eastern|106|575000.00|692637.00

i.e. pipe delimited.
Why *_OH WHY_* is it not in bog standard DML format (i.e. INSERT INTO
Table_Name VALUES(..., ..., ...)?

I'm going to have to arse about with commas, INSERT INTO &c., which runs
the risk of typos, plus the table definitions are not in DDL format, in
fact they're not there at all! Why not?
Has anyone gone to the trouble of putting this data into any sort of
standard SQL (DDL + DML) format?
TIA.
Paul...
--

plinehan x__AT__x yahoo x__DOT__x com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro

Please do not top-post.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #1
4 3016
On Monday 22 December 2003 07:47, Paul Ganainm wrote:
Not really a PostgreSQL question, but maybe somebody here knows the
answer!
I recently purchased Groff and Weinberg's The Complete Reference SQL,
and a fine meaty tome it is too!
However, I find to my absolute *_horror_* that there doesn't appear to
be an electronic version of the sample database - it's all down on paper
in Appendix A, but no way of downloading it electronically.

On the CD, there are files such as office.dat where the data is in the
format

22|Denver|Western|108|300000.00|186042.00
11|New York|Eastern|106|575000.00|692637.00

i.e. pipe delimited.


Read up on \copy and COPY - you can tell PG to use whatever delimiter you
want. Should make it straightforward then.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2
Paul,

once you get through the book perhaps you could submit a book review to
the techdocs website, along with a pg_dump of the sample database.

Robert Treat

On Mon, 2003-12-22 at 05:50, Richard Huxton wrote:
On Monday 22 December 2003 07:47, Paul Ganainm wrote:
Not really a PostgreSQL question, but maybe somebody here knows the
answer!
I recently purchased Groff and Weinberg's The Complete Reference SQL,
and a fine meaty tome it is too!
However, I find to my absolute *_horror_* that there doesn't appear to
be an electronic version of the sample database - it's all down on paper
in Appendix A, but no way of downloading it electronically.

On the CD, there are files such as office.dat where the data is in the
format

22|Denver|Western|108|300000.00|186042.00
11|New York|Eastern|106|575000.00|692637.00

i.e. pipe delimited.


Read up on \copy and COPY - you can tell PG to use whatever delimiter you
want. Should make it straightforward then.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3
Paul,

once you get through the book perhaps you could submit a book review to
the techdocs website, along with a pg_dump of the sample database.

Robert Treat

On Mon, 2003-12-22 at 05:50, Richard Huxton wrote:
On Monday 22 December 2003 07:47, Paul Ganainm wrote:
Not really a PostgreSQL question, but maybe somebody here knows the
answer!
I recently purchased Groff and Weinberg's The Complete Reference SQL,
and a fine meaty tome it is too!
However, I find to my absolute *_horror_* that there doesn't appear to
be an electronic version of the sample database - it's all down on paper
in Appendix A, but no way of downloading it electronically.

On the CD, there are files such as office.dat where the data is in the
format

22|Denver|Western|108|300000.00|186042.00
11|New York|Eastern|106|575000.00|692637.00

i.e. pipe delimited.


Read up on \copy and COPY - you can tell PG to use whatever delimiter you
want. Should make it straightforward then.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #4

xz****@users.sourceforge.net says...
once you get through the book perhaps you could submit a book review to
the techdocs website, along with a pg_dump of the sample database.

I'll take a look at this after Christmas + New Year.
Paul...

Robert Treat

--
plinehan y_a_h_o_o and d_o_t com
C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro
Please do not top-post.

"XML avoids the fundamental question of what we should do,
by focusing entirely on how we should do it."

quote from http://www.metatorial.com
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ale | last post: by
2 posts views Thread by Zippy | last post: by
1 post views Thread by Dave | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.