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


Groups > comp.lang.python > #41689

Re: MySQL database schema discovery

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <mail@timgolden.me.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'schema': 0.05; 'column': 0.07; 'pep': 0.09; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'message-id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'roy': 0.16; 'sqlalchemy,': 0.16; 'tjg': 0.16; 'wrote:': 0.17; 'url:dev': 0.17; 'appears': 0.18; 'trying': 0.21; 'discovery': 0.22; 'tables': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'appear': 0.26; 'options': 0.27; "doesn't": 0.28; 'methods.': 0.29; 'probably': 0.29; 'this.': 0.29; "i'm": 0.29; 'could': 0.32; 'received:192.168.100': 0.33; 'to:addr:python-list': 0.33; 'but': 0.36; '(i.e.': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'url:en': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'url:5': 0.61; 'url:0': 0.67; 'from:addr:mail': 0.71; 'smith': 0.71; 'discover': 0.72
Date Fri, 22 Mar 2013 16:09:59 +0000
From Tim Golden <mail@timgolden.me.uk>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
MIME-Version 1.0
To python-list@python.org
Subject Re: MySQL database schema discovery
References <kihv84$i03$1@panix2.panix.com>
In-Reply-To <kihv84$i03$1@panix2.panix.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3611.1363968628.2939.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1363968628 news.xs4all.nl 6845 [2001:888:2000:d::a6]:38500
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41689

Show key headers only | View raw


On 22/03/2013 16:01, Roy Smith wrote:
> What are my options for MySQL schema discovery?  I want to be able to
> find all the tables in a database, and discover the names and types of
> each column (i.e. the standard schema discovery stuff).
> 
> PEP 249 doesn't seem to have any discovery methods.  Nor does MySQLdb
> appear to have any non-standard extentions for this.  I could probably
> do this with SQLAlchemy, but I'm trying to avoid that because it's so
> heavyweight.
> 

MySQL appears to support the standard(ish) INFORMATION_SCHEMA schema:

  http://dev.mysql.com/doc/refman/5.0/en/information-schema.html

TJG

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


Thread

MySQL database schema discovery roy@panix.com (Roy Smith) - 2013-03-22 12:01 -0400
  Re: MySQL database schema discovery Tim Golden <mail@timgolden.me.uk> - 2013-03-22 16:09 +0000

csiph-web