0% found this document useful (0 votes)
39 views28 pages

HND Databases

Uploaded by

cookie doris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views28 pages

HND Databases

Uploaded by

cookie doris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Database

Lesson 1: Fundamental Objectives of


Databases

Complete Stack Development


Lesson Outline
• What is a database?
• History of databases
• Career in databases
• Database on the full stack
• Objectives databases?
– Less redundancy
– Consistency
– ACID Properties
– Multi user and concurrent access
– Multiple views
– Confidentiality, Availability and Integrity (CIA)
• Mini Project 1: Database Environment Setup
What is a database?
• What is a database (DB)?

Database is a collection of related data and data is a collection of facts and figures that can
be processed to produce information.

Mostly data represents recordable facts. Data aids in producing information, which is based
on facts. For example, if we have data about marks obtained by all students, we can then
conclude about toppers and average marks.

• What is a Database Management System (DBMS)?

A database management system stores data in such a way that it becomes easier to retrieve,
manipulate, and produce information.

Database Management System or DBMS in short refers to the technology of storing and
retrieving users’ data with utmost efficiency along with appropriate security measures.
History: Traditional vs Relational databases

• Traditional database

Man has always sought ways to keep information since the days of man as a primitive being.
Man started trying to keep recordings by inscribing symbols on stones and surfaces. These
recordings could be kept and passed down from generation to generation. There are lots of
disadvantages with traditional databases. It is difficult to manage the physical and logical
security, repetition of facts is difficult to manage, to create backups can be too expensive, etc.

• Relational database

A relational database is a digital database based on the relational model of data. It is


maintained by a relational database management system. Relational databases are
beneficial in that they can be secured easily and better, it is easy to control repetitions,
multiple copied can be kept and related.
Career in database
● Just like in IT we all know major skillsets are needed for different purposes and specialization is very
high in IT.

● You already know you can become full stack developer or just frontend developer alone or backend
developer. Just as you can specialize or stick to a portion of the stack, you have several unique
specialization in databases as well.

● You can either become a DMBS Software developer, Database designer or database administrator.

● DMBS Software developer is someone who builds the software that is used for creating and managing
databases.

● Database designer is someone who uses database design principles and tools to design the structures
for a database or databases.

● Database administrators are people who monitor and manage a live database.
Database on the full stack
● Using the 3-tier
architecture, let us
take a look at where
database is situated
on the full stack.

● We will see more


about this in Lesson 2
Fundamental objectives of database
Less Redundancy

In the database approach, ideally, each data item is stored in only one
place in the database. In some cases, data redundancy still exists to
improve system performance, but such redundancy is controlled by
application programming and kept to minimum by introducing as little
redundancy as possible when designing the database.

DBMS follows the rules of normalization, which splits a relation when


any of its attributes is having redundancy in values. Normalization is a
mathematically rich and scientific process that reduces data
redundancy.
Fundamental objectives of database
Consistency

When the same data is duplicated and changes are


made at one site, which is not propagated to the
other site, it gives rise to inconsistency and the two
entries regarding the same data will not agree. At
such times the data is said to be inconsistent. So, if
the redundancy is removed chances of having
inconsistent data is also removed.
Fundamental objectives of database
Consistency Example

Let us consider the college system and suppose that in case of


General Office file it is indicated that RollNumber 5 lives in Buea but in
library file it is indicated that RollNumber 5 lives in Limbe. Then, this is
a state at which tIle two entries of the same object do not agree with
each other (that is one is updated and other is not). At such time the
database is said to be inconsistent.
An inconsistent database is capable of supplying incorrect or conflicting
information. So there should be no inconsistency in database. It can be
clearly shown that inconsistency can be avoided in centralized system
very well as compared to file system
Fundamental objectives of database
Consistency Example

Let us consider again, the example of college system and


suppose that RollNo 5 is .shifted from Amritsar to Jalandhar,
then address information of Roll Number 5 must be updated,
whenever Roll number and address occurs in the system. In
case of file system, the information must be updated separately
in each application, but if we make updation only at three places
and forget to make updation at fourth application, then the whole
system show the inconsistent results about Roll Number 5.
Fundamental objectives of database
Consistency Example

In case of DBMS, Roll number and address occurs together only single time in
GeneralOffice table. So, it needs single updation and then another application
retrieve the address information from GeneralOffice which is updated so, all
application will get the current and latest information by providing single update
operation and this single update operation is propagated to the whole database
or all other application automatically, this property is called as Propagation of
Update.

We can say the redundancy of data greatly affect the consistency of data. If
redundancy is less, it is easy to implement consistency of data. Thus, DBMS
system can avoid inconsistency to great extent.
Consistency is a state where every relation in a database remains consistent.
Fundamental objectives of database
Removing Inconsistency

There exist methods and techniques, which


can detect attempt of leaving database in
inconsistent state. A DBMS can provide greater
consistency as compared to earlier forms of
data storing applications like file-processing
systems.
Fundamental objectives of database
ACID Properties

The ACID model of database design is one of the oldest and most important
concepts of database theory. It sets forward four goals that every database
management system must strive to achieve: atomicity, consistency, isolation,
and durability. A relational database that fails to meet any of these four goals
cannot be considered reliable. A database that possesses these characteristics
is considered ACID-compliant.

DBMS follows the concepts of Atomicity, Consistency, Isolation, and Durability


(normally shortened as ACID). These concepts are applied on transactions,
which manipulate data in a database. ACID properties help the database stay
healthy in multi-transactional environments and in case of failure.
Let’s take a moment to examine each of these characteristics in detail:
Fundamental objectives of database
ACID Properties

