They use mySQL only for their searches since google appliance servers use mySQL, your right that he will get nonwhere near those giants.. but since youa re storing files(mp3) it might be different from text and indexing, so I dont even suggest you store the mp3's in the db, but in another secure way, or you can use Oracle DBs which are made for accounting purposes but Ive heard many Fortune companies use them for Data backup(bin files)

**Off Topic question**
Has anyone ever seen an error on google? Like a code error or any kind of bugs? LOL amazing isnt it 🙂

    Thanks everyone. I guess I will stick with MySQL since I am too involved in it to learn a new language. We don't have much capital so I don't expect to hit 1000 gigs within the first 6 months but I am sure within a year we will, and by then we should have enough profits to hire proffesionals to make everything super secure and fast.

    What we are probably going to do is have a seperate site for the download that is a sub-site of our own. Customer enters their product key and the download starts. I don't forsee hackers or people trying to screw with the system in the first year, but once we get it going that will definantly be a priority.

    So i guess I will just hide the URL in some encryption so they can never visit it twice without the product key. It shouldn't be a problem for a while. Sure there will be some things here and there but we are going to be selling local music from all around so I think we will be less of a target or hackers. Not saying it won't happend but there should be a much smaller chance. And once it becomes a problem we should have enough profit to do something about it proffesionaly.

      4 days later

      You might also be interested to know that MySQL just came out with a clustering solution ...

        If you're gonna do accounting and such, I'd recommend Postgresql.

        PHPBuilder runs on MySQL, but the .org and .info domains run on PostgreSQL.

        MySQL is not a good choice for financial / accounting because it leaves far too much work to be done in the code not in the database, where referential integrity and data constraints should be.

        Also, Postgresql scales better under heavy parallel load. Test it against MySQL with 100+ connections (both properly configured on properly configured machines.)

        For a list of reasons you may not want to use MySQL for things like accounting, see:

        http://sql-info.de/mysql/gotchas.html

          Originally posted by Sxooter

          MySQL is not a good choice for financial / accounting because it leaves far too much work to be done in the code not in the database, where referential integrity and data constraints should be.

          Though PostgreSQL has the (major) advantage of triggers and stored procedures, MySQL can also be used with foreign keys to maintain data integrity ... though it isn't the default behaviour. You have to specify the the InnoDB table handler explicity.

            I'm pretty familiar with the innodb table type.

            The problem is that MySQL will allow me to define a table type incorrectly and never corrects me.

            create table main (columns go here) with type=inoodb

            and it will never throw an error, even though I spelled it wrong. It will then let me declare fks to that table and never complain.

            the first complaint / warning I'll get is when I try to roll back a transaction and it informs me that some of my tables aren't the right type.

            Now, if I could throw a switch that forced innodb and only innodb tables to be used, that would fix the problem for me. But better error handling here would be nice too. I.e. if you try to declare a table of type inoodb it should error out saying unsupported table type, not just blindly creating a MyISAM table and using that.

            But the real issue is lack of things like check constraints and bounds checking. On most flavors of MySQL, this means things like:

            mysql> create table test (id int4);
            Query OK, 0 rows affected (0.09 sec)

            mysql> insert into test values (123456789012302);
            Query OK, 1 row affected (0.00 sec)

            mysql> select * from test;
            +------------+
            | id |
            +------------+
            | 2147483647 |
            +------------+
            1 row in set (0.02 sec)

            I certainly didn't insert the number 2147483647 into that field, but MySQL put it in for me because it thought that was what I wanted. no warning, no error, nothing, just the wrong data.

            In a financial / accounting / ordering system, where getting the right number counts, this is just plain wrong. Plus, it does other weird, non-spec things, like:

            mysql> create table test (id1 int, id2 int);
            Query OK, 0 rows affected (0.00 sec)

            mysql> insert into test values (12,7);
            Query OK, 1 row affected (0.00 sec)

            mysql> select id1/id2 from test;
            +----------+
            | id1/id2 |
            +----------+
            | 1.71 |
            +----------+
            1 row in set (0.00 sec)

            when the answer should be 1. It's integer math. Why did I get a fractional portion. In any SQL compliant database I get back the correct answer.

            I don't trust MySQL for math. If there's this many glaring errors that are this easy to find, how many are hiding in seldom used code paths that will jump up to bite my butt later on with rounding errors that cause my accounting to have slowly increasing errors margins.

            While triggers and stored procs in PostgreSQL are a great thing, its tendency to "get things right" is a far greater advantage. I don't spend my nights wondering if my data is slowly getting corrupted because of inaccuracies in my database.

              I don't trust MySQL for math.

              I would shorten this and say simply "I don't trust MySQL"

              Having a hack like safe_mysqld to handle oopses does not instill trust - not crashing does.

              Having cleanup tools like myisamchk to handle corruption does not instill trust - not corrupting does.

                I would shorten this and say simply "I don't trust MySQL"

                whatever...our MySQL server holds a 12GB database and handles an average of 290 queries/s without any notable server load...it hasn't ever made a boo boo...
                in fact MySQL is used for applications handling several terrabytes of data...
                your not a little biased are you ?
                I hope I didn't just start one of those (vi vs. Emacs|Gnome vs. KDE|PHP vs. Java) like flamewars
                regards

                  I think what Sxooter is saying is that you need to be aware of the limitations on the environments that you have choosen., It doesn't make your choice bad (or good) unless that choice falt out doesn't meet the designed needs of the application.

                  Where you need true foriegn key support or stored procs, then mySQL is not the best choice. for other application it may be...

                  Having a secure powerful backend like oracle still isn't going to make a bit of difference if the other elements in the application can't handle the load. If there are holes in the webserver or middle tier app (the php code) that can be exploited or even something as limiting as a machine with not enough memory, have a large expensive db is not going to squat.

                  As previously mentioned, I too would recommend against storing the mp3s in the db. Dbs simply don't store blobs in the table, they store a pointer to a virtual file with the bolb element inside it. In your case a pointer to the file, and the filesystem storage make more sense.

                  my 2 cents

                    Originally posted by drag0n
                    **Off Topic question
                    Has anyone ever seen an error on google? Like a code error or any kind of bugs? LOL amazing isnt it 🙂


                    Off Topic answer**
                    Yes, I have 😃

                      Originally posted by poison
                      whatever...our MySQL server holds a 12GB database and handles an average of 290 queries/s without any notable server load...it hasn't ever made a boo boo...

                      How would you know? If you put data in an int field and overflowed it, you'd never know. I'm not saying it has made mistakes, it likely hasn't. but you just can't be sure, since MySQL doesn't error out in conditions which the SQL spec clearly states it should.

                      Also, 290 queries a second means little without context. What % of those queries are updates / inserts versus selects? How much data are being moved about? How many fk/pk relationships are being updated / maniuplated etc...? I can run 220 transactions per second on my PostgreSQL server, and it's STILL responsive, and all 220 of those transactions are update/insert/delete transactions, i.e. every one of them is writing to the database. The databases it handles aggregate up to about 6 gigs of data.


                      in fact MySQL is used for applications handling several terrabytes of data...
                      your not a little biased are you ?
                      I hope I didn't just start one of those (vi vs. Emacs|Gnome vs. KDE|PHP vs. Java) like flamewars
                      regards

                      I'm very biased, but biased because I've tested both under heavy parallel load. My testing shows MySQL having a non-linear increase in response time as the number of writers increases, on both innodb and myisam table types, though not as bad on innodb as on myisam, which just can't handle any real parallel write load.

                      I'd like a list of the applications handling terabytes of data for both databases and see what kind of data it is.

                      I don't trust ANY database enough to run without backups etc... but I trust Postgresql much more than MySQL. Try this on both databases:

                      initiate 200 parallel threads each running 10000 transactions (use innodb tables in MySQL) and in the middle of the run, just pull the plug. See which server comes back up. Make sure you're either using SCSI, or using IDE with write cache disabled (fsync on IDE in linux and BSD are both broken).

                      I think Bastien got it right. Know the limitations / bugs / etc... of whatever piece of software you're using, and choose the one that causes you the least trouble in the long run for maintenance and reliability.

                      I trust MySQL and PostgreSQL both. I trust PostgreSQL to handle massive parallel write load with aplomb, and I trust MySQL to be a good data store for things like content management / full text indexed stuff. Different tools, different strengths.

                        Write a Reply...