TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Looking to learn: SQL in MySQL and SQLlite

9 pointsby LookingToLearnabout 14 years ago
Hi,<p>I'm a long time programmer in C, Python, and a range of other languages. The need has arisen for me to write something that uses a database, and I'm looking for advice on where to start.<p>A database consists of a collection of tables, and SQL is the language used to create, populate, manipulate, query and destroy the tables and their contents.<p>Can anyone suggest a non-patronising, information dense tutorial or "How To" guide? Everything I've found from fairly comprehensive searching seems fluffy or way too caught up in its own gravitas.<p>Suggestions welcome, and thanks in advance.

1 comment

drpancakeabout 14 years ago
I'd recommend just getting on with it. MySQL is the obvious first choice as it's widespread and well documented. Get it running locally then install the MySQLdb package for Python.<p>Note that in practice SQL is a small subset of the languages accepted by MySQL, PostgreSQL, SQLite, Oracle et al. Each defines it's own custom dialect but the concepts are mostly universal.<p>At first I would use the 'mysql' command-line utility so you can see exactly what's going on; this comes bundled with the installer. Have a think about how your data would fit into rows and columns, but don't over-analyse too much - it takes practice to start thinking in a relational way.<p>Create your tables and insert some example data. Now in Python connect to your local instance and try querying for some rows (hint: DictCursor is useful, albeit wasteful if you care about performance).<p>Now read about database normalization and transactions. You should be well on your way!
评论 #2478776 未加载