Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81483
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.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!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'parameters': 0.04; 'schema': 0.05; 'subject:Python': 0.06; '"""': 0.07; 'column': 0.07; 'postgresql': 0.07; 'table.': 0.07; 'clause': 0.09; 'objects,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'statements': 0.09; 'subject:2.7': 0.09; 'stored': 0.12; 'wrote': 0.14; 'accesses': 0.16; 'mode,': 0.16; 'operators.': 0.16; 'permissions.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'restricting': 0.16; 'skip:n 50': 0.16; 'specifying': 0.16; 'tables,': 0.16; 'there...': 0.16; 'types,': 0.16; 'wherein': 0.16; 'flexibility': 0.16; 'prevent': 0.16; 'so.': 0.16; 'basically': 0.19; 'items.': 0.19; 'things.': 0.19; 'unlike': 0.19; 'select': 0.22; 'handles': 0.22; 'rules': 0.22; 'separate': 0.22; 'of.': 0.24; 'connected': 0.24; 'mon,': 0.24; 'server.': 0.24; 'define': 0.26; 'possibly': 0.26; 'tables': 0.26; 'supported': 0.26; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'database,': 0.30; 'restrict': 0.30; 'specified': 0.30; 'statement': 0.30; 'gives': 0.31; 'url:wiki': 0.31; "company's": 0.31; 'controlled': 0.31; 'url:wikipedia': 0.31; 'another': 0.32; 'table': 0.34; 'common': 0.35; 'objects': 0.35; 'requirement': 0.35; 'but': 0.35; 'there': 0.35; '+0200,': 0.36; 'data,': 0.36; 'impression': 0.36; 'possible': 0.36; 'url:org': 0.36; 'example,': 0.37; 'turn': 0.37; 'two': 0.37; 'list': 0.37; 'remote': 0.38; 'system,': 0.38; 'server': 0.38; 'nov': 0.38; 'others.': 0.38; 'to:addr:python-list': 0.38; 'ability': 0.39; 'to:addr:python.org': 0.39; 'system.': 0.39; 'either': 0.39; 'received:org': 0.40; 'called': 0.40; 'even': 0.60; 'company': 0.60; 'consists': 0.60; 'logged': 0.60; 'companies': 0.62; 'address': 0.63; 'name': 0.63; 'field': 0.63; 'more': 0.64; 'different': 0.65; 'account': 0.65; 'within': 0.65; 'between': 0.67; 'advantages': 0.68; 'companies,': 0.68; 'frank': 0.68; 'incorporate': 0.68; 'containing': 0.69; 'to,': 0.72; 'address,': 0.75; 'or...': 0.84; 'pre-packaged': 0.84; 'relate': 0.84; 'relating': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | "Frank Millman" <frank@chagford.com> |
| Subject | Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert |
| Date | Tue, 25 Nov 2014 07:31:01 +0200 |
| 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> |
| X-Gmane-NNTP-Posting-Host | 197.86.223.253 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.3790.4657 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.3790.4913 |
| X-RFC2646 | Format=Flowed; Original |
| 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.16263.1416893481.18130.python-list@python.org> (permalink) |
| Lines | 76 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1416893481 news.xs4all.nl 2909 [2001:888:2000:d::a6]:49683 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Body-CRC | 2670845291 |
| X-Received-Bytes | 7674 |
| Xref | csiph.com comp.lang.python:81483 |
Show key headers only | View raw
"Dennis Lee Bieber" <wlfraed@ix.netcom.com> wrote in message
news:lrr67al6ppa852agu9rq2dstqtue17iiem@4ax.com...
> On Mon, 24 Nov 2014 10:05:11 +0200, "Frank Millman" <frank@chagford.com>
> declaimed the following:
>
>>
>>Originally I supported two databases - PostgreSQL and Sql Server. They
>>both
>>have a concept called 'schemas', which handles my requirement elegantly -
>>each company's data is stored in its own schema.
>>
>
> 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.
When using sqlite3 in interactive mode, you can enter '.tables' to list all
tables in the database, and you can enter '.schema {table_name}' to view the
original DDL statement used to create the table.
>From the PostgreSQL docs -
"""
A database contains one or more named schemas, which in turn contain tables.
Schemas also contain other kinds of named objects, including data types,
functions, and operators. The same object name can be used in different
schemas without conflict; for example, both schema1 and myschema can contain
tables named mytable. Unlike databases, schemas are not rigidly separated: a
user can access objects in any of the schemas in the database he is
connected to, if he has privileges to do so.
"""
>
> For a client-server database system, with ability to restrict access
> based upon user accounts/host address, there are a number of ways to
> address the separation.
>
> Either each user account (company) gets its own database in the server
> -- possibly using the same pre-packaged DML to define the tables/etc --
> and
> one uses the access control system to prevent an account from even knowing
> there are other databases out there... Or... there is one set of tables
> (one database) containing data from all the companies -- wherein each
> table
> has a field identifying the company, and ALL accesses to the data is via
> views that incorporate a select clause restricting the data to the current
> logged in company.
>
I find that schemas gives me the advantages of both without the
disadvantages.
The disadvantage of using separate databases is that I want the flexibility
to allow one company to access data from another company, under controlled
conditions, specified by various parameters and permissions. It might be
possible to accesss a remote database with some systems, I don't know, but
schemas make it easy.
The disadvantage of using a single database, with a column specifying the
company, is that I want the flexibility to manage different companies, with
different data requirements, within the same system. A common database would
result in a mish-mash of different tables, some of which only relate to one
company or group of companies, and other tables relate to others. Using
schemas, I create one schema per company, which contains only the data
relating to that company.
Frank
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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