Important Note

When setting up your .py file, this should be the structure:

from turtle import *

#all of your code goes here

mainloop()

Make sure you include the call to mainloop(). This is a built-in function and helps manage the window.

Database Normalizing

Denormalized advantages review

We have covered the importance of normalizing a database. It reduces data redundancy, decreases the opportunity for update/delete anomolies and improves data integrity generally.

In short, it will result in a reliable database.

But surely a denormalized database must have some advantages...

Advantage Description
Queries are simpler Without joins to consider, queries are simpler to design
Queries are faster Queries can be executed on one table, rather than navigating joins, making query-execution faster.
Less processing Because joins are not needed (or reduced), less processing power is required

Of course, in a denormalized database, there is a risk of:

  1. data duplication
  2. update/delete anomolies
  3. generally poor data integrity

However, in scenarios where a fast read is required, a denormalized database can out-perform a normalized database.

So when choose to normalize a database or leave it denormalized, the benefits will have to be weighed up against the drawbacks.

Limitations of Databases

Let's consider some limitations of sql databases in general:

Limitation Explanation
"Big data" scalability issues Traditional databases can struggle when the volume, speed, or variety of data becomes extremely large. Storing, processing and querying huge datasets can require significant computing resources and specialised systems.
Design complexity Designing a database can become complicated, particularly when there are many tables, fields, constraints and relationships. Poor design can lead to redundancy, inconsistency or inefficient queries.
Hierarchical data handling Traditional relational databases are designed around tables and relationships, which can make naturally hierarchical data (e.g. a family tree or organisational structure) less straightforward to represent and query.
Rigid Schema A relational database normally has a predefined structure (schema). Changing the structure of a table can be difficult when large amounts of existing data and applications depend on it.
Object-relational impedance mismatch Programming languages commonly represent information as objects, while relational databases represent it as tables and rows. Converting between these two representations can add complexity to software development.
Unstructured data handling Relational databases are well suited to structured data, but data such as images, videos, audio, social-media posts or free-form text may not fit naturally into rows and columns.

Normalizing

Normalizing a database reduces data redundancy. Data redundancy is where the same data is stored in multiple places in a database.

When updates occur, they have to update all of the data in all of the locations correctly.

Update anomolies refer to updates that don't do this, leading to inconsistent data.

Data redundancy also requires more storage space.

Data redundancy may, however, be intentional ie the database is storing a backup of the data.