Learning curve for new database program with Python?

J

Jetus

I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

A database that could work with Django would be very interesting to
look at as well..

Any suggestions out there?
 
M

Mensanator

I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

A database that could work with Django would be very interesting to
look at as well..

Any suggestions out there?

You didn't mention the system you're using or whether
you require something that's free.

Microsoft Access is easy to learn. You can become very
productive without every needing to learn SQL. Of course,
you'll need to learn some SQL in order to interface to
Python. But the good news is you can use the MS-Access
drag-and-drop interface to learn how to set up the
relational queries and once it's running, you can
display the underlying SQL code to learn how to
use it in Python.

For example, I often design the queries in Access
(where I have the advantage of visual design) and
use simple SELECT calls from Python do retrieve
the data.
 
M

Michele Simionato

I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

A database that could work with Django would be very interesting to
look at as well..

Any suggestions out there?

sqlite is arguably the simplest relational database out there,
and it is integrated with Python 2.5+. Of course you need to
tell us if an embedded database if enough for your use case,
or if you want a client-server database, if you use Windows
or Unix, if you want graphical administration tools or not,
what your final goal is, and so on.

Michele Simionato
 
J

John Nagle

Jetus said:
I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

Basic SQL isn't that hard. Learn CREATE, SELECT, INSERT,
UPDATE, and DELETE syntax. That's enough for most simple
applications.

I'd suggest using sqlite if you're doing something that
runs as a single standalone application, and MySQL if there
are multiple users of the database or it's a web service.
IBM's DB2 or Oracle is overkill for 25,000 records.

Install MySQL and its graphical client, and play with
it a bit. Create a table, type in a few records, and
try various SELECT statements. That will give you a sense of how SQL works.

John Nagle
 
C

CM

I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

A database that could work with Django would be very interesting to
look at as well..

Any suggestions out there?

Re: Django...from the Django site:

"If you want to use Django with a database, which is probably the
case, you'll also need a database engine. PostgreSQL is recommended,
because we're PostgreSQL fans, and MySQL, SQLite 3, and Oracle are
also supported."

Those all use SQL, and really if you are using a relational database,
SQL is
pretty much what is used. SQL has not struck me as difficult nor
cumbersome,
e.g., for a database table called "customers" that has a column
called
"name" and "city":

(in SQL):
SELECT name FROM customers WHERE city='Chicago'
(in partially shouted English):
"GIVE ME ALL THE names OF customers WHOSE CITY IS Chicago.")

or, in Python 2.5 if you import sqlite3:

import sqlite3
conn = sqlite3.connect('C:/Documents and Settings/user/Desktop/
somedatabase.db')
cur = conn.cursor()
cur.execute("SELECT name FROM customers WHERE city='Chicago'")

I've enjoyed using SQLite in Python, and there's some good
online documentation to help there. And SQLite, Python, Django all
play well together, somehow, AFAIK.
 
C

CM

I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

A database that could work with Django would be very interesting to
look at as well..

Any suggestions out there?

From the good people at Django:

"If you want to use Django with a database, which is probably the
case, you'll also need a database engine. PostgreSQL is recommended,
because we're PostgreSQL fans, and MySQL, SQLite 3, and Oracle are
also supported."

And if you want to make it a relational database, pretty much it's SQL
as the language. And that's ok--it really is not hard at all, I
picked it up quick and I'm new to databases; it's rather like a
natural language. I've had success with keeping things simple with
Python + SQLite--just import
sqlite3 and use Python code such as:

cur.execute("SELECT name FROM customers WHERE city='Chicago'")
See here: http://docs.python.org/lib/module-sqlite3.html

Very straightforward. Don't know how Django interacts with these two,
but probably quite well, or you could choose from the other database
management engines listed above.
 
S

Simon Brunning

Basic SQL isn't that hard. Learn CREATE, SELECT, INSERT,
UPDATE, and DELETE syntax. That's enough for most simple
applications.

Agreed. What's more, I've found SQL to be the single most transferable
skill in IT.. No matter what language and platform you find yourself
working on, you'll find an SQL driven relational database somewhere in
the mix. Learning SQL isn't a waste of time, I guarantee it.
 
B

bruno.desthuilliers

From the good people at Django:

"If you want to use Django with a database, which is probably the
case, you'll also need a database engine. PostgreSQL is recommended,
because we're PostgreSQL fans, and MySQL, SQLite 3, and Oracle are
also supported."

And if you want to make it a relational database,

Err... I may totally misunderstand you here, but I've the strong
impression that you missed the fact that the database systems
mentionned above are all (so-called) relational dabatases.
 
B

bruno.desthuilliers

I have a need for a database program. I downloaded the db2 from ibm,
and reviewed some of the documentation.

My question is, what is the easiest program for me to try to learn. I
will be creating a database of about 25,000 records, it will be
relational. I am a beginner Python programmer, and need a database
solution that is easy to grasp. I played with sql,
and found that very difficult, if not overly cumbersome.

The point is that so far, "relational database" really means "SQL
database". And believe me, trying to get away with a non-SQL database
only to avoid learning SQL is probably the worst possible move for
both your program and yourself.
A database that could work with Django would be very interesting to
look at as well..

The databases that the ORM part of Django can connect to are all SQL
databases.
Any suggestions out there?

I can only second / third etc what everyone already told you : learn
SQL. And not only SQL, but also the theory that it builds upon (the
'relational model'), and the good practices wrt/ relational database
design. There's no shortage of good quality freely available
documentation on these topics, and you'll find help on quite a couple
of newsgroups / forums / whatever.

I'd strongly recommand you start without Django's ORM first, so you
get a chance to learn how it really works undercover. Else you might
end up doing things in a very inefficient way.
 
C

CM

Err... I may totally misunderstand you here, but I've the strong
impression that you missed the fact that the database systems
mentionned above are all (so-called) relational dabatases.

You misunderstood me, but completely understandably. I meant that
a) the OP wanted to use Django, and so I was giving the word on the
only database engines that would work with that and b) the OP wanted
to use a relational database, and therefore would have to use SQL
despite not wanting to. But these two facts are completely connected,
and by leaving out that connection it seemed like those DBs weren't
relational. It would have been better for me to have said: "All of
these are relational databases, and, like any relational database
(which you want yours to be), they will require SQL." Sorry for the
confusion.
 
D

D'Arcy J.M. Cain

You misunderstood me, but completely understandably. I meant that
a) the OP wanted to use Django, and so I was giving the word on the
only database engines that would work with that and b) the OP wanted
to use a relational database, and therefore would have to use SQL

While most database systems require SQL, the type of database and the
query language used are are not as tightly coupled as you imply. I did
quite a bit of work in Progres DB in a 4GL that was not SQL although
SQL was an optional extra. The original query language for PostgreSQL
and its predeccessor was QUEL, not SQL. There are other examples.
See http://en.wikipedia.org/wiki/SQL#Alternatives_to_SQL for some.

This is not to say that learning SQL is a bad idea. It is certainly
the de facto standard today.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top