3.2.1
Databases
Records
Records
Structured data refers to any data that resides in a fixed field within a record or file so that it can be easily entered, stored, queried, and analysed.
Records
Records
- Records are made up of fields.
- For example, a person could be represented as a record where the fields include their name, age, and address.
Comma separated values (CSV)
Comma separated values (CSV)
- One method of storing a record is using comma separated values.
- Each record is put on its own line.
- Each field is separated by a special character such as a comma.
Pros and cons
Pros and cons
- Pros:
- Very simple, text-based format.
- Can be read by many applications.
- Easy to use in programs.
- Cons:
- Inefficient for large datasets.
- Can only store text data.
- No built-in means of sorting or searching.
Flat-File Databases
Flat-File Databases
Flat-file databases are used to store records of information in order to be searched or queried at a later date.
Structure of flat-file databases
Structure of flat-file databases
- A flat-file database is one that has a single table to store data about an 'entity'.
- The table stores data in fields (columns) such as date of birth.
- A record (row) of information is a complete set of fields put together.
- This could be a person's details such as name, address, date of birth, telephone number.
Redundancy
Redundancy
- Redundant data is data that is repeated in a database.
- A single table file is inefficient as it is full of redundant data
Primary key
Primary key
- A primary key is a field used to uniquely identify a specific row of data in a table.
- For example, each student in a college database will have a student ID number that is unique to each student that can be used as a primary key
Relational Database
Relational Database
A relational database is a set of tables whose records are linked by certain fields.
Relational database
Relational database
- A relational database is a set of tables whose records are linked by certain fields.
- Each table contains data on one entity e.g. students or parents.
- When you link one table to another, this is known as a relationship.
- Each table then has a relationship to other tables using primary and foreign keys.
Foreign key
Foreign key
- If the primary key of one table is placed into another table, this is then known as a foreign key.
- For example, when a student ID field is added to a parent table to link you to your parents accounts, that student ID is a primary key in the student table but becomes a foreign key in the family table.
- The parents table will have its own primary key.
Secondary key
Secondary key
- A secondary key may also be kept by the database.
- A parent may not know their child’s student ID, but they will be able to locate their last name in the database.
- Secondary keys do not need to be unique.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered