[go: up one dir, main page]

0% found this document useful (0 votes)
50 views11 pages

Ss3 First Term Note

Uploaded by

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

Ss3 First Term Note

Uploaded by

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

Subject: Computer Science

Class: Ss3
Term: First Term
Duration: 40 minutes

TOPICS

1. Networking

2. Database security

3. Crash recovery

4. Parallel and distributed databases

5. Indexes

TOPIC 1: NETWORKING

Definition:

Networking is the practice of connecting computers and other devices together to share data
and resources.

Networking is the practice of linking or connection of two or more computing devices


together for the purpose of sharing data. Networks are built with a mix of computer hardware
and computer software.

Classes of Networks
Computer networks can be classified into
 Intranet
 Extranet

An intranet
An intranet is a private network that is contained within an enterprise. It may consist of many
interlinked local area networks and also use leased lines in the wide area network. Typically,
an intranet includes connections through one or more gateway computers to the outside
Internet. The main purpose of an intranet is to share company information and computing
resources among employees. An intranet can also be used to facilitate working in groups and
for teleconferences.

An Extranet
An extranet is a private network that uses Internet technology and the public
telecommunication system to securely share part of a business‘s information or operations
with suppliers, vendors, partners, customers, or other businesses. An extranet can be
viewed as part of a company’s intranet that is extended to users outside the company. It has
also been described as a “state of mind” in which the Internet is perceived as a way to do
business with other companies as well as to sell products to customers.

Types of Networks:

1. LAN (Local Area Network):

A local area network (LAN) is a network that connects computers and devices in a
limited geographical area such as home, school, computer laboratory, office building,
or closely positioned group of buildings. Each computer or device on the network is a
node.
 Covers a small area like an office or school.
 Fast and private.

2. MAN (Metropolitan Area Network):

A Metropolitan area network (MAN) is a large computer network that usually spans a
city or a large campus.
 Covers a city or town.
 Larger than LAN, smaller than WAN.

3. WAN (Wide Area Network):

A wide area network (WAN) is a computer network that covers a large geographic
area such as a city, country, or spans even intercontinental distances, using a
communications channel that combines many types of media such as telephone lines,
cables, and air waves. A WAN often uses transmission facilities provided by common
carriers, such as telephone companies
 Covers a large geographical area (e.g., the internet).

Network Devices:

 Router: Connects networks together.


 Switch: Directs data within a network.
 Modem: Connects a network to the internet.
 Server: A computer that provides services to others on the network.

Benefits of Networking:

 File and resource sharing


 Communication (email, chat)
 Centralized data storage
 Easier backup and updates

Importance of Computer Networking


Computer networking is of paramount importance in the modern world, playing a crucial role
in various aspects of our personal and professional lives. Here are some key reasons why
computer networking is essential:
 Communication: Networking allows individuals and organizations to communicate
effectively. It enables email, instant messaging, video conferencing, and other forms
of real-time and asynchronous communication.
 Information Sharing: Networking enables the sharing of information and resources,
making it easier for people to access and collaborate on documents, files, and data
from different locations.
 Data Transfer and Storage: Networks facilitate the transfer of data between devices
and the storage of data in centralized servers or cloud-based systems. This is crucial
for data backup, sharing, and retrieval.
 Internet Access: Computer networks provide the infrastructure for internet access,
which has become an essential part of daily life for most people. It enables web
browsing, online shopping, research, and more.
 Business Operations: Networking is critical for businesses to operate efficiently. It
supports functions like inventory management, customer relationship management
(CRM), and enterprise resource planning (ERP) systems.
 Remote Work: In recent years, the importance of networking has been highlighted
by the rise of remote work. Networks allow employees to work from anywhere,
accessing company resources and collaborating with colleagues.
 E-commerce: Networking is fundamental to e-commerce platforms, enabling online
shopping, payment processing, and secure transactions over the internet.
 Education: Computer networks are essential for modern education. They support
online learning platforms, virtual classrooms, and access to educational resources
from around the world.
 Entertainment: Networks enable streaming services, online gaming, social media,
and other forms of digital entertainment. They connect people to a wide range of
multimedia content.
 Research and Development: Researchers and scientists rely on networks for data
sharing, collaborative research, and access to vast online databases and libraries.
 Healthcare: Networking is critical in healthcare for sharing patient records, medical
imaging, telemedicine, and remote monitoring of patients.
 Transportation and Logistics: The transportation and logistics industry depends on
networks for tracking shipments, managing fleets, and optimizing supply chain
operations.
 Security: Networking is essential for implementing security measures, including
