Files Versus Databases


There are two ways, files or databases, to store the data in computers.

File
It is a collection of data or information that has a name, called the filename. Almost all information stored in a computer must be in a file, which has these characteristics: Additionally, a file system may associate other information with a file, such as permission bits or other file attributes; timestamps for file creation, last revision, and last access, and other kinds of magic.

Database
It is a collection of information organized in such a way that a computer program can quickly select desired pieces of data.

To access information in a database, you need a database management system (DBMS), which is a collection of programs that enables you to enter, organize, and select data in a database. Traditional databases are organized by fields, records, and files.
customer
cid cname city discnt
c001 TipTop Duluth 10.00
c002 Basics Dallas 12.00
c003 Allied Dallas 8.00
c004 ACME Duluth 8.00
c006 ACME Kyoto 0.00

For the example of the above customer table, it contains a list of records, each of which consists of four fields: cid, cname, city, and discnt.


Review: Databases
    Which statement is NOT true about databases?

      Database allows a computer program to quickly select desired pieces of data.
      Database is more flexible than files for developers to use.
      Database management system (DBMS) is used to control databases.
      Traditional databases are organized by fields, records, and files.
        Result: