0% found this document useful (0 votes)
3 views4 pages

Databases & File Handling Notes

A database is a structured collection of data that ensures consistency and prevents duplication by allowing changes to be made once. It utilizes various data types and requires a primary key for unique identification of records. SQL is the standard language for querying databases, while file handling allows for permanent data storage and accessibility across programs.

Uploaded by

axmatsveru
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Databases & File Handling Notes

A database is a structured collection of data that ensures consistency and prevents duplication by allowing changes to be made once. It utilizes various data types and requires a primary key for unique identification of records. SQL is the standard language for querying databases, while file handling allows for permanent data storage and accessibility across programs.

Uploaded by

axmatsveru
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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).

You might also like