firewalls, intrusion detection systems, and encryption, to protect data and prevent
cyber-attacks.
 Smart Cities and IoT: Networking forms the backbone of smart city initiatives,
connecting various IoT devices and sensors to collect data and improve urban
services.
 Global Connectivity: Networking connects people and organizations globally,
fostering international collaboration, trade, and cultural exchange.
TOPIC 2: DATABASE SECURITY

Definition:

Data security is the practice of keeping data protected from corruption and unauthorized
access. The focus behind data security is to ensure privacy while protecting personal or
corporate data. It is a means of putting in place the different form of information security
controls to protect database against compromise of their confidentiality, integrity and
availability.

Database security involves protecting the database from unauthorized access, misuse, or
corruption.

Database Security concerns the use of a broad range of information security controls to
protect database against compromise of their integrity, confidentiality and availability.

Importance of Data Security


1. Risk Assessment: This will enable you to identify the risks you are faced with and what
could happen if valuable data is lost through theft, malware infection or a system crash.
2. Securing Data: Since data can be compromised in many ways, the best security against
misuse or theft involves a combination of technical measures, physical security and a well-
educated staff. You should implement clearly defined polices into your infrastructure and
effectively present them to the staff.
3. Data security is critical for most business and even home computer users. Client
information, payment information, personal files, bank account details- all this information
can be hard to replace and potentially dangerous if it falls into the wrong hands. Data lost due
to disaster such as a flood of fire is crushing, but losing it to hackers or a malware infection
can have much greater consequences.

Types of Security Control on the Data

Access Control
1. Access Control: Is the selective restriction of access to a place or other resource. The act
of accessing may mean consuming, entering, or using. Permission to access a resource is
called authorization.
2. Auditing: Database auditing involves observing a database so as to be aware of the actions
of database users. Database administrators and consultants often set up auditing for security
purposes, for example, to ensure that those without the permission to access information do
not access it.
3. Authentication: Is the validation control that allows you to log into a system, email or
blog account etc. Once logged in, you have various privileges until logging out. Some
systems will cancel a session if your machine has been idle for a certain amount of time,
requiring that you prove authentication once again to re-enter. You can log in using multiple
factors such as a password, a smart card or even a fingerprint.
4. Encryption: This security mechanism uses mathematical scheme and algorithms to
scramble data into unreadable text. It can only be decoded or decrypted by the party that
possesses the associated key.
Integrity Control
5. Backup: This is the process of making copy and archiving of computer data in the event of
data loss which is used to restore the original data. Backups have two distinct purposes. The
primary purpose is to recover data after its loss, be it by data deletion or corruption. The
secondary purpose of backups is to recover data from an earlier time, according to a user-
defined data retention policy, typically configured within a backup application for how long
copies of data are required. Backup is just one of the disaster recovery plans.
6. Password: This is sequence of secret characters used to enable access to file, program,
computer system and other resources.

Application Security
Application security is the use of software, hardware and procedural methods to protect
application from external threats.

Major Threats to Data Security


1. Accident can happen due to human error or software/ hardware error.
2. Hackers could steal vital information and fraud can easily be perpetrated.
3. Loss of data integrity.
4. Improper data access to personal or confidential data.
5. Loss of data availability through sabotage, a virus, or a worm.

A database administrator (DB) is a person responsible for the installation, configuration,


upgrade, administration, monitoring and maintenance of databases in an organization. The
role includes the development and design of database strategies, system monitoring and
improving database performance and capacity, and planning for future expansion
requirements. They may also plan, co-ordinate an implement security measures to safeguard
the database.

A database administrator’s responsibilities can include the following tasks:


1. Installing and upgrading the database server and application tools.
2. Allocating system storage and planning future storage requirements for the database
system
3. Modifying the database structure, as necessary, from information given by application
developers.
4. Enrolling users and maintaining system security.
5. Ensuring compliance with database vendor license agreement.
6. Controlling and monitoring user access to the database.
7. Monitoring and optimizing the performance of the database.
8. Planning for backup and recovery of database information.
9. Maintaining archive data.
10.Backing and restoring databases

Methods of Securing Databases:

1. User Authentication: Using usernames and passwords.


2. Access Control: Granting specific permissions to users (read-only, edit, delete).
3. Encryption: Scrambling data so it’s unreadable without a key.
4. Firewalls and Antivirus: Protecting against malware.
5. Backups: Regular copies of data to restore in case of loss.

TOPIC 3: CRASH RECOVERY

Definition:

Crash recovery refers to the techniques used to restore a database after a failure or system
crash.

