Database
persistent, organised store of data. Persistent: stored on permanent storage (e.g hard drive) & not stored in memory-only data like data structures array, queue/list). Organised: certain standardised catalogued way, stored in records&fields. Store of data: raw facts/figures an application needs
Organising data into a database benefits & from paper-based to electronic databases:
-easier to efficiently search, manipulate, update and make data copies.
- can be accessed by multiple people at same time from different locations.
- Avoids inconsistencies and duplication of data, storing and managing data in a reliable and efficient way.
Database terminology (table, record, field, entity, attributes, field name, tuple)
A table is a collection of records representing one set of data in a database. A record is data fields about a single entity. A field is a piece of data about an entity in a record. A entity is an object, place, person, or thing that can be distinguished from others and has data stored about it
Attributes: Properties/characteristics of an entity.
Field name: An identifier for a piece of data.
Tuple: A record in a table.
Database concepts
Flat file database
Flat file database pros
Flat file database cons
-very inefficient, a lot of repetitive data, takes up unnecessary space
-gets worse as database grows: difficult to maintain, slow to query
Relational database
Relational database pros
Relational database cons
Primary key
field, has a unique identifier (value) for each record in table. which is never repeated within a table so ensures each record is unique.
Secondary key
Foreign key
Entry relation/entity relationships
Data capture
Data capture OCR (optical character recognition)
Data capture OMR (optical mark recognition)
Data capture - Inputting Data
Selecting data
QBE (Query By Example)
Managing data
Database applications
Database management systems (DBMS)-
Features of a DBMS