Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15670
| From | Redcat <redcat@catfolks.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: my new project, is this the right way? |
| Date | 2011-11-14 15:47 +0000 |
| Message-ID | <9icrg5F5lhU1@mid.individual.net> (permalink) |
| References | <4ec0f070$0$1378$4fafbaef@reader2.news.tin.it> |
> since i'm mostly a new-bye for as regard databases, my idea is to use
> sqlite at the beginning.
>
> Is that ok? any other db to start with? (pls don't say mysql or similar,
> they are too complex and i'll use this in a second step)
I know it's a lot of work to learn initially, but I would recommend
taking the time to install and become familiar with a database engine
such as MySQL or PostgresQL. While SQLite is easy to install and easy to
use, it also cuts a lot of corners and allows you to do things that would
die in a real database. For example, in SQLite column types are merely
suggestions; there is nothing in SQLite to keep you from storing a string
in an integer field or vice versa.
For example:
dan@dan:~/work$ sqlite3
SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table test (
...> id int,
...> name varchar(64),
...> comment varchar(256)
...> );
sqlite> .schema test
CREATE TABLE test (
id int,
name varchar(64),
comment varchar(256)
);
sqlite> insert into test values (1, 'Dan', 'Normal insert with valid
types');
sqlite> insert into test values ('Bogosity', 2, 'Record with invalid
types');
sqlite> insert into test values ('This field should be an int but is
really a long string instead', 12.45, 'A really screwy record');
sqlite> select * from test;
1|Dan|Normal insert with valid types
Bogosity|2|Record with invalid types
This field should be an int but is really a long string instead|12.45|A
really screwy record
sqlite>
This is not to say that SQLite is useless. Far from it - I use it
frequently myself. But I've been working with SQL databases for a bunch
of years, and I am familiar with the tradeoffs involved in working with
SQLite.
A decent tutorial on working with SQL in general can be found at http://
www.w3schools.com/sql/sql_intro.asp
Installing MySQL or Postgres can be fairly simple, if you use the tools
provided with your Linux distro (assuming you're running on Linux). "sudo
apt-get install mysql mysql-server" or "yum install mysql mysql-server"
should get you what you need to start using MySQL, "sudo apt-get install
postgresql" or "yum install postgresql" should get you started with
PostgresQL.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
my new project, is this the right way? Tracubik <affdfsdfdsfsd@b.com> - 2011-11-14 10:41 +0000
Re: my new project, is this the right way? Chris Angelico <rosuav@gmail.com> - 2011-11-14 21:55 +1100
Re: my new project, is this the right way? HoneyMonster <someone@someplace.invalid> - 2011-11-25 15:44 +0000
Re: my new project, is this the right way? Chris Angelico <rosuav@gmail.com> - 2011-11-26 02:49 +1100
Re: my new project, is this the right way? Redcat <redcat@catfolks.net> - 2011-11-14 15:47 +0000
Re: my new project, is this the right way? Jon Clements <joncle@googlemail.com> - 2011-11-14 08:37 -0800
Re: my new project, is this the right way? Miki Tebeka <miki.tebeka@gmail.com> - 2011-11-14 09:48 -0800
Re: my new project, is this the right way? rusi <rustompmody@gmail.com> - 2011-11-25 09:01 -0800
Re: my new project, is this the right way? Roy Smith <roy@panix.com> - 2011-11-25 12:16 -0500
Re: my new project, is this the right way? rusi <rustompmody@gmail.com> - 2011-11-25 20:48 -0800
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-26 15:41 -0800
Re: my new project, is this the right way? Dave Angel <d@davea.name> - 2011-11-26 21:35 -0500
Re: my new project, is this the right way? Roy Smith <roy@panix.com> - 2011-11-26 21:49 -0500
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-26 19:14 -0800
Re: my new project, is this the right way? Chris Angelico <rosuav@gmail.com> - 2011-11-27 14:24 +1100
Re: my new project, is this the right way? Dave Angel <d@davea.name> - 2011-11-26 22:27 -0500
Re: my new project, is this the right way? Roy Smith <roy@panix.com> - 2011-11-26 22:41 -0500
Re: my new project, is this the right way? Matt Joiner <anacrolix@gmail.com> - 2011-11-27 15:03 +1100
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-27 00:29 -0800
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-27 00:49 -0800
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-28 00:51 -0800
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-28 00:51 -0800
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-27 00:49 -0800
Re: my new project, is this the right way? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-27 00:29 -0800
csiph-web