Crash recovery is the process by which the database is moved back to a consistent and usable
state. This is done by rolling back incomplete transactions and completing committed
transactions that were still in memory when the crash occurred. When the database is in a
consistent and usable state, it has attained what is known as a point of consistency. Following
a transaction failure, the database must be recovered.

Conditions that can result in transaction failure include:


1. A power failure on the machine causing the database manager and the database partitions
on it to go down.
2. A hardware failure such as memory corruption, or disk, CPU, or network failure.
3. A serious operating system error that causes the DB to go down

Introduction to ARIES (Algorithms for Recovery and Isolation Exploiting Semantics)


This is a recovery algorithm designed to work with no-force, steal database approach. It is
used by IBM DB2, MS SQL Server and many other database systems.

The three main principles that lie behind ARIES recovery algorithm

1. Write Ahead Logging: Any change to an object is first recorded in the log, and then the
log must be written to a stable storage before changes to the object are written to a disk.
2. Repeating History during Redo: On restart, after a crash, ARIES retraces the actions of a
database before the crash and brings the system back to the exact state that it was in before
the crash. The n it undoes the transaction still active at crash time.
3. Logging Changes during Undo: Change made to the database while undoing transactions
are logged to ensure such an action isn’t repeated in the event of repeated restarts.

Recovery Procedure after Crash


The recovery works in three phases
1. Analysis Phase: The first phase, analysis, computes all the necessary information from the
log file.
2. REDO Phase: The Redo phase restores the database to the exact state at the crash,
including all the changes of uncommitted transactions that were running at that point time.
3. UNDO Phase: The undo phase then undoes all uncommitted changes, leaving the database
in a consistent state. After the redo phase the database reflects the exact state at the crash.
However, the changes of uncommitted transactions have to be undone to restore the database
to a consistent state.
Media Recovery
Media recovery deals with failure of the storage media holding the permanent database, in
particular disk failures. The traditional database approach for media recovery uses archive
copies (dumps) of the database as well as archive logs. Archive copies represent snapshots of
the database and are periodically taken.

The archive log contains the log records for all committed changes which are not yet
reflected in the archive copy. In the event of a media failure, the current database can be
reconstructed by using the latest archive copy and redoing all changes in chronological order
from the archive log.

A faster recovery from disk failures is supported by disk organizations like RAID (redundant
arrays of independent disks) which store data redundantly on several disks. However, they do
not eliminate the need for archive based media recovery since they cannot completely rule
out the possibility of data loss, e.g. when multiple disk fail.

Causes of Crashes:

 Power failure
 Software bugs
 Hardware damage
 Natural disasters

Recovery Methods:

1. Backups:
o Restore the last saved copy of the database.
2. Transaction Logs:
o A log of changes made to the database.
o Can be used to re-do or undo transactions after a crash.
3. Checkpoints:
o Save the current state of the database at intervals.
o Helps in faster recovery.
4. Recovery Manager:
o A special software tool used to automatically handle recovery processes.

TOPIC 4: PARALLEL AND DISTRIBUTED DATABASES

A. Parallel Databases:

Definition:

A parallel database is a database system that uses multiple processors and memory to perform
operations simultaneously.
A parallel database system seeks to improve performance through parallelization of various
operations, such as loading data, building indexes and evaluating queries. Although data may
be stored in a distributed fashion, the distribution is governed solely by performance
considerations. Parallel databases improve processing and input/output speeds by using
multiple CPUs and disks in parallel. Centralized and client–server database systems are not
powerful enough to handle such applications. In parallel processing, many operations are
performed simultaneously, as opposed to serial processing, in which the computational steps
are performed sequentially.

Features:

 Faster data processing.


 Tasks are divided among multiple processors.
 Suitable for large-scale applications.
 Higher Performance: more CPUs available to an application, higher speedup and
scaleup can be attained.
 Higher Availability: Nodes are isolated from each other, so a failure at one node
does not bring the whole system down.
 Greater Flexibility: An OPS environment is extremely flexible. Instances can be
allocated or de allocated as necessary.
 More Users: Parallel database technology can make it possible to overcome memory
limits, enabling a single system to serve thousands of users.

Example:

Processing a big transaction in a bank where different parts (account verification, transaction
recording) are handled at the same time by different processors.

B. Distributed Databases:

Definition:

A distributed database is stored on multiple computers (locations) but appears as a single


database to the user.

In a distributed database, data is stored in different systems across a network. For Example, in
mainframes, personal computers, laptops, cell phones, etc.

Advantages of Distributed Database


