IBDP CompSci DatabasesQuick Notes
IBDP CompSci DatabasesQuick Notes
OPTION A
DATABASES
Basic concepts
___
Ms.Shruti Dixit
2
As its name suggests a database is a base for storing data. With many
advantages over the old paper system of storing data, Databases save
space(physical storage space, compared to paper records), allow multiple
people to access the same data at the same time and queries (similar to filters)
can be done to only show the data required.
Yes, when you look at a database it might look very similar to a spreadsheet.
Whilst spreadsheets may primarily be used to manipulate data using
functions and formulas to perform calculations and statistics, whereas
databases are primarily used to store data and often have relationships
between tables and should allow the user to easily generate queries to view
specific data. Databases often contain much more data than a spreadsheet.
A database will contain data that is used by information systems where-as the
information system comprises the complete system, furthermore may present
the data from the database in a way in which it becomes information.
Databases are essential for managing large amounts of data efficiently and
effectively. Here are some reasons why databases are needed:
Databases are essential for managing data effectively, ensuring data integrity,
security, and scalability, and optimizing performance.
operation, which means that either all of the operations are completed
successfully, or none of them are completed at all.
AT A GLANCE -
can access and manipulate the same data simultaneously without conflicts or
inconsistencies.
1. Query Functions: Query functions are used to retrieve data from the
database. These functions allow users or applications to search for
specific data or to retrieve a subset of data that meets certain criteria.
Common query functions include SELECT statements in SQL and find()
functions in NoSQL databases. Query functions allow users to perform
various types of data analysis and reporting, such as sorting, grouping,
filtering, and aggregating data. They are essential for retrieving data
from the database and for generating reports and insights.
2. Update Functions: Update functions are used to modify the data in the
database. These functions allow users or applications to add, update, or
delete data in the database. Common update functions include INSERT,
UPDATE, and DELETE statements in SQL and save() and remove()
functions in NoSQL databases Update functions are essential for
maintaining the accuracy and integrity of the data in the database. They
allow users to make changes to the data, such as correcting errors,
updating records, or deleting obsolete data. Update functions must be
12
Data validation and data verification are two important processes used to
ensure the accuracy, completeness, and consistency of data in a database
system. Although the terms are sometimes used interchangeably, they refer
to different processes.
Data Validation: Data validation is the process of checking whether the data
entered into a system is accurate, complete, and consistent with predefined
rules and constraints. The purpose of data validation is to ensure that the
data entered into the system is correct and can be used reliably.
Data validation is typically performed when data is first entered into the
system, and it involves checking for errors, such as missing or invalid data,
incorrect data types, or data that does not conform to predefined rules and
constraints. Data validation may be performed using automated validation
13
Data validation and data verification are both essential processes for ensuring
the accuracy, completeness, and consistency of data in a database system.
Data validation checks the accuracy and completeness of data when it is first
entered into the system, while data verification checks the accuracy and
completeness of data stored in the database relative to the original source. By
performing both data validation and data verification, organizations can
ensure that their data is reliable, accurate, and useful.
14
● Foreign Key: A foreign key is a field in a table that refers to the primary
key of another table. A foreign key is used to create a relationship
between two tables and ensure data integrity across the tables.
16
in the table.
*******************