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


Groups > comp.lang.java.programmer > #38458

Re: Is there a SQL hashmap?

From Martin Gregorie <martin@mydomain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Is there a SQL hashmap?
Date 2018-06-29 13:43 +0000
Organization albasani.net
Message-ID <ph5d1k$md4$2@news.albasani.net> (permalink)
References (9 earlier) <ph3nqc$12e1$2@gioia.aioe.org> <ph3qfc$67p$2@news.albasani.net> <76690c5f-8ceb-46ce-ba14-9d14d3c4608d@googlegroups.com> <ph58oq$md4$1@news.albasani.net> <1efce28f-d38a-4a42-b5c8-c69a0753fdd3@googlegroups.com>

Show all headers | View raw


On Fri, 29 Jun 2018 06:11:02 -0700, Eric Douglas wrote:

> On Friday, June 29, 2018 at 8:30:27 AM UTC-4, Martin Gregorie wrote:
>> Yes, I'm not sure why I said 'parallel'. What I meant was that, if I
>> understood you correctly, you could do what you need by building a new
>> table and populating it by joining existing tables. All I was
>> suggesting that, rather than creating the new table, you use a view
>> instead. For your purpose it can be treated as another table. However,
>> it does not carry any maintenance overheads because its best thought of
>> as being a virtual table that only exists when its queried.
>> 
>> 
> as in you can create a 'table' in a database as a view to a table in a
> different database?

As in 'Add a view to the existing database'. I've just checked a Mogwai-
generated ERD for my PostgreSQL-based mail archive database: this uses a 
view to determine whether I've sent mail to an the sender of a newly 
received e-mail - if I have the sender gets whitelisted. The ERD shows 
the view as unconnected to the tables it accesses, so its effectively a 
recipe for building a table with a selective join that can be queried as 
though its another table. IOW there are two ways of understanding what a 
view is (choose the one you prefer):

- the view  describes a virtual table with no physical existence
  that is only populated with data when its queried.

- the view is a predefined chunk of SQL that gets incorporated in any
  query that accesses it. The combined query uses the tables listed in
  the view after combining the view's 'where' clause with the
  'where' clause in the query accessing it.


-- 
Martin    | martin at
Gregorie  | gregorie dot org

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-26 09:03 -0700
  Re: Is there a SQL hashmap? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-26 12:23 -0400
  Re: Is there a SQL hashmap? Robert Klemme <shortcutter@googlemail.com> - 2018-06-26 22:36 +0200
    Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-26 14:02 -0700
      Re: Is there a SQL hashmap? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-27 20:22 -0400
        Re: Is there a SQL hashmap? firstsql@gmail.com - 2018-06-27 20:53 -0700
        Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-28 05:03 -0700
          Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-28 06:49 -0700
            Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-28 07:38 -0700
              Re: Is there a SQL hashmap? Andreas Leitgeb <avl@logic.at> - 2018-06-28 15:52 +0000
                Re: Is there a SQL hashmap? Martin Gregorie <martin@mydomain.invalid> - 2018-06-28 19:47 +0000
                Re: Is there a SQL hashmap? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-28 18:34 -0400
                Re: Is there a SQL hashmap? Martin Gregorie <martin@mydomain.invalid> - 2018-06-28 23:20 +0000
                Re: Is there a SQL hashmap? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-28 20:07 -0400
                Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-29 05:11 -0700
                Re: Is there a SQL hashmap? Martin Gregorie <martin@mydomain.invalid> - 2018-06-29 12:30 +0000
                Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-06-29 06:11 -0700
                Re: Is there a SQL hashmap? Martin Gregorie <martin@mydomain.invalid> - 2018-06-29 13:43 +0000
                Re: Is there a SQL hashmap? Robert Klemme <shortcutter@googlemail.com> - 2018-06-29 23:20 +0200
                Re: Is there a SQL hashmap? Martin Gregorie <martin@mydomain.invalid> - 2018-06-29 22:34 +0000
                Re: Is there a SQL hashmap? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-30 16:36 -0400
                Re: Is there a SQL hashmap? Martin Gregorie <martin@mydomain.invalid> - 2018-06-30 23:00 +0000
              Re: Is there a SQL hashmap? Robert Klemme <shortcutter@googlemail.com> - 2018-06-29 23:34 +0200
            Re: Is there a SQL hashmap? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-30 17:51 -0400
              Re: Is there a SQL hashmap? Eric Douglas <e.d.programmer@gmail.com> - 2018-07-03 07:13 -0700

csiph-web