1. In a distributed database, data can be stored in different systems like personal
computers, servers, mainframes, etc.
2. A user doesn’t know where the data is located physically. Database presents the data
to the user as if it were located locally.
3. Database can be accessed over different networks.
4. Data can be joined and updated from different tables which are located on different
machines.
5. Even if a system fails the integrity of the distributed database is maintained.
6. A distributed database is secure.
Disadvantages of Distributed Database
1. Since the data is accessed from a remote system, performance is reduced.
2. Static SQL cannot be used.
3. Network traffic is increased in a distributed database.
4. Database optimization is difficult in a distributed database.
5. Different data formats are used in different systems.
6. Different DBMS products are used in different systems which increases in complexity
of the system.

Types of Distributed Databases


Distributed databases can be broadly classified into homogeneous and heterogeneous
distributed database
 Homogeneous Distributed Databases: In a homogeneous distributed database, all the sites
use identical DBMS and operating systems.
 Heterogeneous Distributed Databases: In a heterogeneous distributed database, different
sites have different operating systems, DBMS products and data models.

Features:

 Data is shared across networks.


 Each site can process its data independently.
 Data remains consistent across locations.

Example:

A company with branches in Lagos, Kano, and Port Harcourt keeps data locally but also
shares it across all branches.

Differences Between Parallel and Distributed Databases:

Feature Parallel DBMS Distributed DBMS


Location Single location (multi-CPU) Multiple locations
Data Sharing Shared memory Data distributed
Speed Very fast due to parallel tasks Depends on network speed
Failure Handling Less complex More complex due to network issues

TOPIC 5: INDEXES IN DATABASES

Definition:

An index is a database object that improves the speed of data retrieval operations. Think of it
like the index of a book that helps you quickly find a topic or page.

A Database Index is a data structure that speeds up certain operation on a file. The Operation
involves a search key which is the set of record files (in most cases a single field). The
elements of an index are called data entries. Data entries can be actual data record. A given
file of data records can have several indexes, each with different search keys as showed in the
table below.

Indexes are special lookup tables that the database engine uses to speed up data retrieval. An
index in a database is similar to an index in the back of a book.

Importance of Indexes:

 Speeds up data search.


 Reduces the time it takes to access information from large tables.
 Makes sorting and filtering easier.

Types of Indexes:

1. Primary Index:

Primary index is an index defined on a primary key column(s) of a relation with


unique constraint which guarantee that the field will not contain duplicate values and
determine the order of how the records are physically stored on the disk. Note that this
is also called clustered index.
 Based on the primary key of a table.
 Each record has a unique key.

2. Secondary Index:

Secondary index is an index defined on a non-key field which may contain duplicate
values and as such does not determine the order of how the records are physically
stored on a disk. It is also called non-clustered index.
For example, in student database, student ID is used to look up for a student as the
key, however, one might want to look up for a student using Last Name by creating
secondary indexon that column.
 Based on non-primary key fields.
 Allows searching by fields that are not unique.

3. Clustered Index:

Clustered index is an index whose sorting order determines the order of how the
rows/records in a table are stored. There could be only one clustered index in a table
because there could always be one way of arranging the records in a table at a given
time. For example, if you are asked to arrange some tables in a room, you could
arrange them in a round form, row form or packed them close together, only one way
at a time. Clustered index also means that related values in a table are stored close to
each other according to the order of the index. A Clustered index is when a file is
organized so that the ordering of data records is the same as or closes to the ordering
of data entries. A clustered index can take place only if the data records are sorted on
the search key field. For example, suppose that students records are sorted by age; an
index on age that stores data entries in sorted order by age is a clustered index.
 Determines the physical order of data in a table.
 Only one per table.

4. Non-clustered Index:

This an index whose sorting order does not determine the order of how the
rows/records in a table are stored. This means that the search keys in the index
column is sorted in one order while the actual records or rows are sorted in another
order or are not sorted at all.
This is an index that is not clustered. A data file can contain several unclustered
index. For example, supposing that students’ records are sorted by age; and if
additional index on GPA field is included, it is called unclustered index.
 Has a separate structure from the data.
 Multiple allowed per table.

Example:

If you have a table of 10,000 students, creating an index on the “Student ID” column will
make it faster to search for a particular student.

Advantages of Using Indexes

 Faster data retrieval


 Improved performance of SELECT queries
 Helpful in sorting and filtering large datasets
 Enforces uniqueness (in unique indexes)

Disadvantages of Using Indexes

 Slows down INSERT, UPDATE, and DELETE operations (because indexes also need
updating)
 Takes additional storage space
 Poorly planned indexes can slow down performance

When to Use Indexes

 On columns frequently used in WHERE, JOIN, or ORDER BY


 On columns with many unique values (e.g., ID numbers, emails)
 Avoid indexing columns with many duplicate values

You might also like