Atomicity: States that database modifications must


follow an “all or nothing” rule. Each transaction is
said to be “atomic.” If one part of the transaction
fails, the entire transaction fails. It is critical that the
database management system maintains the atomic
nature of transactions in spite of any DBMS,
operating system, or hardware failure.
Fundamental objectives of database
ACID Properties

Consistency: States that only valid data will be written to the


database. If, for some reason, a transaction is executed that
violates the database’s consistency rules, the entire transaction
will be rolled back, and the database will be restored to a state
consistent with those rules. On the other hand, if a transaction
successfully executes, it will take the database from one state
that is consistent with the rules to another state that is also
consistent with the rules.
Fundamental objectives of database
ACID Properties

Isolation: Requires that multiple transactions occurring at the same time not
impact each other’s execution. For example, if Joe issues a transaction against
a database at the same time that Mary issues a different transaction, both
transactions should operate on the database in an isolated manner. The
database should either perform Joe’s entire transaction before executing
Mary’s, or vice-versa. This prevents Joe’s transaction from reading
intermediate data produced as a side effect of part of Mary’s transaction that
will not eventually be committed to the database. Note that the isolation
property does not ensure which transaction will execute first merely that
transactions will not interfere with each other
Fundamental objectives of database
ACID Properties

Durability: Ensures that any transaction committed


to the database will not be lost. Durability is ensured
through the use of database backups and
transaction logs that facilitate the restoration of
committed transactions in spite of any subsequent
software or hardware failures.
Fundamental objectives of database
ACID Properties

Multi User and Concurrent Access: DBMS supports multi-user environments


and allows them to access and manipulate data in parallel. Though there are
restrictions on transactions when users attempt to handle the same data item,
users are always unaware of them.
Current database systems are designed for multiple users. That is, they allow
many users to access the same database at the same time. This access is
achieved through features called concurrency control strategies. These
strategies ensure that the data accessed are always correct and that data
integrity is maintained.
The design of modern multiuser database systems is a great improvement from
those in the past which restricted usage to one person at a time.
Fundamental objectives of database
ACID Properties

Multiple views: A database supports multiple views of data. A view is a subset


of the database, which is defined and dedicated for particular users of the
system. Multiple users in the system might have different views of the system.
Each view might contain only the data of interest to a user or group of users.

DBMS offers multiple views for different users. A user who is in the Sales
department will have a different view of database than a person working in the
Production department. This feature enables the users to have a concentrate
view of the database according to their requirements.
Fundamental objectives of database
ACID Properties

Multiple views: A database supports multiple views of data. A view is a subset of the
database, which is defined and dedicated for particular users of the system. Multiple users in
the system might have different views of the system. Each view might contain only the data of
interest to a user or group of users.

DBMS offers multiple views for different users. A user who is in the Sales department will have
a different view of database than a person working in the Production department. This feature
enables the users to have a concentrate view of the database according to their requirements.

A typical DBMS has users with different rights and permissions who use it for different
purposes. Some users retrieve data and some back it up. The users of a DBMS can be broadly
categorized as follows
Fundamental objectives of database
ACID Properties

Multiple views
Administrators: Administrators maintain the DBMS and are responsible for administering the
database. They are responsible to look after its usage and by whom it should be used. They
create access profiles for users and apply limitations to maintain isolation and force security.
Administrators also look after DBMS resources like system license, required tools, and other
software and hardware related maintenance.

Designers: Designers are the group of people who actually work on the designing part of the
database. They keep a close watch on what data should be kept and in what format. They
identify and design the whole set of entities, relations, constraints, and views.

End Users: End users are those who actually reap the benefits of having a DBMS. End users
can range from simple viewers who pay attention to the logs or market rates to sophisticated
users such as business analysts.
Fundamental objectives of database
Confidentiality/integrity/
availability (CIA)
• The triad of
confidentiality, integrity
and availability is the
foundation of
information security,
and database security.
Fundamental objectives of database
Confidentiality/integrity/availability (CIA)

Confidentiality is the most important aspect of database security, and is most commonly
enforced through encryption. Encryption should be done both for data-in-transit and data-at-
rest.

Integrity is yet another crucial aspect of database security, because it ensures that only the
correct people will be able to see privileged company information. The integrity of a database is
enforced through a User Access Control system that defines permissions for who can access
which data.

The integrity aspect extends beyond simply permissions, however. Security implementations
like authentication protocols, strong password policies, and ensuring unused accounts (like of
employees that have left the company) are locked or deleted, further strengthen the integrity of
a database.
Fundamental objectives of database
Confidentiality/integrity/availability (CIA)
Availability relates to the need for databases to
be up and available for use. Databases need to
be dependable in order to be functional, which
requires they be up and running whenever the
organization is. This means downtimes should
be planned on weekends and servers kept up-
to-date.
Database Environment Setup (Due: 2 days)

MINI PROJECT 1
Project Description
Install and setup MySQL Workbench and XAMPP

- Document the installation process on Microsoft word


(make sure to use snapshots with arrows to the
explanations)

- Convert the installation document into a blog post.

- Send by email the Microsoft word and a link to the


blog post
Summary
So far, we have looked at the following:

• What is a database?
• History of databases
• Career in databases
• Database on the full stack
• Objectives databases?
– Less redundancy
– Consistency
– ACID Properties
– Multi user and concurrent access
– Multiple views
– Confidentiality, Availability and Integrity (CIA)
• Mini Project 1: Database Environment Setup
Congratulations!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy