Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #681

Re: joining

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
From Lothar Kimmeringer <news200709@kimmeringer.de>
Newsgroups comp.lang.java.databases
Subject Re: joining
Date Fri, 8 Aug 2014 15:54:11 +0200
Organization Organization?! Only chaos here!
Lines 37
Message-ID <q565h9mt8b3f$.dlg@kimmeringer.de> (permalink)
References <jve9u9d3vao1hvitvdmslkeec7sn7duv4o@4ax.com>
Reply-To news@kimmeringer.de
NNTP-Posting-Host mnch-5d86b30b.pool.mediaways.net
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding 7bit
X-Trace online.de 1407506050 28401 93.134.179.11 (8 Aug 2014 13:54:10 GMT)
X-Complaints-To abuse@einsundeins.com
NNTP-Posting-Date Fri, 8 Aug 2014 13:54:10 +0000 (UTC)
User-Agent 40tude_Dialog/2.0.15.1de
Xref csiph.com comp.lang.java.databases:681

Show key headers only | View raw


Roedy Green wrote:

> I suspect it might be faster/better to get SQL to join the records for
> me and present me with one unified record.

If you mean resultset when speaking of record, it is.

> Is that a better approach and if so, what does a query look like given
> each record has a unique integer key?

Not sure, where the java-related question is, but the statement
would look like this:

Table authors:

id int
name varchar
...

Table quotes:
id int
id_author int
quote text
...


select a.name, b.quote from authors a, quotes b
where a.id = b.id_author


Cheers, Lothar
-- 
Lothar Kimmeringer                E-Mail: spamfang@kimmeringer.de
               PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                 questions!

Back to comp.lang.java.databases | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

joining Roedy Green <see_website@mindprod.com.invalid> - 2014-08-08 05:04 -0700
  Re: joining Lothar Kimmeringer <news200709@kimmeringer.de> - 2014-08-08 15:54 +0200
    Re: joining Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2014-08-08 11:55 -0500
      Re: joining Roedy Green <see_website@mindprod.com.invalid> - 2014-08-08 19:19 -0700
        Re: joining Silvio <silvio@internet.com> - 2014-08-09 07:06 +0200
          Re: joining Roedy Green <see_website@mindprod.com.invalid> - 2014-08-09 02:45 -0700
            Re: joining Silvio <silvio@internet.com> - 2014-08-09 12:16 +0200
              Re: joining Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2014-08-11 12:23 -0500

csiph-web