Introduction to Databases 5min Lesson
Introduction to Databases 5min Lesson
Databases
HoweTOComputing
Knowledge Review
Can you write a question for this answer ?
History of a Database
▪ Databases are not a new invention, they have existed for
thousands of years.
▪ Ancient cultures collected information about populations,
trade records, taxes etc...
▪ In 1086 William the Conqueror commissioned a complete
catalogue of everything in the country. Every piece of land,
every man, woman, child, even the animals they owned.
▪ It was called the Doomsday book, meaning ‘judgement day’.
Data vs Information
What does the word data mean?
▪ Data is unorganised raw facts that need processing
without which it is seemingly random and useless to
humans.
▪ Information is a processed,
organised data presented
in a given context and is
useful to humans.
Databases
▪ The world uses and needed to keep large amounts
of data. A company will store data about its
customers and staff, schools store data about the
students, hospitals hold data on patients,
supermarkets store data about stock levels and
customer buying patterns.
Both tables are independent, and each one has its own
primary key.
This has lead to no repeating-data so no data
redundancy within the Database.
Relational databases key terms
▪ Relational databases allow data to be stored in a
clear, organised manner across multiple tables. Links,
known as relationships, are formed to allow the data
to be shared across the tables.
▪ An ‘Entity’ is a group of closely related items about a
subject
▪ Foreign key is a link to a primary key on another
table in a relational database table.
Relational databases key terms
▪ Relational databases allow data to be stored in a
clear, organised manner across multiple tables. Links,
known as relationships, are formed to allow the data
to be shared across the tables.
▪ An ‘Entity’ is a group of closely related items about a
subject
▪ Foreign key is a link to a primary key on another
table in a relational database table.
Database Relationships
Relationship within a database is the link between the
tables. There are three relationships:
▪ One to one - e.g. One employee belongs to one
organization or One person has one passport
▪ One to many - One customer to lots of products
▪ Many to many - students and classes
Revision Notes
Open the Database revision
notes and complete the each
section with your own notes
and work examples.
Answers:
1. Primary keys
RunValuseID
RunID
Foreign Key:
RunID
2. One to Many
3. Increase in database size
Increase in data corruption
Possible data inconsistency
Increase in cost
Additional reading and useful links
▪
▪
https://www.bbc.co.uk/bitesize/guides/zfd2fg8/revision/1
▪
https://www.computerscience.gcse.guru/theory/what-is-a-database
▪
https://www.teach-ict.com/gcse_new/databases/terminology/miniweb/index.htm
https://isaaccomputerscience.org/topics/databases
Exam Question
SQL injection is a code injection technique that might destroy your
database.
https://www.guru99.com/learn-sql-injection-with-practical-example.html