databases

=**DATABASES**=

Database management software are programs that manipulate, store, sort and report on large quantities of data. Therefore it is an organised collection of data that is used to manage large quantities of information such as:
 * Recording transactions
 * Eg for bank transfers, when deposits withdrawals are made or when bank cards are used.
 * A TPS, Transaction processing system, used for the recording of sales.
 * Summarising large amounts of data
 * Eg. Management Information system, Used by middle management to look at specific parts of data which has been summarised for them. For example a total loss, prophet, net profit, tax etc.

Databases are used for things such as:
 * DATABASE USES**
 * Mass Mailing
 * When large amounts of Things like cheques, renewable notices, membership notifications, gas bills etc, need to be sent out.
 * This would be used, for example by a video rental store, when, every week they look at the overdue video list and decide to mail a letter to each member with an overdue movie; to do this the company uses the report function of a database to print out all the required letters at one time.
 * Personal Records
 * This could be for a school’s student records, an attendance record in order to keep track of where students are in the day (e.g. the staff role taken at the beginning of every class), etc.
 * Network management
 * This is used for things like storing network or internet login names and passwords, network privileges and restrictions, also things like at our school internet credit and printing credit.
 * It could be used to share knowledge across the internet, it is used to assist with:
 * FAQs
 * Wikis
 * Knowledgebases
 * It is used in booking systems for things like
 * Airlines
 * Doctor’s appointments
 * Restaurant bookings
 * Etc.


 * ADVANTAGES OF DATABASES**
 * Can automate many tasks
 * Producing reports
 * Calculate totals
 * Can create an output for each record entered
 * Eg. Certificates, invoices etc
 * Can be used by many people simultaneously over a network
 * Can used a hierarchical structure of security allowing different users access different parts dependent on their needs.
 * Can make connections between different data sources.
 * Eg when using queries you can see specific parts of the data, that are relevant to one topic.
 * Can store a wide variety of different types of data, from text to multimedia files.
 * Can calculate new information from existing data


 * DISADVANTAGES OF DATABASES**
 * Databases can take considerable time and effort to be developed
 * As the database expands, the time it takes to locate specific parts of the data takes longer
 * If it affected by disastrous data loss, because all of the information is in one location, one accident can cause the loss of the whole database including its data.
 * It makes it easier to steal the data because it is all in one place
 * Needs strong security to protect it from unauthorized access
 * It is hard to change table once it has data being stored in it

A database structure is made up of :
 * DATABASE STRUCTURE**
 * Fields (columns)
 * Records (rows, a collection of fields)
 * Tables (a collection of individual records)
 * Customer ID || Customer Name || Age || Fav Colour || Address ||
 * 1 || Callum || 17 || Green || 123 Fake Street ||
 * 2 || Luke || 13 || Blue || 122 Fake Street ||
 * 3 || Nicholas || 11 || Red || 133 Fake Street ||

> Database Processing
 * The //** properties **//of the fields needs to be defined before data is entered
 * A **// flat-file database //**must have at least one table
 * A //** relational database **//uses a number of linked tables
 * EG in a school they may have a table that involves a list of their students, this then may have a connection that links to a table that includes their teacher.
 * In order for this to work a field called a primary key must be entered. This key is an unique identifier of which the data will be sorted by. (this key is usually made through the use of an auto number data type)

Relational databases contain a number of  linked tables. Relational databases are superior in design and functionality to flat-file databases because, in theory, they contain no  redundant (duplicate) data. This makes storage of data more effective and retrieval of data more efficient. Each table must contain a  primary key which makes each record in the table unique . **For example**, a **Customer Id** is unique whereas a **Customer Surname** may not be unique. Tables are then linked to other tables using one of their primary keys in a  one-to-one ,  one-to-many or many-to-one relationship.
 * RELATIONAL DATABASES**



Some of the most common functions of databases like Microsoft Access are:
 * DATABASE FUNCTIONS**
 * //** Queries **//- Filtering the contents of tables using selection criteria
 * **// Forms //**- Data entry forms that allow for ease of use
 * //** Reports **//- Detailed, Summary, Aggregated or Exception reports collected from the tables and queries

Queries are the filtered contents of tables using selection criteria. MS Access queries look something like this:
 * DATABASE QUERIES**
 * ~ Field || Surname || Firstname || Address || Suburb || Postcode || Paid ||
 * ~ Table || Customer || Customer || Customer || Customer || Customer || Customer ||
 * ~ Sort || Ascending ||  ||   ||   ||   ||   ||
 * ~ Show || Yes || Yes || Yes || Yes || Yes || Yes ||
 * ~ Criteria ||  ||   ||   ||   ||   || =False ||