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


Groups > comp.lang.python > #81485

Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'represents': 0.05; 'schema': 0.05; 'subject:Python': 0.06; 'executable': 0.09; 'spec': 0.09; 'statements': 0.09; 'subject:2.7': 0.09; 'cc:addr :python-list': 0.11; 'wrote': 0.14; 'different;': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'postgresql)': 0.16; 'skip:n 50': 0.16; 'statements;': 0.16; 'wrote:': 0.18; 'basically': 0.19; 'items.': 0.19; 'things.': 0.19; 'rules': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'logical': 0.24; 'of.': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'tables': 0.26; 'header:In-Reply-To:1': 0.27; 'related': 0.29; "doesn't": 0.30; 'database,': 0.30; 'sets': 0.30; 'message- id:@mail.gmail.com': 0.30; 'gives': 0.31; 'url:wiki': 0.31; 'usually': 0.31; '25,': 0.31; 'url:wikipedia': 0.31; 'another': 0.32; 'entirely': 0.33; 'sense': 0.34; 'received:google.com': 0.35; 'data,': 0.36; 'impression': 0.36; 'done': 0.36; 'similar': 0.36; 'url:org': 0.36; 'so,': 0.37; 'two': 0.37; 'represent': 0.38; 'nov': 0.38; 'pm,': 0.38; 'structure': 0.39; 'called': 0.40; 'consists': 0.60; 'real': 0.63; 'different': 0.65; 'between': 0.67; 'advantages': 0.68; 'frank': 0.68; 'therefore': 0.72; 'lays': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=uxe7dlatgFsjDriEJvQiFoDclGfGHXkUmOS6NbsyLBE=; b=R4WPcPsQnQp5DsMJQCAMu1AJAZLg4CjaAk0eEc6QED5LLYuhK2c7HUTXMt4Rj2SeWZ bnFT7Tyux2K9yp6p+hdXpDW7iP0cw+95waJdqlmM7TTwxeFnUmYD22MY9hFS9I3O3p0K X0qzp+eVl/j/zaq0TDngt6eLUnZ8DdhVD7xaDlKsEtdPuRRoc95N2qRmpu/rAU6+xtuB t/bfPBuu0c/aEHcBeUuxOJFArHxotFOqmyZdcN8z/nbg45auAk+b2YIMnluCPnPcm7rZ SXLVpZisUR0buydstoesAenp0m8KT1IIPaqaz25q4PXu+0ogC6/SyG4GcKt1pDuJg2OC xyGA==
MIME-Version 1.0
X-Received by 10.107.136.92 with SMTP id k89mr22331204iod.43.1416897630097; Mon, 24 Nov 2014 22:40:30 -0800 (PST)
In-Reply-To <m5146l$akn$1@ger.gmane.org>
References <ca987fb8-157d-4612-bafa-5da2da2920e0@googlegroups.com> <mailman.16153.1416709340.18130.python-list@python.org> <5d474a87-e2a5-43d3-b07c-4a1194880b4d@googlegroups.com> <54716987.7040301@gmail.com> <mailman.16159.1416721303.18130.python-list@python.org> <ea4e3af8-f173-4706-ba4e-4eca9d701e40@googlegroups.com> <CAPTjJmp4Y5zowWn5yFtJutKO4H5jVtqLaNtWqEpA6B35xNdsNA@mail.gmail.com> <m4s5er$sg1$1@ger.gmane.org> <8d747a5biq4rc559tvgju088508bp0o2gv@4ax.com> <m4uork$6h5$1@ger.gmane.org> <lrr67al6ppa852agu9rq2dstqtue17iiem@4ax.com> <m5146l$akn$1@ger.gmane.org>
Date Tue, 25 Nov 2014 17:40:29 +1100
Subject Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16264.1416897632.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416897632 news.xs4all.nl 2850 [2001:888:2000:d::a6]:38015
X-Complaints-To abuse@xs4all.nl
X-Received-Body-CRC 1784256509
X-Received-Bytes 5788
Xref csiph.com comp.lang.python:81485

Show key headers only | View raw


On Tue, Nov 25, 2014 at 4:31 PM, Frank Millman <frank@chagford.com> wrote:
>
> "Dennis Lee Bieber" <wlfraed@ix.netcom.com> wrote in message
> news:lrr67al6ppa852agu9rq2dstqtue17iiem@4ax.com...
>> We must have a different impression of what a "schema" consists of. As
>> I learned it, the "schema" basically came down to the statements defining
>> the form of the data, the rules (triggers) on it, and the relationships
>> between data items. http://en.wikipedia.org/wiki/Database_schema
>>
>
> I also find it confusing. The same word is used by different RDBMS's to mean
> different things.

They're not entirely different; in both cases, your database schema
is, broadly speaking, the structure of your tables and the
relationships between them. Consider the "schema" to be the design
document that lays out your data. Then you have two derivative forms
of it: one is what's usually called DDL, and is executable statements;
the other derives from the concept that one schema represents one
logical dataset, so another schema would represent a different logical
dataset, so you have named schemas.

Since SQLite3 doesn't have the concept of named schemas, it uses
"schema" solely in the sense of DDL. The SQL spec (and therefore
PostgreSQL) uses it in both senses.

> I find that schemas gives me the advantages of both without the
> disadvantages.

Yep. So, use a real database, with better compliance to the spec :)
What you have is similar to what I've done in a number of different
database systems; schemas to separate related sets of tables into
namespaces, and other schemas to store global/shared data, all inside
a single database.

ChrisA

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


Thread

SQLite3 in Python 2.7 Rejecting Foreign Key Insert llanitedave <llanitedave@birdandflower.com> - 2014-11-22 18:11 -0800
  Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-23 13:22 +1100
    Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert llanitedave <llanitedave@birdandflower.com> - 2014-11-22 19:54 -0800
      Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Michael Torrie <torriem@gmail.com> - 2014-11-22 21:58 -0700
      Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-23 16:41 +1100
        Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert llanitedave <llanitedave@birdandflower.com> - 2014-11-22 22:08 -0800
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-23 17:32 +1100
            Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert llanitedave <llanitedave@birdandflower.com> - 2014-11-22 22:46 -0800
            Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Christian Gollwitzer <auriocus@gmx.de> - 2014-11-23 10:55 +0100
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert "Frank Millman" <frank@chagford.com> - 2014-11-23 10:21 +0200
            Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert llanitedave <llanitedave@birdandflower.com> - 2014-11-23 17:29 -0800
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-23 19:31 +1100
            Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-11-23 11:40 +0200
              Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-23 20:53 +1100
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-11-23 13:01 -0500
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert "Frank Millman" <frank@chagford.com> - 2014-11-24 10:05 +0200
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-11-24 13:44 -0500
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-25 10:17 +1100
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert "Frank Millman" <frank@chagford.com> - 2014-11-25 07:31 +0200
          Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-25 17:40 +1100
  Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-11-23 11:58 -0500
  Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert llanitedave <llanitedave@birdandflower.com> - 2014-11-23 18:22 -0800
    Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert Chris Angelico <rosuav@gmail.com> - 2014-11-24 15:49 +1100

csiph-web