Free chapter about Python and databases (MySQL and SQLite)

Discussion in 'Python' started by Sebastian Bassi, May 28, 2010.

  1. Hello, I want to announce that the publisher of "Python for
    Bioinformatis" (CRC Press) allowed me to publish a chapter from my
    book.
    I decided to publish the chapter about "Python and databases". I think
    it may be useful for somebody.
    The official announcement and download link is here:
    http://py4bio.com/2010/05/28/python_databases_mysql_sqlite/
    For more information about the book: www.tinyurl.com/biopython
    Best,
    SB.


    --
    Sebastián Bassi. Lic. en Biotecnologia.
    Curso de Python en un día: http://bit.ly/cursopython

    Non standard disclaimer: READ CAREFULLY. By reading this email,
    you agree, on behalf of your employer, to release me from all
    obligations and waivers arising from any and all NON-NEGOTIATED
    agreements, licenses, terms-of-service, shrinkwrap, clickwrap,
    browsewrap, confidentiality, non-disclosure, non-compete and
    acceptable use policies ("BOGUS AGREEMENTS") that I have
    entered into with your employer, its partners, licensors, agents and
    assigns, in perpetuity, without prejudice to my ongoing rights and
    privileges. You further represent that you have the authority to release
    me from any BOGUS AGREEMENTS on behalf of your employer.
    Sebastian Bassi, May 28, 2010
    #1
    1. Advertising

  2. Sebastian Bassi

    John Bokma Guest

    Sebastian Bassi <> writes:

    > Hello, I want to announce that the publisher of "Python for
    > Bioinformatis" (CRC Press) allowed me to publish a chapter from my
    > book.
    > I decided to publish the chapter about "Python and databases". I think
    > it may be useful for somebody.
    > The official announcement and download link is here:
    > http://py4bio.com/2010/05/28/python_databases_mysql_sqlite/
    > For more information about the book: www.tinyurl.com/biopython


    I feel more than uncomfortable with example code that uses: user="root"
    (e.g. p291). I never get why people write a short (IMO) /bad/ intro to
    databases while there are books out there that do a way better
    job. To me such chapters are just a way to get more pages :-(. (=make
    the book more expensive = less money to buy a /good/ book on databases)

    I would love to see more technical books that start at page 1 with the
    topic, not with an introduction to the language (170+ pages) and some
    other stuff that IMO shouldn't be there (MySQL introduction, XML, etc.). What
    I would expect, based on the title is:

    p 175-222
    p 315-456
    p 539-552

    This would probably make the book a bit cheaper, so one can buy a good
    book on MySQL, a good book on XML, and a good book on Python. (Or maybe
    one already has those, like me).

    IMO, YMMV

    --
    John Bokma j3b

    Hacking & Hiking in Mexico - http://johnbokma.com/
    http://castleamber.com/ - Perl & Python Development
    John Bokma, May 28, 2010
    #2
    1. Advertising

  3. On Fri, May 28, 2010 at 12:37 AM, John Bokma <> wrote:
    > I feel more than uncomfortable with example code that uses: user="root"


    What's wrong with this? It is just an example of connection string.
    The reader will use his/her user/pass/dbname according to their own
    settings.

    > (e.g. p291). I never get why people write a short (IMO) /bad/ intro to
    > databases while there are books out there that do a way better


    The intended audience of this book are biologist who may be not
    familiarized with relational databases. Most of my colleagues (at
    least from the bio camp) don't even know that behind most dynamic web
    pages there are databases and I think that most of them will find the
    intro section useful. You can always skip what you know and go to the
    point you want.

    > job. To me such chapters are just a way to get more pages :-(. (=make
    > the book more expensive = less money to buy a /good/ book on databases)


    I am not sure that price in this kind of book are tied to the number
    of pages. There must be some relation, but this is not the main factor
    affecting price.

    > I would love to see more technical books that start at page 1 with the
    > topic, not with an introduction to the language (170+ pages) and some

    ....

    I see where you go, it seems you are not the target audience for this
    book. Anyway I appreciate your feedback.

    Best,
    SB
    Sebastian Bassi, May 28, 2010
    #3
  4. Sebastian Bassi

    John Bokma Guest

    Sebastian Bassi <> writes:

    > On Fri, May 28, 2010 at 12:37 AM, John Bokma <> wrote:
    >> I feel more than uncomfortable with example code that uses: user="root"

    >
    > What's wrong with this? It is just an example of connection string.
    > The reader will use his/her user/pass/dbname according to their own
    > settings.


    A bit down you're contradicting yourself: your audience is not familiar
    with databases, yet you assume that they will use their own settings?

    >> (e.g. p291). I never get why people write a short (IMO) /bad/ intro to
    >> databases while there are books out there that do a way better

    >
    > The intended audience of this book are biologist who may be not
    > familiarized with relational databases. Most of my colleagues (at
    > least from the bio camp) don't even know that behind most dynamic web
    > pages there are databases and I think that most of them will find the
    > intro section useful. You can always skip what you know and go to the
    > point you want.


    My point is that the intro I (speed) read is weak at best. You say
    you're doing your audience a favor, but I don't agree.

    > I am not sure that price in this kind of book are tied to the number
    > of pages. There must be some relation, but this is not the main factor
    > affecting price.


    Even if it's just a few bucks, it's still money saved [0]. On top of
    that I think it's way better to point your audience to good books on the
    topic and skip the intro instead of doing a (half hearted IMO) attempt
    at it yourself.

    >> I would love to see more technical books that start at page 1 with the
    >> topic, not with an introduction to the language (170+ pages) and some

    > ...
    >
    > I see where you go, it seems you are not the target audience for this
    > book. Anyway I appreciate your feedback.


    You're welcome. And to be honest, if the book didn't have those filler
    chapters (which they are IMO) I would certainly have been interested in
    it. Note that I am not trying to convince you to rewrite your book, but
    my bookcase could have 20% more room if technical writers stopped to
    write books that tried to introduce their audience to everything but the
    kitchen sink [1]. My favourite books are the ones that /don't/ do the
    everything but the kitchensink gig, but direct me to other high quality
    books.


    [0] I've been a technical editor for a book, and got paid by the page.
    [1] I mean the books that seem to handle a single specific topic. If I
    buy "Ubuntu up and running" I expect everything, including the
    kitchensink.

    --
    John Bokma j3b

    Hacking & Hiking in Mexico - http://johnbokma.com/
    http://castleamber.com/ - Perl & Python Development
    John Bokma, May 29, 2010
    #4
  5. Sebastian Bassi

    Robinow Guest

    <Mobile

    On May 28, 2010, at 10:05 PM, John Bokma <> wrote:

    > Sebastian Bassi <> writes:
    >
    >> On Fri, May 28, 2010 at 12:37 AM, John Bokma <>
    >> wrote:

    >
    > Even if it's just a few bucks, it's still money saved [0]. On top of
    > that I think it's way better to point your audience to good books on
    > the
    > topic and skip the intro instead of doing a (half hearted IMO) attempt
    > at it yourself.
    >>

    >

    OK, John. What book do you recommend?
    Robinow, May 29, 2010
    #5
  6. Sebastian Bassi

    John Bokma Guest

    Robinow <> writes:

    > <Mobile
    >
    > On May 28, 2010, at 10:05 PM, John Bokma <> wrote:
    >
    >> Sebastian Bassi <> writes:
    >>
    >>> On Fri, May 28, 2010 at 12:37 AM, John Bokma <>
    >>> wrote:

    >>
    >> Even if it's just a few bucks, it's still money saved [0]. On top of
    >> that I think it's way better to point your audience to good books on
    >> the
    >> topic and skip the intro instead of doing a (half hearted IMO) attempt
    >> at it yourself.
    >>>

    >>

    > OK, John. What book do you recommend?


    Since it's not clear on what topic in the book you want recommendations,
    I do them all. Note that I only can recommend books I have either in my
    possession or browsed through that are still on my wish list. I am not
    new to programming, so the books listed under Python are not books for
    beginners per se, except the Programming in Python 3, which is on top of
    that one of the best learning a programming language books I've read (so
    far).

    Python:
    Programming in Python 3 /2nd edition/

    If you have some experience with programming:
    Dive into Python 2 (*)
    Dive into Python 3 (*)

    If you already have a book on learning Python and want a good extra
    reference:
    Python Essential Reference (4th edition)

    Subversion:
    Version Control with Subversion (O'Reilly) (*)

    Database:
    The Definitive Guide to SQLite
    MySQL (4th Edition) by Paul Dubois

    I also strongly suggest to read 1 or 2 books by Joe Celko before
    you even start to make your own databases (wish I would had), for
    example:

    Data and Databases: Concepts in Practice (**)
    SQL Programming Style
    SQL for smarties

    IMO Joe writes a bit "in your face" and calls a lot of people dumb, but
    don't let that get in the way ;-).

    I own also a copy of "MySQL cookbook" but haven't used it much. Still, I
    recommend to browse this book if you already have book(s) on MySQL and
    decide for yourself if it's something you want. In my experience most
    cookbook books by O'Reilly are good or very good.

    Can't recommend a good book on XML, I don't have one (***). I do have a
    book on XSLT (XSLT 2.0, O'Reilly) which is IMO very good, and does have,
    from the top of my head, a good XML introduction. Personally, I think
    it's good that if you work with XML that at least you have some idea of
    what XSLT is. Another XSLT book I have is XSLT 2.0 and XPath 2.0, but I
    haven't used that very often yet.

    (*) Also available as free download
    (**) Based on my experience with the other excellent books by Celko
    (***) A good book on XML would probably be 50 pages or less :-D.

    --
    John Bokma j3b

    Hacking & Hiking in Mexico - http://johnbokma.com/
    http://castleamber.com/ - Perl & Python Development
    John Bokma, May 29, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel Santiago

    Free MySQL databases

    Miguel Santiago, May 9, 2004, in forum: Perl
    Replies:
    0
    Views:
    457
    Miguel Santiago
    May 9, 2004
  2. Ken North
    Replies:
    0
    Views:
    578
    Ken North
    Jul 14, 2005
  3. Paul Smith

    Can sqlite read gzipped databases?

    Paul Smith, Mar 21, 2007, in forum: Python
    Replies:
    1
    Views:
    945
    John Nagle
    Mar 21, 2007
  4. Helmut Jarausch
    Replies:
    4
    Views:
    6,377
    Ethan Furman
    Jul 15, 2009
  5. Carl Youngblood
    Replies:
    1
    Views:
    204
    Carl Youngblood
    Apr 9, 2005
Loading...

Share This Page