Databases Flashcards
What is a database?
A structured persistent store of data which can be easily accessed, managed and updated. Stored on the secondary storage devices of a computer system
Flat File Databases
Contains only a single table - require little expertise to maintain and set up - suitable for storing small amounts of data
Disadvantages of Flat File Databases
- Duplicates of data
- Takes up unnecessary space
- Slow to query
- Becomes difficult to maintain
Table
Entity
Records
Rows / Tuples
Fields
Columns / Attributes
Relational Databases
Contain more than one entity - each entity has attributes
How can entity descriptions be written?
Customer (custID, title, firstname, surname, email)
Product (productID, title, subject, price)
Primary Key
A field in a record that is unique and does not relate to another table
Foreign Key
A field which links to another table
Types of Relationships
1 to 1
1 to Many
Many to Many
How can we graphically represent the relationships between entities?
Entity Relationship Diagram (ER diagram)
Methods of inputting data into a database
1) Paper forms
2) Online forms
3) Barcodes
4) Optical Character Recognition (automatically reads shapes of text e.g. Post Office, Speed Cameras)
5) Optical Mark Recognition (e.g. lottery tickets, multiple choice tests)
Exchanging data
The process of transferring the collected data
Two method of exchanging data
Electronic Data Interchange (EDI) or JSON queries
- Does not require human interaction
- Enables data transfer from one computer to another