NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Getting started with Postgres or MySQLI have an openoffice spreadsheet from which I want to generate two related Stuff from OpenOffice will generate a database with table entries named by the I would like to get this data into a Postgres or MySQL database. Using How do I get started here? -- |
Getting started with Postgres or MySQL
On (31/01/07 19:17), David Baron wrote:
> I have an openoffice spreadsheet from which I want to generate two related
> tables. I have tried most everything installed.
>
> Stuff from OpenOffice will generate a database with table entries named by the
> first line in the spreadsheet. This can, indeed, be queried, sort of.
>
> I would like to get this data into a Postgres or MySQL database. Using
> pgadmin3, I cannot get a connection connected. Does not accept my password.
> Their docs cited Debian problems here and recommended md5 authorization.
> Tried that. No avail. One can also simply say trust (localhost only). No
> avail.
>
> How do I get started here?
It's been a while since I set up postgres but I recall you have to edit:
/etc/postgresql/pg_hba.conf:
edit METHOD for
# All other connections by UNIX sockets
local all all md5
There are also issues in terms of setting at a user with the requisite
permissions; I think you need to create a new user with privileges
I found it easier to do some of this setup (of users and premissions)
staff using psql on the server. You might also want to look at
phppgadmin which is quite good for setting up users and permissions.
Regards
Clive
--
www.clivemenzies.co.uk ...
...strategies for business
--
Getting started with Postgres or MySQL
David Baron wrote:
> I have an openoffice spreadsheet from which I want to generate two related
> tables. I have tried most everything installed.
>
> Stuff from OpenOffice will generate a database with table entries named by the
> first line in the spreadsheet. This can, indeed, be queried, sort of.
>
> I would like to get this data into a Postgres or MySQL database. Using
> pgadmin3, I cannot get a connection connected. Does not accept my password.
> Their docs cited Debian problems here and recommended md5 authorization.
> Tried that. No avail. One can also simply say trust (localhost only). No
> avail.
>
> How do I get started here?
>
>
Hi David,
MySQL is definitely best choice. If you have not still installed latest
version of MySQL do it as following:
apt-get install mysql-server
then activate your "root" user:
mysqladmin -u root password yournewpassword
then connect to any host:
mysql -h Host_IP_Address_Or_DNS -u username -p
to import your data to MySQL database, I would recommend to export your
data from OpenOffice spreadsheet or any other databases to SQL queries
form. Then run this file in batch mode by MySQL of course with a
username which has enough privileges or simply super user. MySQL will
execute all queries within the SQL file. Be ware that it is also
possible that you may need some modifications to your SQL file, however
they could be minor. To get more precise tip about how to change your
SQL file (if it is needed) check MySQL's error messages. They are
detailed and clear.
I hope it helps.
Danesh
--
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/31/07 12:29, Danesh Daroui wrote:
> David Baron wrote:
[snip]
> MySQL is definitely best choice. If you have not still installed
> latest version of MySQL do it as following:
Well, if you *insist* on starting a war, so be it.
MySQL is a toy piece of garbage that lets you insert corrupt data
without so much as a peep. Every other RDBMS known to man rejects
out-of-range data. BUT, you say, MySQL5 allows you to set
STRICT_TRANS_TABLES and STRICT_ALL_TABLES. Sure, but they can be
disabled on a per-process basis, which *still* allows you to insert
bad data.
http://dev.mysql.com/doc/refman/5.0/en/constraint-invalid-data.html
PostgreSQL *might* be a bit harder to set up, but I doubt it.
Reading the docs and using the CLI, it's always been easy for me to
set things up.
$ su postfix
$ initdb --username=$THE_OWNER --pgdata=$TARGET_DIR
$ exit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwOVUS9HxQb37XmcRAu1tAJ0XhMNDQIK9X+9TKAwx3OjorDmH9QCfep8l
vUFK8sGIreIJdQhxRQzThto=
=Auhn
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
OK, I withdraw the question. Will find useful answers elsewhere or stay with
OpenOffice's DB (as I said, not all that bad!).
The flame war has gotten too ugly. I think we can argue about the merits of
one of the other programs with a bit more common courtesy and civility and
end the discussion as some point when nothing new is being contributed.
--
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/03/07 12:26, David Baron wrote:
> OK, I withdraw the question. Will find useful answers elsewhere or stay with
> OpenOffice's DB (as I said, not all that bad!).
>
> The flame war has gotten too ugly. I think we can argue about the merits of
> one of the other programs with a bit more common courtesy and civility and
> end the discussion as some point when nothing new is being contributed.
Maybe no one here uses OOo Base with PostgreSQL.
I use PostgreSQL, but only from the bash prompt, using psql and
python. In fact, I think I *did* ask you whether your user was a
database superuser. Got no answer.
So, is "that user" a database superuser?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFxNuGS9HxQb37XmcRAmapAKDTPPbKLU7J5d1lOVLH2JGq4aFV0ACg5lz6
79EPP031E/JC/vvbf3Ljl9g=
=DcAd
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Wed, Jan 31, 2007 at 07:17:48PM +0200, David Baron wrote:
> I have an openoffice spreadsheet from which I want to generate two related
> tables. I have tried most everything installed.
>
> Stuff from OpenOffice will generate a database with table entries named by the
> first line in the spreadsheet. This can, indeed, be queried, sort of.
>
> I would like to get this data into a Postgres or MySQL database. Using
> pgadmin3, I cannot get a connection connected. Does not accept my password.
> Their docs cited Debian problems here and recommended md5 authorization.
> Tried that. No avail. One can also simply say trust (localhost only). No
> avail.
>
> How do I get started here?
>
First. Please do not use MySQL, unless you don't care about your data.
Second, you do know that PostgreSQL users and system users are separate.
Have you created a user account in PostgreSQL? You can do this using
the command line program and this documented quite well at
http://postgresql.org/docs along with lots of other things.
As far as it not accepting your password, what do the errors in the logs
say?
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
On Wednesday 31 January 2007 13:19, Roberto C. Sanchez wrote:
> > How do I get started here?
>
> First. Please do not use MySQL, unless you don't care about your data.
Please stop this MySQL vs. PostgreSQL bashing. Each has their place. If
users of MySQL don't care about their data, then I guess Bayer, Colgate,
Ensembl Genome Browser, Genome Sciences Center (GSC), The Institute for
Genomic Research, AIRBUS/EADS, Australian Department of Defence, Los Alamos
National Laboratory, Ministère de la Defense (France), CraigsList, Google,
iStockphoto, PriceGrabber, Ticketmaster, Yahoo!, CERN - The ATLAS Experiment
at LHC, Bank of Canada, Lloyds TSB Bank, Linden Lab (Second Life), California
Air Review Board, Department of Homeland Security, NASA, NASA Jet Propulsion
Lab (JPL), DaimlerChrysler, Epson, Chicago Sun-Times, Slashdot, Dell,
Hewlett-Packard, Novell, Siemens, Sun Microsystems, Symantec, Texas
Instruments, AT&T Wireless, Cable & Wireless, Cisco Systems, Nokia, Lufthansa
Systems, Orbitz, 37signals, del.icio.us, Digg, Facebook, Feedburner,
Feedster, Flickr, Freshmeat.net, Technorati, Wikipedia, and YouTube (among
many others, see http://www.mysql.com/customers/ ) don't care about their
data. These are companies that live and die by their data, I'm sure they
care about it very much. Each has their place. MySQL has come a long way
since its 3.23 days. Read the manual. Form your own opinions. A lot has
changed.
j
--
Joshua Kugler
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/31/07 16:50, Joshua J. Kugler wrote:
> On Wednesday 31 January 2007 13:19, Roberto C. Sanchez wrote:
>>> How do I get started here?
>> First. Please do not use MySQL, unless you don't care about your data.
>
> Please stop this MySQL vs. PostgreSQL bashing. Each has their place. If
> users of MySQL don't care about their data, then I guess Bayer, Colgate,
> Ensembl Genome Browser, Genome Sciences Center (GSC), The Institute for
[snip]
> Feedster, Flickr, Freshmeat.net, Technorati, Wikipedia, and YouTube (among
> many others, see http://www.mysql.com/customers/ ) don't care about their
> data. These are companies that live and die by their data, I'm sure they
> care about it very much. Each has their place. MySQL has come a long way
> since its 3.23 days. Read the manual. Form your own opinions. A lot has
> changed.
I supplied a link to the official MySQL docs. I'll quote from them
now, if you'd like:
http://dev.mysql.com/doc/refman/5.0/en/constraint-invalid-data.html
MySQL allows you to store certain incorrect date values
into DATE and DATETIME columns (such as '2000-02-31' or
'2000-02-00'). The idea is that it's not the job of the
SQL server to validate dates. If MySQL can store a date
value and retrieve exactly the same value, MySQL stores
it as given. If the date is totally wrong (outside the
server's ability to store it), the special ?zero? date
value '0000-00-00' is stored in the column instead.
So, I'd say that yes, anyone who specs MySQL either (a) does not
know WTF they are doing, or (b) cares more about MySQL's supposed
raw speed than about the validity of their data.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwSQrS9HxQb37XmcRAqO4AJ9KS32CXUT+DBWr1pH0RcjvfpmnJQCeM8nI
pU2ZJ+HYHutmFq3uhQwR/Fo=
=R7GI
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Wednesday 31 January 2007 14:20, Ron Johnson wrote:
> On 01/31/07 16:50, Joshua J. Kugler wrote:
> > On Wednesday 31 January 2007 13:19, Roberto C. Sanchez wrote:
> >>> How do I get started here?
> >>
> >> First. Please do not use MySQL, unless you don't care about your data.
> >
> > Please stop this MySQL vs. PostgreSQL bashing. Each has their place. If
> > users of MySQL don't care about their data, then I guess Bayer, Colgate,
> > Ensembl Genome Browser, Genome Sciences Center (GSC), The Institute for
>
> [snip]
>
> > Feedster, Flickr, Freshmeat.net, Technorati, Wikipedia, and YouTube
> > (among many others, see http://www.mysql.com/customers/ ) don't care
> > about their data. These are companies that live and die by their data,
> > I'm sure they care about it very much. Each has their place. MySQL has
> > come a long way since its 3.23 days. Read the manual. Form your own
> > opinions. A lot has changed.
>
> I supplied a link to the official MySQL docs. I'll quote from them
> now, if you'd like:
>
> http://dev.mysql.com/doc/refman/5.0/en/constraint-invalid-data.html
> MySQL allows you to store certain incorrect date values
> into DATE and DATETIME columns (such as '2000-02-31' or
> '2000-02-00'). The idea is that it's not the job of the
> SQL server to validate dates. If MySQL can store a date
> value and retrieve exactly the same value, MySQL stores
> it as given. If the date is totally wrong (outside the
> server's ability to store it), the special ?zero? date
> value '0000-00-00' is stored in the column instead.
In that same document, they give the reason for doing so:
"The reason for using the preceding rules in non-strict mode is that we can't
check these conditions until the statement has begun executing. We can't just
roll back if we encounter a problem after updating a few rows, because the
storage engine may not support rollback. The option of terminating the
statement is not that good; in this case, the update would be “half done,”
which is probably the worst possible scenario. In this case, it's better
to “do the best you can” and then continue as if nothing happened."
And also provide a way (from 5.0.2 on) of enabling the "traditional" strict
behavior. So, with one config option, MySQL will now reject all invalid data
(providing you're using transactional engines, for reasons described above).
As for your assertion that those who spec MySQL don't know what they're doing,
I do believe the techs that work at MySQL are some pretty sharp cookies. I
think they know what they're doing, and I'm sure they know how to either
enable the above config option, or check their data before it gets to their
database.
All products have their gotchas. One should be familiar with the product
against which one is writing, or weird things will bite you down the road.
j
--
Joshua Kugler
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/31/07 17:54, Joshua J. Kugler wrote:
> On Wednesday 31 January 2007 14:20, Ron Johnson wrote:
>> On 01/31/07 16:50, Joshua J. Kugler wrote:
>>> On Wednesday 31 January 2007 13:19, Roberto C. Sanchez wrote:
>>>>> How do I get started here?
>>>> First. Please do not use MySQL, unless you don't care about your data.
>>> Please stop this MySQL vs. PostgreSQL bashing. Each has their place. If
>>> users of MySQL don't care about their data, then I guess Bayer, Colgate,
>>> Ensembl Genome Browser, Genome Sciences Center (GSC), The Institute for
>> [snip]
>>
>>> Feedster, Flickr, Freshmeat.net, Technorati, Wikipedia, and YouTube
>>> (among many others, see http://www.mysql.com/customers/ ) don't care
>>> about their data. These are companies that live and die by their data,
>>> I'm sure they care about it very much. Each has their place. MySQL has
>>> come a long way since its 3.23 days. Read the manual. Form your own
>>> opinions. A lot has changed.
>> I supplied a link to the official MySQL docs. I'll quote from them
>> now, if you'd like:
>>
>> http://dev.mysql.com/doc/refman/5.0/en/constraint-invalid-data.html
>> MySQL allows you to store certain incorrect date values
>> into DATE and DATETIME columns (such as '2000-02-31' or
>> '2000-02-00'). The idea is that it's not the job of the
>> SQL server to validate dates. If MySQL can store a date
>> value and retrieve exactly the same value, MySQL stores
>> it as given. If the date is totally wrong (outside the
>> server's ability to store it), the special ?zero? date
>> value '0000-00-00' is stored in the column instead.
>
> In that same document, they give the reason for doing so:
>
> "The reason for using the preceding rules in non-strict mode is that we can't
> check these conditions until the statement has begun executing. We can't just
> roll back if we encounter a problem after updating a few rows, because the
> storage engine may not support rollback. The option of terminating the
> statement is not that good; in this case, the update would be “half done,”
> which is probably the worst possible scenario. In this case, it's better
> to “do the best you can” and then continue as if nothing happened."
Every other RDBMS handles bad data by rejecting the statement. But
then, every other RDBMS that I know of is transactional and can roll
back to the point of last commit. (And no, slapping an SQL parser
on top of an ISAM library did not make MySQL an RDBMS.)
> And also provide a way (from 5.0.2 on) of enabling the "traditional" strict
> behavior. So, with one config option, MySQL will now reject all invalid data
> (providing you're using transactional engines, for reasons described above).
And a developer can disable it at run-time, inserting all the bad
data his poorly written app can manage. We all make mistakes.
Having another layer of protection is *always* a good thing.
> As for your assertion that those who spec MySQL don't know what they're doing,
> I do believe the techs that work at MySQL are some pretty sharp cookies. I
> think they know what they're doing, and I'm sure they know how to either
> enable the above config option, or check their data before it gets to their
> database.
And not making a database-wide config parameter QED demonstrates
that they do *not* know what it takes to make a real RDBMS.
You're talking to someone who's been a DBA for 10 years; you will
not win this argument.
> All products have their gotchas. One should be familiar with the product
> against which one is writing, or weird things will bite you down the road.
>
> j
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwTPlS9HxQb37XmcRAuGbAJoDEwT0h5Kk0qTFVPQoR6funC/gnwCg1/zi
ps6RnvXTnj3IfZ+5v8jNIw0=
=gdID
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Wednesday 31 January 2007 15:27, Ron Johnson wrote:
> You're talking to someone who's been a DBA for 10 years; you will
> not win this argument.
Eh, so ya got three years on me. :)
j
--
Joshua Kugler
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111
--
Getting started with Postgres or MySQL
I've been debating whether or not to make a comment on this discussion,
but it finally got to me. I think you're being way too hard on MySQL
considering the fact that this question originated from the idea of
using a database backend for OpenOffice.org. Yeah, I didn't like "MySQL
is definitely your best choice" kind of answer with no clear indication
as to why MySQL is a better choice in this case, so I'll give a couple
of reasons:
(1) MySQL is shown to be faster in a single-user environment than
Postgres, especially with complicated SELECT statements
(2) MySQL is a shorter learning curve for new users
If people were just praising and praising MySQL as the best database,
I'd be playing devil's advocate because honestly MySQL isn't a serious
database for serious database jobs. It's a good database for rapid web
development, and for quickies--probably the BEST choice for those
things. Yeah, it sucks that MySQL requires an application layer to any
system (i.e. you, as the programmer, must provide rules, enforce data
integrity, and up until recently even manage your own foreign keys).
But if OpenOffice.org works with MySQL, then I'm sure the OOo software
has taken care of it.
Let's not go around telling people "you shouldn't use MySQL" or "you
shouldn't use Postgres" just because it might not fit what we're doing
with OUR databases at any given time.
With that said, I think anyone who is not the most technically inclined
and just getting into things should start out by trying MySQL
because I think overall you can find a lot better information for it
online, and it you don't get bogged down with different schemas. I
think anyone who only knows MySQL really needs to start getting into
Postgres if they ever intend on making a large database.
Angelo
--
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/01/07 12:16, Angelo Bertolli wrote:
> I've been debating whether or not to make a comment on this discussion,
> but it finally got to me. I think you're being way too hard on MySQL
> considering the fact that this question originated from the idea of
> using a database backend for OpenOffice.org. Yeah, I didn't like "MySQL
> is definitely your best choice" kind of answer with no clear indication
> as to why MySQL is a better choice in this case, so I'll give a couple
> of reasons:
>
> (1) MySQL is shown to be faster in a single-user environment than
> Postgres, especially with complicated SELECT statements
>
> (2) MySQL is a shorter learning curve for new users
I think MSFT used to use those same arguments about why people
should use Windows
[snip]
> think anyone who only knows MySQL really needs to start getting into
> Postgres if they ever intend on making a large database.
Bad habits ingrained now are bad habits that you carry with you for
a long time. Start with good habits now and you're better for it
always.
The PostgreSQL Novice list welcomes questions like those from OP.
http://archives.postgresql.org/pgsql-novice/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwkIaS9HxQb37XmcRAsy5AJ4keWzAP3olwHpbvyLczZxfmaiU+gCg2Pjr
AyElwbG+BVwpYAJJJKDHNOI=
=7u3q
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
Ron Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 02/01/07 12:16, Angelo Bertolli wrote:
>
>> I've been debating whether or not to make a comment on this discussion,
>> but it finally got to me. I think you're being way too hard on MySQL
>> considering the fact that this question originated from the idea of
>> using a database backend for OpenOffice.org. Yeah, I didn't like "MySQL
>> is definitely your best choice" kind of answer with no clear indication
>> as to why MySQL is a better choice in this case, so I'll give a couple
>> of reasons:
>>
>> (1) MySQL is shown to be faster in a single-user environment than
>> Postgres, especially with complicated SELECT statements
>>
>> (2) MySQL is a shorter learning curve for new users
>>
>
> I think MSFT used to use those same arguments about why people
> should use Windows
>
The fundamental difference is licensing. If Windows was open source, I
certainly wouldn't bother disagreeing with them if they specified which
users would benefit more from Windows. And on that issue MySQL wins
because you can have it under the GPL. Postgres is under BSD. (I guess
that's arguable, but we are on a Debian list after all.)
>> think anyone who only knows MySQL really needs to start getting into
>> Postgres if they ever intend on making a large database.
>>
>
> Bad habits ingrained now are bad habits that you carry with you for
> a long time. Start with good habits now and you're better for it
> always.
>
> The PostgreSQL Novice list welcomes questions like those from OP.
> http://archives.postgresql.org/pgsql-novice/
I don't know... I have so many mixed feelings about this. Yeah, it's
nice if we could educate everyone through the design of the software,
but at some point that's just a barrier to entry for too many people.
And just using Postgres really doesn't take care of all of the problems
anyway: you can still push foreign key management to the application.
Who is going to teach you to use foreign keys?
(By the way, you actually get different transactional results based on
what kind of storage you tell MySQL to use. InnoDB is better but slower
than MyISAM. Gee, I wonder if there could be a tradeoff there.)
MySQL got the upper hand for having "better" priorities early on, and
now they're enjoying their popularity. It didn't really matter that
Firewire was better than USB: USB was a little bit cheaper, got bigger
market share, and because of that was later able to improve. (By the
way, watch now Nintendo takes over Sony's marketshare now. ;)
Not to get too offtopic, maybe if Postgres had been more reliable prior
to version 7 it would have taken over. I don't really think anyone
cared about how fast MySQL was on large-but-simple databases--although
it certainly helped. But what people did care about is that a) it was
free (as in beer), and b) that it worked.
I don't want to come off as an authority on the subject, because I don't
consider myself an expert on DBMS, just a casual user. They've just
been interesting to me for the past 10 years, and I do currently use
both MySQL and Postgres.
Angelo
--
Getting started with Postgres or MySQL
On Thu, Feb 01, 2007 at 04:37:39PM -0500, Angelo Bertolli wrote:
>
> The fundamental difference is licensing. If Windows was open source, I
> certainly wouldn't bother disagreeing with them if they specified which
> users would benefit more from Windows. And on that issue MySQL wins
> because you can have it under the GPL. Postgres is under BSD. (I guess
> that's arguable, but we are on a Debian list after all.)
>
It depends on whether your definition of "freeness" is biased toward
developers or end users.
Basically, on technical merits, MySQL benefits practically nobody.
>
> (By the way, you actually get different transactional results based on
> what kind of storage you tell MySQL to use. InnoDB is better but slower
> than MyISAM. Gee, I wonder if there could be a tradeoff there.)
>
Yes, because MyISAM is *not* transactional at all. Not just that, but
if you have a query/transaction that involves upty-bazillion InnoDB
(transactional) tables and only *one* MyISAM table, then the *entire*
query/transaction is *not* transactional.
> MySQL got the upper hand for having "better" priorities early on, and
> now they're enjoying their popularity. It didn't really matter that
Yes, they were "fast" when computers were still slow. Unfortunately,
many people were willing to give up data integrity in exchange for
"fast".
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/01/07 17:03, Roberto C. Sanchez wrote:
> On Thu, Feb 01, 2007 at 04:37:39PM -0500, Angelo Bertolli wrote:
[snip]
> Yes, they were "fast" when computers were still slow. Unfortunately,
> many people were willing to give up data integrity in exchange for
> "fast".
And install layer upon layer of AV software on POS operating
systems, and *still* get 0wn3d and turned into mal-bots.
That's sheeple for ya...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwnZDS9HxQb37XmcRAnrMAJ9cDf5iGX05xkzoSE4W7jlRXD8W9QCfeN9k
zsIUIedotMCFV4UBTpW7rlQ=
=DrdR
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Thu, Feb 01, 2007 at 01:16:18PM -0500, Angelo Bertolli wrote:
>
> (1) MySQL is shown to be faster in a single-user environment than
> Postgres, especially with complicated SELECT statements
>
IIRC, this does not hold for transactional tables. So, we are back to
the "if you don't care about your data" argument.
> (2) MySQL is a shorter learning curve for new users
>
What? In what way? Learning to develop against MySQL is no harder or
easier than learning to develop against PostgreSQL (besides the fact the
people need to be broken of the stupid misconceptions engendered by the
pervasveness of MySQL). The two are just different.
> If people were just praising and praising MySQL as the best database,
> I'd be playing devil's advocate because honestly MySQL isn't a serious
> database for serious database jobs. It's a good database for rapid web
> development, and for quickies--probably the BEST choice for those
I don't about "BEST" but it is at least one of the available choices.
> things. Yeah, it sucks that MySQL requires an application layer to any
> system (i.e. you, as the programmer, must provide rules, enforce data
> integrity, and up until recently even manage your own foreign keys).
OK. How in the world does this sort of garbage shorten the user's
learning curve. You are contradicting yourself.
> But if OpenOffice.org works with MySQL, then I'm sure the OOo software
> has taken care of it.
>
> Let's not go around telling people "you shouldn't use MySQL" or "you
> shouldn't use Postgres" just because it might not fit what we're doing
> with OUR databases at any given time.
>
Except that there are vanishingly few, if any, reasons to actually
prefer MySQL over anything else.
> With that said, I think anyone who is not the most technically inclined
> and just getting into things should start out by trying MySQL
> because I think overall you can find a lot better information for it
> online, and it you don't get bogged down with different schemas. I
> think anyone who only knows MySQL really needs to start getting into
> Postgres if they ever intend on making a large database.
>
Ever learn to play a musical instrument in a "newbie friendly" way?
Ever take lessons from a master after that? They will spend more time
breaking you of your bad habits than teaching you the instrument. The
same holds true for people who grow up on MySQL. They simply do not
understand how to work with a real database.
I see this at work. People "learn" on MySQL and then totally fall apart
when they try to work with Oracle. This is because they don't
understand that Oracle, being a real database, behaves like a real
database and not like that toy MySQL.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
Roberto C. Sanchez wrote:
> On Thu, Feb 01, 2007 at 01:16:18PM -0500, Angelo Bertolli wrote:
>
>> (2) MySQL is a shorter learning curve for new users
>>
>>
> What? In what way? Learning to develop against MySQL is no harder or
> easier than learning to develop against PostgreSQL (besides the fact the
> people need to be broken of the stupid misconceptions engendered by the
> pervasveness of MySQL). The two are just different.
>
Mostly in letting people do rapid development without requiring a lot of
forethought in database design. I know, I know, my argument is a lot
weaker these days with improvements made to Postgres. Legacy counts too
in this case because when there is a big MySQL userbase out there that
means more support. But, as you said before, that's not a technical merit.
MySQL is to the database world what PHP is to the programming language
world: feels sloppy... but it's fast and easy. I still don't think
that makes PHP "not a real language," although I'm sure it feels that
way to some people. I wouldn't write anything but a dynamic website in
PHP, but as far as I'm concerned PHP is the best thing to write a
dynamic website in. I'm not quite so adamant about using MySQL for
certain things, but I do feel like it's a perfectly appropriate solution
sometimes.
>> things. Yeah, it sucks that MySQL requires an application layer to any
>> system (i.e. you, as the programmer, must provide rules, enforce data
>> integrity, and up until recently even manage your own foreign keys).
>>
>
> OK. How in the world does this sort of garbage shorten the user's
> learning curve. You are contradicting yourself.
>
It doesn't. Your point (and Ron's) about teaching people bad design
techniques and bad habits is well-taken. MySQL does not enforce good
habits. And if you have good habits or know how to design a database
well, then using those techniques actually makes your life easier.
But you're coming from an angle where people know or must learn all of
that just before they're able to even start. Don't you see how not
having to learn that is faster for some people?
--
Angelo Bertolli
Please remove my email address from your post when replying
[Tech http://bitfreedom.com | Gaming http://heroesonly.com]
--
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/01/07 20:10, Angelo Bertolli wrote:
> Roberto C. Sanchez wrote:
>> On Thu, Feb 01, 2007 at 01:16:18PM -0500, Angelo Bertolli wrote:
>>
>>> (2) MySQL is a shorter learning curve for new users
>>>
>>>
>> What? In what way? Learning to develop against MySQL is no harder or
>> easier than learning to develop against PostgreSQL (besides the fact the
>> people need to be broken of the stupid misconceptions engendered by the
>> pervasveness of MySQL). The two are just different.
>>
>
> Mostly in letting people do rapid development without requiring a lot of
> forethought in database design. I know, I know, my argument is a lot
That splatting noise is my hurl splatting onto the opposite wall.
Remind me never to hire you.
> weaker these days with improvements made to Postgres. Legacy counts too
> in this case because when there is a big MySQL userbase out there that
> means more support. But, as you said before, that's not a technical merit.
Are you sure you don't work for Microsoft? Or maybe you're an MCSE?
[snip]
> It doesn't. Your point (and Ron's) about teaching people bad design
> techniques and bad habits is well-taken. MySQL does not enforce good
> habits. And if you have good habits or know how to design a database
> well, then using those techniques actually makes your life easier.
>
> But you're coming from an angle where people know or must learn all of
> that just before they're able to even start. Don't you see how not
> having to learn that is faster for some people?
It's confirmed. You *are* an MCSE.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwqPzS9HxQb37XmcRAgsnAJ0WPsu6eGt5OwERjZqvQ9LVFzv/EwCdEAwT
axgFn4hYXg0ee1+nR9zWmzw=
=nq+v
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Thu, 2007-02-01 at 20:37 -0600, Ron Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 02/01/07 20:10, Angelo Bertolli wrote:
> > Roberto C. Sanchez wrote:
> >> On Thu, Feb 01, 2007 at 01:16:18PM -0500, Angelo Bertolli wrote:
> >>
> >>> (2) MySQL is a shorter learning curve for new users
> >>>
> >>>
> >> What? In what way? Learning to develop against MySQL is no harder or
> >> easier than learning to develop against PostgreSQL (besides the fact the
> >> people need to be broken of the stupid misconceptions engendered by the
> >> pervasveness of MySQL). The two are just different.
> >>
> >
> > Mostly in letting people do rapid development without requiring a lot of
> > forethought in database design. I know, I know, my argument is a lot
>
> That splatting noise is my hurl splatting onto the opposite wall.
>
> Remind me never to hire you.
Was that 3rd normal form?
> > weaker these days with improvements made to Postgres. Legacy counts too
> > in this case because when there is a big MySQL userbase out there that
> > means more support. But, as you said before, that's not a technical merit.
>
> Are you sure you don't work for Microsoft? Or maybe you're an MCSE?
Nah they use 31st normal form.
> [snip]
> > It doesn't. Your point (and Ron's) about teaching people bad design
> > techniques and bad habits is well-taken. MySQL does not enforce good
> > habits. And if you have good habits or know how to design a database
> > well, then using those techniques actually makes your life easier.
> >
> > But you're coming from an angle where people know or must learn all of
> > that just before they're able to even start. Don't you see how not
> > having to learn that is faster for some people?
>
> It's confirmed. You *are* an MCSE.
nulleth normal form! Of course, lets name a table "field" and in table
"field" name a field "table".
Believe it or not, I've SEEN that. Trying to get someone who did the DB
design *WHY* it isn't good to use a reserved name for an object... or
how about a field called "count" being used as "record-no" except when
it had a duplicate... then the field "sub-count" was used.
Yeah, systems designed during "programming classes" should NOT go into
production... *EVAR*!!!!1!11!
I also asked how they got the DB to accept the names... they forced it
with the exceptions rules to de-reserve reserved names and then renamed
the reserved name.
Hell, I didn't think you could force that. But think of the maintainers
behind the implementers. Imagine the surprise when they looked at the
SQL and saw the normal reserved words in the wrong places, and things in
the reserved word positions being something else?
--
Novell's Directory Services is a competitive product to Microsoft's
Active Directory in much the same way that the Saturn V is a competitive
product to those dinky little model rockets that kids light off down at
the playfield. -- Thane Walkup
Getting started with Postgres or MySQL
Ron Johnson wrote:
> On 02/01/07 20:10, Angelo Bertolli wrote:
>> Roberto C. Sanchez wrote:
>>> On Thu, Feb 01, 2007 at 01:16:18PM -0500, Angelo Bertolli wrote:
>>>
>>>> (2) MySQL is a shorter learning curve for new users
>>>>
>>>>
>>> What? In what way? Learning to develop against MySQL is no harder or
>>> easier than learning to develop against PostgreSQL (besides the fact the
>>> people need to be broken of the stupid misconceptions engendered by the
>>> pervasveness of MySQL). The two are just different.
>>>
>> Mostly in letting people do rapid development without requiring a lot of
>> forethought in database design. I know, I know, my argument is a lot
>
> That splatting noise is my hurl splatting onto the opposite wall.
>
> Remind me never to hire you.
>
>> weaker these days with improvements made to Postgres. Legacy counts too
>> in this case because when there is a big MySQL userbase out there that
>> means more support. But, as you said before, that's not a technical merit.
>
> Are you sure you don't work for Microsoft? Or maybe you're an MCSE?
>
> [snip]
>> It doesn't. Your point (and Ron's) about teaching people bad design
>> techniques and bad habits is well-taken. MySQL does not enforce good
>> habits. And if you have good habits or know how to design a database
>> well, then using those techniques actually makes your life easier.
>
>> But you're coming from an angle where people know or must learn all of
>> that just before they're able to even start. Don't you see how not
>> having to learn that is faster for some people?
>
> It's confirmed. You *are* an MCSE.
>
What a useless and boring discussion you have started Ron!! Do you have
to just be against everyone who thinks MySQL has at least some good
features too? I just dropped the discussion when realized that it goes
nowhere, but if you like to continue, learn a little about DBs. Maybe
you will learn more about what a DB should do and what is not necessary
like date verification which is only an overhead to DB and it is
developers job to check it before inserting it in DB, if you take a DB
course (4 credits would be enough). Believe me, you rally need it.
--
Getting started with Postgres or MySQL
On Fri, Feb 02, 2007 at 05:53:52AM +0100, Danesh Daroui wrote:
>
> What a useless and boring discussion you have started Ron!! Do you have
> to just be against everyone who thinks MySQL has at least some good
> features too? I just dropped the discussion when realized that it goes
> nowhere, but if you like to continue, learn a little about DBs. Maybe
> you will learn more about what a DB should do and what is not necessary
> like date verification which is only an overhead to DB and it is
> developers job to check it before inserting it in DB, if you take a DB
> course (4 credits would be enough). Believe me, you rally need it.
>
Ever use a credit card? I'll bet that somewhere along the way that
transaction gets store into a database. Now, who do you want to be
responsible for making sure that your transaction is valid? The
developer? Ha! I would say that it absolutely positively must be the
data store. It does you no good to say "it is the developer's
responsibility" when you have hundreds, or thousands of developers
accessing your database. What if PayPal or any credit card processing
company put into their SDK for people developing against their systems:
"It is your responsibility to make sure the data is valid. The database
will *not* check this for you and if something goes wrong, it is your
fault." Hint: nobody would have *any* faith in their systems. Your
view is so strongly skewed toward a single-user mindset that it is no
wonder you think it is OK to make the developer responsible. Please go
learn something about real databases and then come back.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
1. The one who should learn something is you, and not me. So, I would
suggest you to learn something basic about database concepts and I don't
care if you ever come back or not!
2. You do not have to involve yourself in any single topic you see in
the forum, specially if you are not asked to do so!
3. If you have used credit card in stone ages (the days that it was
verified by just writing down on papers) it is not my fault! According
to the example you said, if you are dealing with a bank or PayPal, there
is only one center (or web site) that inserts data into database not
anyone from anywhere! There are something called "users" and
"privileges". Search on google to find out more about them.
4. Yes, the code which interacts with database is responsible to be sure
that the data which is going to be inserted to the database is valid.
The database's job to check if the data is "logically" valid. For
example not to allow a character to be written in an integer field.
There are libraries in each programming language to do so. As I said,
MySQL also supports such things and have its own library of functions
which are very powerful, but it is optional and up to the user to use
them. Without it, it would be just overhead to database.
5. Again back to your example, yes, the PayPal web site offers you to
choose the data by using a combo box and not inserting it manually. So
the date which is sent to the database is definitely correct before
inserting. Many banks and economic organizations use MySQL as their
database. I think they do care about the date of their transactions too,
don't ya?
D.
Roberto C. Sanchez wrote:
> On Fri, Feb 02, 2007 at 05:53:52AM +0100, Danesh Daroui wrote:
>
>> What a useless and boring discussion you have started Ron!! Do you have
>> to just be against everyone who thinks MySQL has at least some good
>> features too? I just dropped the discussion when realized that it goes
>> nowhere, but if you like to continue, learn a little about DBs. Maybe
>> you will learn more about what a DB should do and what is not necessary
>> like date verification which is only an overhead to DB and it is
>> developers job to check it before inserting it in DB, if you take a DB
>> course (4 credits would be enough). Believe me, you rally need it.
>>
>>
> Ever use a credit card? I'll bet that somewhere along the way that
> transaction gets store into a database. Now, who do you want to be
> responsible for making sure that your transaction is valid? The
> developer? Ha! I would say that it absolutely positively must be the
> data store. It does you no good to say "it is the developer's
> responsibility" when you have hundreds, or thousands of developers
> accessing your database. What if PayPal or any credit card processing
> company put into their SDK for people developing against their systems:
> "It is your responsibility to make sure the data is valid. The database
> will *not* check this for you and if something goes wrong, it is your
> fault." Hint: nobody would have *any* faith in their systems. Your
> view is so strongly skewed toward a single-user mindset that it is no
> wonder you think it is OK to make the developer responsible. Please go
> learn something about real databases and then come back.
>
> Regards,
>
> -Roberto
>
>
--
Getting started with Postgres or MySQL
On Fri, Feb 02, 2007 at 12:15:31PM +0100, Danesh Daroui wrote:
>
> 1. The one who should learn something is you, and not me. So, I would
> suggest you to learn something basic about database concepts and I don't
> care if you ever come back or not!
Really? What should I learn? I've given specific things where your
knowledge of/experience with databases is clearly deficient. Care to
be specific and refrain from making sweeping statements with not
support?
> 2. You do not have to involve yourself in any single topic you see in
> the forum, specially if you are not asked to do so!
Really? Where is your invitation to participate in this thread? The
original post that started this thread was a request for help getting
started with MySQL or PostgreSQL. I am subscribed to the list and
received the message. That's all the invitiation I needed.
> 3. If you have used credit card in stone ages (the days that it was
> verified by just writing down on papers) it is not my fault! According
> to the example you said, if you are dealing with a bank or PayPal, there
> is only one center (or web site) that inserts data into database not
> anyone from anywhere! There are something called "users" and
> "privileges". Search on google to find out more about them.
Wow. You really don't understand. Anyone can *attempt* to "insert"
data into paypal's database. Yes they have user. Yes they have access
controls. But paypal still takes responsbility for *validating* the
data. Want to take a wild guess at how they do this? Hint: it is in
the database. That is what it is there for.
Since you don't get it, I'll repeat myself. If companies like paypal
(or any company that relies their data actually being *valid*) makes it
the responsibility of the developers to validate data (with no further
checks at the DB), that is equivalent to a civil engineer designing a
bridge and not bothering to compute the loads and stresses on the
materials, since the construction workers will make sure it stays up
anyways. In other fields of engineering, that sort of behavior carries
along with it terms like "professional negligence" and "malpractice."
In those other engineering fields, people who do that sort of thing lose
their licenses and barred from practicing as engineers again.
> 4. Yes, the code which interacts with database is responsible to be sure
> that the data which is going to be inserted to the database is valid.
> The database's job to check if the data is "logically" valid. For
> example not to allow a character to be written in an integer field.
Umm, you are contradicting yourself. Is this the developer's job or the
DB's? Besides, what the hecks is logically valid? To me, February 31
is not "logicall" valid as part of a date. Yet MySQL happily accepts
it. By your own definition, MySQL doesn't even accomplish that minimal
part of the job.
> There are libraries in each programming language to do so. As I said,
> MySQL also supports such things and have its own library of functions
> which are very powerful, but it is optional and up to the user to use
> them. Without it, it would be just overhead to database.
Yes. Because it always better to implement the same duplicate
functionality in 15 random different libraries of varying (and often
dubious) levels of quality and probably little or no optimization
(except for the one or two most popular libraries). Do you have any
training or education in software engineering? I really mean
engineering, not CompSci, or a certificate from DeVry or ITT in Visual
Basic. I mean, do you posses an earned engineering degree? I would
guess not, but I just want to be sure.
> 5. Again back to your example, yes, the PayPal web site offers you to
> choose the data by using a combo box and not inserting it manually. So
> the date which is sent to the database is definitely correct before
I'm sorry, but this is so off base it is not even funny. Every here
about SQL injection? That one single thing is more than ample reason to
make sure that the database properly validates all data. Now, I
understand that SQL injection can also cause other problems which the DB
cannot identify or prevent. But still.
> inserting. Many banks and economic organizations use MySQL as their
> database. I think they do care about the date of their transactions too,
> don't ya?
OK. Name one bank or economic organization that uses MySQL for mission
critical financial data. Just one. I'll wait.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
Danesh Daroui wrote:
> 5. Again back to your example, yes, the PayPal web site offers you to
> choose the data by using a combo box and not inserting it manually. So
> the date which is sent to the database is definitely correct before
> inserting.
This is one of the most pathetic things I've ever heard. Browser-side
data validation (be it with a combo box or JavaScrpit or whatever) is an
absolute no-no because the browser can send back anything it damn well
pleases. Data sent back from browsers must, under all circumstances, be
considered "dirty".
D.
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/02/07 07:54, Dan H. wrote:
> Danesh Daroui wrote:
>
>> 5. Again back to your example, yes, the PayPal web site offers you to
>> choose the data by using a combo box and not inserting it manually. So
>> the date which is sent to the database is definitely correct before
>> inserting.
>
> This is one of the most pathetic things I've ever heard. Browser-side
> data validation (be it with a combo box or JavaScrpit or whatever) is an
> absolute no-no because the browser can send back anything it damn well
> pleases. Data sent back from browsers must, under all circumstances, be
> considered "dirty".
And Danesh lectures *us* on the need for schooling in database design.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFw0jhS9HxQb37XmcRAgUQAJwPFyl6WYMxVmWja8aMm94HDDJlXgCffJWW
6paD86gCP24vwz3CAynLZwM=
=9Aw0
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
Ron Johnson wrote:
> On 02/02/07 07:54, Dan H. wrote:
>> Danesh Daroui wrote:
>
>>> 5. Again back to your example, yes, the PayPal web site offers you to
>>> choose the data by using a combo box and not inserting it manually. So
>>> the date which is sent to the database is definitely correct before
>>> inserting.
>> This is one of the most pathetic things I've ever heard. Browser-side
>> data validation (be it with a combo box or JavaScrpit or whatever) is an
>> absolute no-no because the browser can send back anything it damn well
>> pleases. Data sent back from browsers must, under all circumstances, be
>> considered "dirty".
>
> And Danesh lectures *us* on the need for schooling in database design.
>
Not us my friend, you!
--
Getting started with Postgres or MySQL
Danesh Daroui wrote:
> 5. Again back to your example, yes, the PayPal web site offers you to
> choose the data by using a combo box and not inserting it manually. So
> the date which is sent to the database is definitely correct before
> inserting.
This is one of the most pathetic things I've ever heard. Browser-side
data validation (be it with a combo box or JavaScrpit or whatever) is an
absolute no-no because the browser can send back anything it damn well
pleases. Data sent back from browsers must, under all circumstances, be
considered "dirty".
D.
Getting started with Postgres or MySQL
Danesh Daroui wrote:
> 5. Again back to your example, yes, the PayPal web site offers you to
> choose the data by using a combo box and not inserting it manually. So
> the date which is sent to the database is definitely correct before
> inserting.
This is one of the most pathetic things I've ever heard. Browser-side
data validation (be it with a combo box or JavaScrpit or whatever) is an
absolute no-no because the browser can send back anything it damn well
pleases. Data sent back from browsers must, under all circumstances, be
considered "dirty".
D.
Getting started with Postgres or MySQL
Ron Johnson wrote:
> That splatting noise is my hurl splatting onto the opposite wall.
>
> Remind me never to hire you.
>
> Are you sure you don't work for Microsoft? Or maybe you're an MCSE?
>
> It's confirmed. You *are* an MCSE.
For that I may implement my next database with MySQL (instead of
Postgres like planned), just to spite you.
--
Angelo Bertolli
Please remove my email address from your post when replying
[Tech http://bitfreedom.com | Gaming http://heroesonly.com]
--
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/01/07 23:41, Angelo Bertolli wrote:
> Ron Johnson wrote:
>> That splatting noise is my hurl splatting onto the opposite wall.
>>
>> Remind me never to hire you.
>>
>> Are you sure you don't work for Microsoft? Or maybe you're an MCSE?
>>
>> It's confirmed. You *are* an MCSE.
>
> For that I may implement my next database with MySQL (instead of
> Postgres like planned), just to spite you.
I'll live.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwtmKS9HxQb37XmcRAj6oAJ44VWw4+OsuLf4HCB/rTi3FrSVZ5wCePxzC
BFh91a5aU/SrQB4Bd4u3rnQ=
=XhY6
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Thu, Feb 01, 2007 at 09:10:27PM -0500, Angelo Bertolli wrote:
>
> But you're coming from an angle where people know or must learn all of
> that just before they're able to even start. Don't you see how not
> having to learn that is faster for some people?
>
Ever have to share the road with someone who just decided to start
driving without actually learning anything about it? What if the vast
majority of the motorists on the road did that? That is what we are
dealing with when people take that atitude. It is setting back software
development as a profession and likely contributing significantly to
making the Internet as a whole a much less pleasant place to visit.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
On Wed, Jan 31, 2007 at 02:54:01PM -0900, Joshua J. Kugler wrote:
>
> In that same document, they give the reason for doing so:
>
> "The reason for using the preceding rules in non-strict mode is that we can't
> check these conditions until the statement has begun executing. We can't just
> roll back if we encounter a problem after updating a few rows, because the
> storage engine may not support rollback. The option of terminating the
> statement is not that good; in this case, the update would be ???half done,???
> which is probably the worst possible scenario. In this case, it's better
> to ???do the best you can??? and then continue as if nothing happened."
>
I'm sorry, but "our database can't always handle transactions" is not a
valid excuse for allowing bogus data.
> And also provide a way (from 5.0.2 on) of enabling the "traditional" strict
> behavior. So, with one config option, MySQL will now reject all invalid data
> (providing you're using transactional engines, for reasons described above).
>
Please read this:
http://developers.slashdot.org/comments.pl?sid=219722&cid=17824340
Now, tell me seriously that it is valid for any database to treat data
integrity as an *optional* feature.
> As for your assertion that those who spec MySQL don't know what they're doing,
> I do believe the techs that work at MySQL are some pretty sharp cookies. I
> think they know what they're doing, and I'm sure they know how to either
> enable the above config option, or check their data before it gets to their
> database.
>
So what? Microsoft has some absolutely brilliant architects, engineers
and developers. They are still polishing a turd.
> All products have their gotchas. One should be familiar with the product
> against which one is writing, or weird things will bite you down the road.
>
Boy, that's an understatement.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
Roberto C. Sanchez wrote:
> On Wed, Jan 31, 2007 at 02:54:01PM -0900, Joshua J. Kugler wrote:
>
>> In that same document, they give the reason for doing so:
>>
>> "The reason for using the preceding rules in non-strict mode is that we can't
>> check these conditions until the statement has begun executing. We can't just
>> roll back if we encounter a problem after updating a few rows, because the
>> storage engine may not support rollback. The option of terminating the
>> statement is not that good; in this case, the update would be ???half done,???
>> which is probably the worst possible scenario. In this case, it's better
>> to ???do the best you can??? and then continue as if nothing happened."
>>
>>
> I'm sorry, but "our database can't always handle transactions" is not a
> valid excuse for allowing bogus data.
>
>
>> And also provide a way (from 5.0.2 on) of enabling the "traditional" strict
>> behavior. So, with one config option, MySQL will now reject all invalid data
>> (providing you're using transactional engines, for reasons described above).
>>
>>
> Please read this:
>
> http://developers.slashdot.org/comments.pl?sid=219722&cid=17824340
>
> Now, tell me seriously that it is valid for any database to treat data
> integrity as an *optional* feature.
>
>
>> As for your assertion that those who spec MySQL don't know what they're doing,
>> I do believe the techs that work at MySQL are some pretty sharp cookies. I
>> think they know what they're doing, and I'm sure they know how to either
>> enable the above config option, or check their data before it gets to their
>> database.
>>
>>
> So what? Microsoft has some absolutely brilliant architects, engineers
> and developers. They are still polishing a turd.
>
>
>> All products have their gotchas. One should be familiar with the product
>> against which one is writing, or weird things will bite you down the road.
>>
>>
> Boy, that's an understatement.
>
> Regards,
>
> -Roberto
>
>
Maybe MySQL is not the best database engine in the world but it is one
the best engines. I have worked on MySQL for several years and from four
years ago I have started to develop my own database engine inspired by
MySQL. During development of my own database engine (BromeliaSQL) I
realized the magical techniques which have been used in MySQL which are
unique. For example MySQL was (and maybe is) the only database engine
which allows you to read and write to a table which has been indexed
even by using B-Tree which is the most complex structure, at the same time.
About allowing corrupted data, it is not the responsibility of database
engine to verify if the data is valid or not since the database engine
only "Manages" data and not validate. Although, MySQL have a very very
powerful library of functions to validate and generate and validate date
and kind in any possible format.
D.
--
Getting started with Postgres or MySQL
On Thu, Feb 01, 2007 at 06:18:03AM +0100, Danesh Daroui wrote:
>
> Maybe MySQL is not the best database engine in the world but it is one
> the best engines. I have worked on MySQL for several years and from four
> years ago I have started to develop my own database engine inspired by
> MySQL. During development of my own database engine (BromeliaSQL) I
> realized the magical techniques which have been used in MySQL which are
> unique. For example MySQL was (and maybe is) the only database engine
> which allows you to read and write to a table which has been indexed
> even by using B-Tree which is the most complex structure, at the same time.
That's nice.
> About allowing corrupted data, it is not the responsibility of database
> engine to verify if the data is valid or not since the database engine
> only "Manages" data and not validate. Although, MySQL have a very very
> powerful library of functions to validate and generate and validate date
> and kind in any possible format.
>
I'm sorry, but this is pure crap. There is no way that anyone can
convince me that inserting 2007-02-31 or even 0000-00-00 into a column
of type DATE is even remotely permissible. What fantasy land do people
live in where such dates are valid?
I simply don't buy that. It is obvious that you do not work with
databases in a multiuser environment. Imagine this. You are running a
huge payment processing system. There a number of client applications
which have been developed to interface to the database backend. Now,
what happens when someone creates a client with a bug that tries to
insert payments dated February 31st? MySQL says, OK, go for it. What
about all the rest of the users who actually depend on the data to be
correct and consistent?
What about management, who expect to be able to generate meaningful
reports? Think about it. How meaningful is it to report on events that
could not have happened according to their dates?
I could go on. Like I said, if you are running a phpBB or some dinky
little application where you don't care about your data and/or you don't
need true multiuser support, then MySQL works fine. I still think it is
a bad idea to use it in those situations, but it will work. What I
don't get is why people are so quick to stand up and defend MySQL even
though it has so many shortcomings.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/31/07 23:18, Danesh Daroui wrote:
> Roberto C. Sanchez wrote:
>> On Wed, Jan 31, 2007 at 02:54:01PM -0900, Joshua J. Kugler wrote:
>>
[snip]
> Maybe MySQL is not the best database engine in the world but it is one
> the best engines. I have worked on MySQL for several years and from four
> years ago I have started to develop my own database engine inspired by
> MySQL. During development of my own database engine (BromeliaSQL) I
> realized the magical techniques which have been used in MySQL which are
> unique. For example MySQL was (and maybe is) the only database engine
> which allows you to read and write to a table which has been indexed
> even by using B-Tree which is the most complex structure, at the same time.
ROTFLMAO. You have *got* to be kidding.
*Every* RDBMS worth it's salt lets you concurrently access b-tree
indexes.
> About allowing corrupted data, it is not the responsibility of database
> engine to verify if the data is valid or not since the database engine
> only "Manages" data and not validate. Although, MySQL have a very very
> powerful library of functions to validate and generate and validate date
> and kind in any possible format.
What a single-user attitude. Here's a nickel kid, go buy yourself
some VT220s.
It's always the app developer's responsibility to make sure that he
inserts clean data.
OTOH, any DBA worth his/her salt will *not* trust code monkeys to
find their arses with both hands, a map and flashlight. Thus, we
put up our own defenses against incompetent boobs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwYFWS9HxQb37XmcRAoA0AKDFmwwSuqO8+VBESeaEfBNx5mw3qQCeLW7b
bS6Ibb3nDO39EzAK7BmXTjY=
=OHw5
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Thursday, 01.02.2007 at 06:18 +0100, Danesh Daroui wrote:
> About allowing corrupted data, it is not the responsibility of database
> engine to verify if the data is valid or not since the database engine
> only "Manages" data and not validate.
It depends what you mean by 'validate'. The database ought, at least,
to return the same value that was INSERTed. Or, if it is not able to do
so, it should raise an error on the INSERT.
Look! This is MySQL 5:
>> mysql> create table foo(a date);
>> Query OK, 0 rows affected (0.05 sec)
>>
>> mysql> describe foo;
>> +-------+------+------+-----+---------+-------+
>> | Field | Type | Null | Key | Default | Extra |
>> +-------+------+------+-----+---------+-------+
>> | a | date | YES | | NULL | |
>> +-------+------+------+-----+---------+-------+
>> 1 row in set (0.00 sec)
>>
>> mysql> insert into foo values('2007-02-31');
>> Query OK, 1 row affected, 1 warning (0.00 sec)
>>
>> mysql> select * from foo;
>> +------------+
>> | a |
>> +------------+
>> | 0000-00-00 |
>> +------------+
>> 1 row in set (0.00 sec)
It generates a warning but still inserts the record. This strikes me as
dangerous, especially as the default behaviour of 'BEGIN' and 'COMMIT'
wrapped around the above *still* inserts the record. I seem to remember
that slightly older MySQL versions returned '2007-03-03' instead in the
above circumstances, which was ludicrous; at least that has been fixed.
The same test under PostgreSQL 8.1:
>> pg=# create table foo(a date);
>> CREATE TABLE
>> pg=# \d foo
>> Table "public.foo"
>> Column | Type | Modifiers
>> --------+------+-----------
>> a | date |
>>
>> pg=# insert into foo values('2007-02-31');
>> ERROR: date/time field value out of range: "2007-02-31"
>> pg=# select * from foo;
>> a
>> ---
>> (0 rows)
Seems like very sensible behaviour to me.
Dave.
--
Please don't CC me on list messages!
...
Dave Ewart - - jabber:
All email from me is now digitally signed, key from http://www.sungate.co.uk/
Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92
Getting started with Postgres or MySQL
Roberto C. Sanchez wrote:
> On Wed, Jan 31, 2007 at 02:54:01PM -0900, Joshua J. Kugler wrote:
>
>> In that same document, they give the reason for doing so:
>>
>> "The reason for using the preceding rules in non-strict
>> mode is that we can't check these conditions until the
>> statement has begun executing. We can't just roll back if
>> we encounter a problem after updating a few rows, because
>> the storage engine may not support rollback. The option
>> of terminating the statement is not that good; in this
>> case, the update would be ???half done,??? which is
>> probably the worst possible scenario. In this case, it's
>> better to ???do the best you can??? and then continue as
>> if nothing happened."
>>
>>
> I'm sorry, but "our database can't always handle
> transactions" is not a valid excuse for allowing bogus
> data.
Does this mean that Mysql isn't really a DB, but is in fact just a
front-end, translating SQL statements into commands to the real DB?
--
Best wishes,
Max Hyre
Getting started with Postgres or MySQL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/01/07 07:31, Max Hyre wrote:
> Roberto C. Sanchez wrote:
>> On Wed, Jan 31, 2007 at 02:54:01PM -0900, Joshua J. Kugler wrote:
>>> In that same document, they give the reason for doing so:
>>> "The reason for using the preceding rules in non-strict
>>> mode is that we can't check these conditions until the
>>> statement has begun executing. We can't just roll back if
>>> we encounter a problem after updating a few rows, because
>>> the storage engine may not support rollback. The option
>>> of terminating the statement is not that good; in this
>>> case, the update would be ???half done,??? which is
>>> probably the worst possible scenario. In this case, it's
>>> better to ???do the best you can??? and then continue as
>>> if nothing happened."
>>>
>>>
>> I'm sorry, but "our database can't always handle
>> transactions" is not a valid excuse for allowing bogus
>> data.
>
> Does this mean that Mysql isn't really a DB, but is in fact just a
> front-end, translating SQL statements into commands to the real DB?
MySQL with the MyISAM data store is *exactly* what you describe.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFwkKmS9HxQb37XmcRAgVHAKDBgwiyVWcCSl7jtMmQOSwJm/atnQCffXyS
4dkRg5saUcZFFEddkHGhfNw=
=EwZz
-----END PGP SIGNATURE-----
--
Getting started with Postgres or MySQL
On Wed, Jan 31, 2007 at 01:50:14PM -0900, Joshua J. Kugler wrote:
> On Wednesday 31 January 2007 13:19, Roberto C. Sanchez wrote:
> > > How do I get started here?
> >
> > First. Please do not use MySQL, unless you don't care about your data.
>
> Please stop this MySQL vs. PostgreSQL bashing. Each has their place. If
I am not bashing. MySQL's place is places where people don't care about
their data. Full stop. End of story.
> users of MySQL don't care about their data, then I guess Bayer, Colgate,
> Ensembl Genome Browser, Genome Sciences Center (GSC), The Institute for
> Genomic Research, AIRBUS/EADS, Australian Department of Defence, Los Alamos
> National Laboratory, Ministère de la Defense (France), CraigsList, Google,
> iStockphoto, PriceGrabber, Ticketmaster, Yahoo!, CERN - The ATLAS Experiment
> at LHC, Bank of Canada, Lloyds TSB Bank, Linden Lab (Second Life), California
> Air Review Board, Department of Homeland Security, NASA, NASA Jet Propulsion
> Lab (JPL), DaimlerChrysler, Epson, Chicago Sun-Times, Slashdot, Dell,
> Hewlett-Packard, Novell, Siemens, Sun Microsystems, Symantec, Texas
> Instruments, AT&T Wireless, Cable & Wireless, Cisco Systems, Nokia, Lufthansa
> Systems, Orbitz, 37signals, del.icio.us, Digg, Facebook, Feedburner,
> Feedster, Flickr, Freshmeat.net, Technorati, Wikipedia, and YouTube (among
> many others, see http://www.mysql.com/customers/ ) don't care about their
> data. These are companies that live and die by their data, I'm sure they
> care about it very much. Each has their place. MySQL has come a long way
> since its 3.23 days. Read the manual. Form your own opinions. A lot has
> changed.
>
Umm. Maybe they all use MySQL as the backend for phpBB or something
like that. I would like to see proof that some bank (since you list a
few) is actually using MySQL as the backend for a *real* core system of
theirs. Hint: you won't find one. Just because LANL, NASA and some
banks bought some MySQL licenses doesn't mean that they are using it to
host their mission critical data. The US Army, Air Force, Navy and
Marines buy plenty of Dodge Stratus and similar vehicles. That does not
make them suitable substitutes for tanks, airplanes or ships.
As I said before, MySQL has its place where you don't care about your
data.
Regards,
-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com
Getting started with Postgres or MySQL
On Fri, Feb 02, 2007 at 01:26:13PM +0100, Danesh Daroui wrote:
> Roberto C. Sanchez wrote:
> >
> >Really? What should I learn? I've given specific things where your
> >knowledge of/experience with databases is clearly deficient. Care to
> >be specific and refrain from making sweeping statements with not
> >support?
> >
>
> You should learn lots of things. DB is one of them.
>
Again, evading the question. I know DBs. Now, in what *specific* areas
do you feel I am deficient?
> >
> >Really? Where is your invitation to participate in this thread? The
> >original post that started this thread was a request for help getting
> >started with MySQL or PostgreSQL. I am subscribed to the list and
> >received the message. That's all the invitiation I needed.
> >
> >
>
> Yeah really! Except this one, I don't like to see any answer from you to
> my posts!
>
Sorry. Public place, public list. If you don't want to see my replies,
you are more than welcome to killfile me or simply unsibscribe.
>
> >Since you don't get it, I'll repeat myself. If companies like paypal
> >(or any company that relies their data actually being *valid*) makes it
> >the responsibility of the developers to validate data (with no further
> >checks at the DB), that is equivalent to a civil engineer designing a
> >bridge and not bothering to compute the loads and stresses on the
> >materials, since the construction workers will make sure it stays up
> >anyways. In other fields of engineering, that sort of behavior carries
> >along with it terms like "professional negligence" and "malpractice."
> >In those other engineering fields, people who do that sort of thing lose
> >their licenses and barred from practicing as engineers again.
> >
Hmm. No witty response to this?
> >
> >Umm, you are contradicting yourself. Is this the developer's job or the
> >DB's? Besides, what the hecks is logically valid? To me, February 31
> >is not "logicall" valid as part of a date. Yet MySQL happily accepts
> >it. By your own definition, MySQL doesn't even accomplish that minimal
> >part of the job.
> >
Hmm. No witty response here either.
> >
> >Yes. Because it always better to implement the same duplicate
> >functionality in 15 random different libraries of varying (and often
> >dubious) levels of quality and probably little or no optimization
> >(except for the one or two most popular libraries). Do you have any
> >training or education in software engineering? I really mean
> >engineering, not CompSci, or a certificate from DeVry or ITT in Visual
> >Basic. I mean, do you posses an earned engineering degree? I would
> >guess not, but I just want to be sure.
> >
> >
>
> I am sure my level of knowledge is higher than you. Keep your high
> school diploma. But don't be upset, this forum need uneducated people too.
>
Not exactly a witty response, but at least ro responded something. Of
course, you still avoided the question.
> >
> >I'm sorry, but this is so off base it is not even funny. Every here
> >about SQL injection? That one single thing is more than ample reason to
> >make sure that the database properly validates all data. Now, I
> >understand that SQL injection can also cause other problems which the DB
> >cannot identify or prevent. But still.
> >
> >
>
> Yeah, you have to be sorry! I will think about it to forgive you or not! :)
>
Don't worry. My foriveness from God an