Home: Perl Programming Help: Intermediate:
Comparing databases.



patk
Deleted

Feb 9, 2000, 3:12 PM


Views: 5637
Comparing databases.

What are some advantages of using an SQL like database to a flat-file database? I don't know too much about SQL but I am not aware
of what all the hype is about.


Cure
User

Feb 9, 2000, 9:07 PM


Views: 5637
Re: Comparing databases.

Hi:

SQL stands for Structured Query Language. SQL is used to communicate with a database.

The basic difference between the two is that SQL is much MORE powerful, designed for MANY more records. It can store and retrieve large amounts of data alot faster than a flat file.


Cure


patk
Deleted

Feb 10, 2000, 5:16 PM


Views: 5637
Re: Comparing databases.

Cool. Do you have an example
of a simple SQL database using
Perl?


RayStreet
Deleted

Feb 11, 2000, 1:20 PM


Views: 5637
Re: Comparing databases.

Have a look at the mysql posting from 3rd Feb. MySQL is free for personal use. It really depends on how many records/rows you need in your file/table. If you only need 50 then a flat file would proably be OK but you can obviously only access a flat file sequentially. But 50 records isn't many. Updating a flat file is fairly easy - you read the old file in and create a new file with you new data then you rename the new file to the name of your old file and there you are. But an SQL database lets you have thousands/millions of records.

The hard part is deciding when a flat file is too slow and a real database is needed (loads of books have been written on this).

Remember also that a flat file is easy to administer. A real database is usually trickier (but is not a big deal when you've sorted out what you want to do.


Ray