Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.065 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'clause': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'underlying': 0.09; ':-)': 0.13; 'properly': 0.15; "(i'm": 0.16; 'columns': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sqlite3': 0.16; 'subject:request': 0.17; 'thu,': 0.17; 'saying': 0.18; 'feb': 0.19; '+0000': 0.20; 'define': 0.20; 'displayed': 0.22; 'permitted': 0.22; 'player': 0.23; 'tables': 0.23; 'separate': 0.27; 'updating': 0.27; '(as': 0.27; 'restrict': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'actual': 0.28; 'run': 0.28; 'privileges': 0.29; 'table,': 0.29; 'connection': 0.30; '(and': 0.32; 'file': 0.32; 'controls': 0.33; 'defining': 0.33; 'like:': 0.33; 'url:home': 0.33; 'to:addr :python-list': 0.33; 'operations': 0.33; 'so,': 0.35; 'table': 0.35; "won't": 0.35; 'received:org': 0.36; 'charset:us-ascii': 0.36; 'level': 0.37; 'drop': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'delete': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'red': 0.60; 'easy': 0.60; 'life,': 0.62; 'skip:n 10': 0.63; 'more': 0.63; 'show': 0.63; 'players': 0.65; 'cards': 0.69; 'user,': 0.69; 'lose': 0.71; 'goals': 0.78; '2013': 0.84; 'banned': 0.84; 'cards,': 0.84; 'complex,': 0.84; 'game,': 0.84; 'played': 0.84; 'season': 0.84; 'yellow': 0.84; 'dennis': 0.91; 'trainers': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Improve reduce functions of SQLite3 request Date: Fri, 08 Feb 2013 12:17:15 -0500 Organization: > Bestiaria Support Staff < References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-109-163.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360343850 news.xs4all.nl 6892 [2001:888:2000:d::a6]:55959 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38467 On Thu, 7 Feb 2013 22:54:03 +0000 (UTC), Steffen Mutter declaimed the following in gmane.comp.python.general: > > I prefer a table, because it's easy to drop or backup whenever I want > :-) > Well... backing up the entire database is simple in SQLite3 -- just make a copy of the file And operations like: delete from where season = "20122013"; doesn't seem that difficult. If you use separate tables you make it more difficult to generate the SQL (as you have to create the SQL with the season specific table name, instead of just using a "where ...." clause to restrict data), and lose the potential to produce reports covering multiple seasons. > All this data shall be displayed according to the status the user has. > > Complex, hm :-) ? > > So, what would be nice is to diplay the data for the game, when you > klick on the game-number. If you klick on a players name, its data would > be nice to show: Games played in the actual seasion games played in > life, goals scored , yellow cards, 2min punishmends and red cards and > persons banned for lifetime won't show up at all :-) > BUT: only for those ersons who are allowed to see it: trainers > responsible for the team > the player > the other players in the team > Have you considered defining "views" and "triggers" -- based upon the user privileges you run queries using views that only expose the permitted data (and use triggers to permit properly updating the underlying tables when edited). Fuller DBMS would allow you to define access controls on individual columns -- though it would mean you couldn't made the main database connection until you know the access level of the user, as you'd connect using a name/password specific to the level of the user (I'm not saying each user has a database name/password, though that is an alternative -- it just means you'd have to do a lot of database administration each time a user is created). -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/