The relational databases such as
MySQL, Microsoft SQL Server and Oracle, have a much more logical structure in
the way that it stores data. Tables can be used to represent real world
objects, with each field acting like an attribute. For example, a table called
books could have the columns title, author and ISBN, which describe the details
of each book where each row in the table is a new book.
The "relation" comes from
the fact that the tables can be linked to each other, for example the author of
a book could be cross-referenced with the authors table (assuming there was
one) to provide more information about the author. These kind of relations can
be quite complex in nature, and would be hard to replicate in the standard
flat-file format.
One major advantage of the relational
model is that, if a database is designed efficiently, there should be no
duplication of any data; helping to maintain database integrity. This can also
represent a huge saving in file size, which is important when dealing with
large volumes of data. Having said that, joining large tables to each other to
get the data required for a query can be quite heavy on the processor; so in
some cases, particularly when data is read only, it can be beneficial to have
some duplicate data in a relational database.
Relational databases also have
functions "built in" that help them to retrieve, sort and edit the
data in many different ways. These functions save script designers from having
to worry about filtering out the results that they get, and so can go quite
some way to speeding up the development and production of web applications.