Databases:
A database is a structured collection of data that allows people to extract information in a
way that meets their needs
Why are databases useful? Databases prevent problems occurring because:
» if any changes or additions are made it only has to be done once – data is consistent
» the same data is used by everyone
» data is only stored once in relational databases which means no data duplication
2 Basic data types
There are six basic data types that you need to be able to use in a database:
» text/alphanumeric
» character
» Boolean
» integer
» real
» date/time
Primary keys
As each record within a table contains data about a single item, person, or event, it is
important to be able to uniquely identify this item.
- A field that uniquely identifies the item is called the primary key.
- A field that is a primary key must contain data values that are never repeated in the
table.
SQL (Structured Query Language (SQL))
- is the standard query language for writing scripts to obtain useful information from a
database.
- SQL is used to obtain information from single-table databases.
- This will provide a basic understanding of how to obtain and display only the
information required from a database.
File handling
Purpose of storing data in a file
- Data saved to a file it is stored permanently.
- Data stored in a file can thus be accessed by the same program at a later date or
accessed by another program.
- Data stored in a file can also be sent to be used on other computer(s).