Professional Documents
Culture Documents
It Overview Final
It Overview Final
IT is a computer science field centered on how computers can be used to communicate information.
Most people use IT every single day. You are using IT each time you connect to the internet, send an
email, or print a document.
While there are many subjects that makeup IT, the Introduction to IT course covers the following core
pillars:
• Computers
• Networking and the Internet
• Operating Systems and Applications of Software
• Software Development
• Databases
• Cybersecurity
Computers
To understand how a computer can communicate information, it is first necessary to understand how a
computer works. At its core, a computer is a machine that can quickly complete a vast number of
extremely simple tasks. These tasks can then, in the aggregate, be used to complete much larger tasks.
Since computers are at the root of IT, it’s vital to understand what a computer is and what it can do.
A computer can communicate information to its user relatively easily. Output to a monitor and speakers
can be used to visually and audibly convey information. But IT is not just about a computer conveying
information to its user – a computer must be able to communicate information to other computers and
their users as well. That’s where the internet comes in. The internet, in its simplest form, is a way for
computers all around the world to communicate with each other. Using signals similar to those used to
connect people audibly via telephone, the internet can be used to send vast amounts of data – which
together might form a picture, a video, a string of text, etc. – from one user to another.
Software programs are organized sets of instructions that utilize the computer’s hardware to complete
predefined tasks. Without software, our computer is a hammer without a nail. Hardware may have the
ability to communicate information, but software determines when, how, and what information gets
communicated.
The most foundational form of software is an operating system that directs the computer to use its
hardware to complete certain tasks and allows humans to interact with the computer in a way that
makes sense to us. For example, providing a visual interface as well as interactions between a person
and a computer using external devices like keyboards, monitors, etc.
Software Development
Software may dictate what information gets communicated in what ways, but it doesn’t do so on its
own. Just like computer hardware, software must be built – written – and it is the developer who sets
the parameters the program will ultimately follow. Just a few lines of code can turn into a program a
computer can execute. Software development is important within IT because these skills can be used to
develop systems or create functional programs that improve how a task can be completed.
Databases
A database is like a closet you store things in — except instead of clothes or old photo albums, a
database stores data — virtual information only accessible with a computer. This data is the information
that, in the context of IT, our computer shares and communicates. As more data are created each year,
it becomes increasingly important that the databases we use are built to insert new data and retrieve
old data quickly and efficiently.
Cybersecurity
One of the most pressing issues in IT today is cybersecurity. A computer can communicate information,
but communication itself is not enough. We must make sure the information is communicated and
stored safely and securely – only the right people should have access to it.
Today we store more sensitive information on computers than ever before (medical records, classified
documents, etc.). We also use computers to undertake more important tasks than ever before — flying
planes, handling financial transactions, etc. But as our reliance on computers increases, so too do the
incentives for malicious actors to infiltrate those computers to sabotage them, steal information, or
both. Cybersecurity engineers have the task of thwarting their efforts and making computing safer and
more secure for everyone.
Introduction
Computers make up the world around us - from robots to phones to our
coffee machines, modern appliances are often powered by computers. We rely
on this technology daily; therefore, we should ask ourselves the following
question:
• Input
• Processing
• Memory
• Output
Input
Processing
• Once we have some data, we need to process it so that our computer
can figure out what we’re asking it to do and how to execute those
requests. The job of processing information is given to the central
processing unit or CPU.
• The CPU controls all the different components between hardware and
software. We can think of it as the “brain” of the computer! The CPU also
holds the responsibility of establishing communication between
hardware and software. For example, if we turn the dial on our speakers
up, data about that interaction is sent to the CPU. The CPU then
deciphers the information and sends instructions to the speaker about
how to handle this task. If we want to run software on our computer, it is
also up to the CPU to perform all the necessary operations.
• That’s a lot of responsibility for one piece of hardware. With all the
different software and processes available to us, how can the CPU take
in information and execute the associated instructions so quickly? This is
where computer memory comes in handy!
Memory
• Our computers have a lot of information to process - where does all this
data get stored? Computer memory refers to the system or device used
to store computer-based data temporarily or permanently. The type of
hardware we use to store data depends a lot on how long we need to
hold on to that information.
Primary Memory
• Not all memory needs to last forever. Sometimes we just need
information temporarily. For example, if we want to order food, we only
need to remember the restaurant’s phone number long enough for us
to dial the number - then we can forget that information until the next
time we order food.
• This same idea applies to running software on our computers. When a
command to run a program is sent to the CPU, the CPU retrieves data
from Random Access Memory, or RAM, to access what instructions it
needs to execute. Accessing data from RAM is significantly faster than
accessing data from other memory systems.
• This type of data is also only stored temporarily; once we exit a program
or turn off the computer, the data is lost. For example, if we exit a word-
processing application before saving, anything we wrote in the
document is gone.
Secondary Memory
• If we upload 150 photos to our computer, the computer needs a space
to permanently store the data associated with the images so that we
could access the pictures anytime. This type of data would most likely be
saved onto our computer’s hard drive.
Output
Once the CPU processes data and sends out instructions on how to handle it,
the output is produced! We can think of output as the computer fulfilling the
command, we gave it through an output device.
• Monitors
• Speakers
• Printers
For example, if we clicked a mouse to open a file, the output would be the
monitor displaying the file’s content. If we turned the volume on our speakers
up, the output would be the sound becoming louder.
Review
These components are all wired in very specific ways to process data. It is important here to remember
that data, to our hardware, is a series of binary, on and off, electrical pulses. These pulses are run
through different wires, semiconductors, and components as a means to process and return data that is
usable by the software. Now that we have a general understanding of the CPU, let’s dive a little deeper.
Control Unit
The Control Unit (CU) is the overseer of the CPU, responsible for controlling and monitoring the input
and output of data from the computer’s hardware. The Control Unit is the component receiving
instructions from the software and running the show. Its primary job is to make sure that data is sent to
the right component, at the right time, and arrives with integrity.
Part of this job is keeping all the hardware working on the same schedule. It does this with a clock,
which sends out a regular electrical signal to all components at the same time to coordinate activities.
ALU
The Arithmetic and Logic Unit (ALU) is where all the processing on your computer takes place. Even as
you scroll this text box, the ALU is calculating pixel changes on the screen and sending that output to the
monitor. The ALU is the fundamental building block of the CPU, the brain of the entire computer. Nearly
all functional processing occurs in this chip. As the name implies, the ALU’s functions can be divided into
two primary areas:
Logic operations that deal with comparisons and conditionals (e.g. 25 > 10)
Registers
The register, or immediate access store, is limited space, and high-speed memory that the CPU can use
for quick processing. Registers are small pieces of memory right on the CPU. They are fixed in number
and defined in the Instruction Set Architecture. There are typically 8, 16, 32, or 64 registers depending
on the architecture and are also fixed in size based on the size of the number it can hold. They provide
the CPU with a place to store and access values that are crucial to the immediate calculations the ALU is
processing.
Memory
The CPU is just a single component of the computer’s hardware, other important components of
hardware include Random Access Memory (RAM), buses (high-speed wires), as well as a hard disk, and
other non-volatile memory.
Random Access Memory, or RAM, is additional high-speed memory that a computer uses to store and
access information on a short-term basis. In general, a computer’s performance can be directly
correlated to the amount of RAM it has available to use. RAM is considered primary volatile memory,
which means it loses whatever is stored on it as soon as power is disconnected.
Buses
A bus is an engineering term for a job-specific high-speed wire. These wires are often grouped in
bundles and will transfer electrical signals either in parallel or in serial, that is many signals at once or
one pulse at a time. Buses can be grouped into three functions: data buses, address buses, and control
buses.
Data buses carry data back and forth between the processor and other components. Data buses are
bidirectional, which means that they transfer data both to and from other locations.
Address buses carry a specific address in memory and are unidirectional. We can visualize all of our
memory like a village with each house representing a package of data. Every house/data has an address.
When our computer tells a program or component what data to use, it sends the address and then the
component knows where to find the data when it needs it.
Control buses are also unidirectional and are responsible for carrying the control signals of the CU to
other components as well as the clock signals for synchronization.
Hard Disks
Hard disks, or hard drives, are responsible for the long-term, or secondary storage of data and programs.
This is an example of non-volatile memory, meaning that it will retain its information when we shut
down our computer.
Additional Hardware:
The Mainboard
The mainboard, or motherboard, is a printed circuit board that houses important hardware components
via ports. Hardware such as the CPU, the hard drive, various USB devices, and more are connected
through ports on the mainboard. The mainboard allows these components to communicate easily.
Ports
A port is a physical outlet used to connect outside, IO (Input/Output) devices to a computer. A computer
typically contains multiple ports. This connection allows for communication between the IO device and
our computers. Examples of IO devices include keyboards, mice, and monitors.
Number Bases
Introduction to Bases
We use number bases every day without realizing it. When we think about numbers in everyday life, we
are almost always thinking of decimal numbers, or numbers in base 10, where each digit of a number
can be one of ten values. People have ten fingers and ten toes (most of the time), so it seems natural to
base a number system on ten. But we are not required to use ten as a base. For example, in the
movie Avatar, the Navi inhabitants have eight fingers and base their number system on eight because of
that. Back on Earth, we see other bases use commonly in computing systems, such as binary (base 2)
and hexadecimal (base 16).
When we wish to discuss non-ten bases, we use a leading notation like this: 0b1100111101 (binary for
decimal 829). Any number can be a base; however binary, hexadecimal, and decimal are the most
common on computer systems.
Decimal (Base 10): leading nothing (we use it all the time!)
As an IT person, it’s important to understand number systems like binary and hexadecimal because they
are vital for representing data within a computer. In this article, we will discuss the binary and
hexadecimal number system.
Binary
As the old joke goes:
There are only 10 types of people in the world, those that understand binary and those that don’t.
Binary information is defined as relating to, composed of, or involving two things. What we, as computer
scientists, understand as examples of binary can be broken into two distinct categories:
Binary Numbers
Binary Data
Binary numbers are expressed as a combination of 0s and 1s. For example, 100110 is the binary
equivalent of the number 38.
Binary in Computing
You may find yourself asking why we go through all the bother of binary numbers when the decimal
system has worked so well for humans for so long.
Computers only understand two states of being, off and on, represented by the bits 0 and 1 respectively.
Computer hardware would be incredibly large, expensive, and resource-intensive if they were made to
handle ten different states of data.
Binary data, when run through hardware, is seen as power applied or power not applied. An incredible
level of precision and regulation would have to be built into the hardware to modify the applied
electrical voltage so minutely as to fluctuate between ten levels of power.
Specially-designated binary numbers also represent various alphabets, including ASCII and Unicode.
ASCII is an older system for representing characters, and Unicode is the current international standard
for characters.
Binary data also typically comes in specific lengths, for example, eight bits is called a Byte and two Bytes
(16 bits) are called a Word. When the incoming data follows these guidelines, it is easy for the hardware
to process and compute the desired result.
File storage on your computer is referenced in Byte size. For example, your favorite app might be 250
Megabytes (MB).
Hexadecimal
Hexadecimal (base 16), often called “hex,” is a convenient and concise way to represent binary numbers
on a computer. Hex numbers are often used for values like colors and any other place where we need to
represent bits more space efficiently. They are also commonly used to represent memory addresses.
Every four binary digits become a single hexadecimal digit, which simplifies conversions between the
two bases. Because hexadecimal is base 16, we must have 16 numerals, including zero. Here is the
standard representation for the 16 numerals (remember to scroll to see the entire table):
Decimal Hexadecimal
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
Notice the use of the letters A, B, C, D, E, and F, which means “15” (F) is the largest numeral in any
column.
0xA9FC = 0b1010100111111100
Value of a Digit
When we see a number in a base other than 10, we might find it difficult to understand the actual value
of that number. In this section, we’ll go over converting a non-decimal number to a decimal value.
The value of a digit is determined by its placement in a number. Its decimal value is determined when
we take the digit value and multiply it by the base value to the power of the exponent value.
The exponent value begins at 0 for the rightmost digit. The exponent value increases by 1 each time we
move one digit to the left.
Take the decimal number 123. Note that decimal values have a base of 10.
The rightmost digit is 3. To determine this digit’s decimal value, we must multiply 3 by the base value 10
to the power of 0 (100) which equals 3.
The next value will be the digit to the left. In our example, 2 will be the next digit. To find this digit’s
decimal value, we will use the same formula as before, but this time we will increase the exponent value
by 1. So, the decimal value of the second digit is 2 times 101 which equals 20.
Continuing, the next digit to the left is 1. We will once again increase the exponent value by 1 to find its
value. Its decimal value is 1 multiplied by 102 which equals 100.
When we add the decimal value of each digit together, we get 100 + 20 + 3 which equals our value 123.
This seems simple with a decimal number, but we can apply this logic when determining the value of a
number on other bases too. We can find the decimal value of binary number 101 like so:
The rightmost value is 1 - its decimal value is determined by multiplying 1 with the value 2 to the power
of 0 (20) which is 1. We use 2 here since that’s the base of binary values like 10 is the base of decimal
values.
The value of the next digit to the left is 0. We’ll increase the exponent value by 1. Its decimal value
is 0 multiplied by 21 which equals 0.
The value of the next digit to the left is 1. We’ll increase the exponent value by 1 again. Its decimal value
is 1 multiplied by 22 which equals 4.
We’ll add each of the digit’s decimal values together to find the decimal value of the binary number
101. 4 + 0 + 1 = 5. So binary value 101 is equivalent to decimal value 5.
Review:
• Binary numbers are expressed in base 2, meaning they are represented using only the
values 1 and 0. Binary data can be found in computing in areas such as machine code and
Boolean expressions.
• Hexadecimal numbers are expressed in base 16. They are represented using a combination of
decimal numbers 0-9 as well as letters A-F. Hexadecimal numbers can be found in memory
addresses as well as colors.
Units of Measure in Computing
Learn about how computer features are measured and compared!
Computers are digital. This means that they operate on numbers, be it photos, music, or text
documents; everything within a computer is represented as a number, and all operations are
some form of arithmetic.
In this article, we’ll go over the most important measures of these numbers.
All data on the computer is represented in this binary notation. For example, the
number 228 can be represented as 11100100 in binary, and a lowercase j can be represented
as 01101010 in the ASCII encoding standard. These groupings of 8 bits are so common that it has
a special name, a byte.
Bytes serve as the more common unit that a person may come across, usually with unit prefixes
to represent more workable amounts of data:
10005 Bytes Petabyte (PB) All the data held by a major tech company
Luckily, modern drives are much faster than that. The storage of most devices today is solid
state drives. For portable devices such as phones, they are usually able to read files at about
1500 Mbps and write new files at 500 Mbps. Desktop devices can reach read and write speeds
of over 5000 Mbps!
Special types of storage
While these speeds can be very fast, there is a special type of short-term storage, Random
Access Memory (RAM), that is used for intermediate storage of values and is even faster! The
speed of these types of storage is typically around 20,000 Mbps! Much faster than any type of
long-term storage!
However, these numbers only cover sequential throughput. Throughput is the total amount of
data that can be transferred during a given amount of time. Another important measure
is latency, the amount of delay before that transfer of data begins. This is helpful when many
small files need to be transferred and the data seeking and accessing processes need to be
repeated many times.
Here is where RAM truly shines; newer devices usually have a latency of around 10
nanoseconds, while even the fastest solid-state drives (SSDs) have latency times of a few
microseconds or almost 1000 times slower!
Internet bandwidth and latency are measured in the same way. However, instead of
representing the speed of a specific device, measures of Internet devices consist of the entire
“pipe” that attempts to bring the data to a device.
Everything from the speed of the server providing the data, the miles of cables connecting it to
an Internet service provider (ISP), and all of the similar connections until it reaches the desired
device make up this measure. Most importantly, these speeds are decided by the slowest
device along the entire chain. Even if a consumer owns the fastest routers and computers, if the
server is an ancient turtle connected with a shoestring to the Internet, the entire connection
will be slow.
Therefore, a more important measure going forward is the number of cores a CPU contains.
Each core within a CPU can do one computation at a time. Therefore, a CPU with four cores can
simultaneously do four times as many computations as a CPU with one core. So, need to make
a computationally heavy task four times faster? Just get a processor with four times as many
cores! For well-threaded programs, it’s that simple.
Graphical processing units (GPUs) are similarly measured to CPUs, as they are both devices
focused on computations. However, with the GPU’s different goal of computing graphics comes
different implementations. They tend to have many more computational cores (up to 80!), but
with much slower clock speeds (around 2GHz).
This is an important measure because over time the cost of electricity can eclipse the cost of
the actual device. So much so that it is common for servers to be completely replaced by newer
models not because of speed improvements, but because of improvements in power
consumption.
Power consumption has other effects as well. All of the energy taken in by a device is dissipated
as heat, so more powerful devices will typically need complex cooling solutions to best maintain
performance.
Review:
• Throughput is the total amount of data that can be transferred in a given amount of
time.
• Latency is the amount of delay before that transfer of data begins.
• The smallest unit of data is the bit, and the performance of any data transfer, be it long-
term storage devices, short-term RAM, or Internet devices is measured in the
throughput and latency of this data.
• Both CPUs and GPUs have similar measures for computation performance. Each is made
up of cores that can do one operation at a time, and these cores have set clock speeds
that determine how often they can perform these operations.
• The energy devices use is measured in watts. The greater the wattage, the greater the
amount of heat the device creates. Electricity costs can be a substantial part of the cost
over the lifetime of the device.
OVERVIEW OF THE INTERNET
Hello, Internet
It is nearly impossible to overstate how much the internet has changed how
we consume information and communicate with one another. More than four
billion people around the world are internet users and the total number of
websites on the world wide web is nearing two billion.
Despite the presence of the internet in our lives, very few internet users
understand how it works. You don’t need to be an engineer to benefit from
understanding how the internet works. However, understanding the internet’s
infrastructure will help you decide if learning web development is right for
you.
In this lesson, you will learn how the internet works behind the scenes. After
finishing this lesson, you’ll be able to answer questions like:
By the end of this lesson, you will have the knowledge that you need to
collaborate more effectively with engineers and jump into your career in web
development.
TCP/IP was researched and specified throughout the 1970s and adopted in the
early 1980s. As different networks adopted TCP/IP, the interconnected global
network of networks that is today known as the internet was formed.
Engagement with the internet changed in 1989 when Tim Berners-Lee invented
the world wide web. The world wide web is a collection of interlinked websites
and other web resources. The world wide web, in combination with the rise of
web browsers in the 1990s, introduced a user-friendly interface that enabled
users to browse multimedia content and interact with other users.
The server is the device or program in that network that waits for incoming
requests and sends back data. This might be an in-house server, a rented
server at a data center, or a cloud server. At Codecademy, we have servers that
store lesson data, and our servers are sending this lesson data to your client
device.
404 Status Code
Let’s take a deeper dive into the client-server model by exploring a part of
HTTP that you’ve probably seen before: HTTP status codes.
When a server responds to a client, the server specifies a status code as a part
of the response. Status codes indicate whether or not the HTTP request was
completed and if there was an error, they contain some information about the
type of error that happened. The status code helps the browser know how to
handle the data that was sent back with the response.
Review the HTTP statuses below and see if any of them seem familiar.
Instructions
1. The browser is currently displaying a website that Alex has created to
show photos and descriptions of her pets. If you click on the links
for Dogs or Cats, you can see more information about Alex’s dogs and
cats.
2. Next, click on the file icon in the upper left corner of the text editor.
You’ll see the different HTML files that the server is ready to send to the
browser whenever those links are clicked. These HTML files
corresponding to the different web pages that are displayed in the
browser. When the Dogs link is clicked, the server will send
the dogs.html file to the client.
3. Try out the Dogs and Cats links now!
4. Let’s create a 404-status response by requesting a non-existent
resource. Alex hasn’t built a webpage to list her turtles! Click on the link
for Turtles to see the browser display the 404-status code.
So how does this process work when we’re making multiple requests
simultaneously?
1. When a user types in a URL and presses enter, the server processes the
request and sends the HTML file back to the client. HTML files hold the
content of a website and they also contain links for any additional assets
or code that are needed to display the site properly.
2. The browser will begin to search for elements in the HTML file and it will
start to make additional HTTP requests for any other external resources
used by the HTML file. This often includes:
• One or more CSS stylesheets. CSS stands for cascading style sheets; CSS
creates the style and layout of a web page. The browser will request the
CSS stylesheet, and when the server sends it back, the browser analyzes
the CSS and starts applying the visual styles to the content of the site.
• The request-response cycle also sends website assets, like images and
videos, from the server to the browser. If these files are large, there
might even be a noticeable delay before they are rendered by the
browser.
• One or more JavaScript files. JavaScript makes the webpage interactive.
This programming language functions as the “behavior” of the web
page. A webpage that does not use JavaScript is known as
a static webpage.
In most modern browsers, these additional requests are made in parallel. This
means that these requests are initiated at the same time, and the browser
does not wait to receive one resource before requesting the next resource.
All of the resources are typically displayed as soon as possible. The HTML will
be displayed even if some of the other assets have not been received by the
browser.
Voila! The user can now interact with the website that they requested to see.
This whole process typically happens in about a second or less, depending on
the speed of the user’s connection, the size of the website, and even the
physical distance between the browser and the server.
Review:
Your device uses a network connection and goes through a series of defined
network protocols to send and receive information.
Our computers and devices can communicate due to a large set of standards,
much like we have road systems and traffic protocols when we drive a car.
These network standards have been built by the community over the decades,
and these standards guide engineers and security professionals.
Types of Networks
LAN
A Local Area Network (LAN) is a smaller network that
connects multiple devices in a limited area. Examples of
LANs include small offices, a home, or any other network
contained within a small area
CAN
A Campus Area Network (CAN) connects multiple
computers and devices over a slightly larger area. In
many cases, these types of networks will connect
multiple buildings located in the same vicinity. You
may see these networks in a university where multiple
buildings and outdoor spaces provide students with
network access.
WAN
A Wide Area Network (WAN) connects multiple
computers over a geographically large area. Large,
international organizations may operate these types of
networks. To ensure that computers spread over large
regions can communicate, companies may use
a VPN (Virtual Private Network) to connect systems
securely. A VPN can allow systems across large regions
to connect and interact with one another on the same
network.
Since we’re all connected to the Internet, the whole Internet can technically be
classified as a WAN!
Layer 1 – Physical
The Physical, and lowest layer of the model, covers how unstructured data, like
bits, is transmitted. Some concrete examples of this are the ways wires are
configured, the way signals are transferred over those wires, and the radio
frequencies computers use. Technology such as Wi-Fi, Bluetooth, and cable
standards such as CAT5 and CAT6 all operate at this layer. This layer also
includes the hardware part of modems, adapters, and repeaters.
Over these wires and signals, the raw data bits are received as a stream of 0s
and 1s. Fixing errors that occur just at this layer means considering physical
damage or interference.
Layer 2 – Data Link
The Data Link layer covers how data is sent from device to device when they
are connected to the same local network.
Layer 3 – Network
The Network layer describes how data packets are routed between wider
networks such as the Internet. Whereas a data frame at the data link layer
travels to local MAC addresses, a data packet at the network layer is routed
from a source IP (Internet Protocol) address to a destination IP address.
192.168.0.1
At this layer, there are routing protocols designed to help packets (aka, our
envelopes) get from point A to point B as quickly as possible over the Internet.
Your nearest router is one of the many routers connected to the Internet that
help packets find where they need to go!
Layer 4 – Transport
The Transport layer refers to how data is transferred. Let’s say you wanted to
upload a photo from your phone onto social media. The transport layer
handles how the image data from that photo is split (segmentation), the rate
at which the packets are sent, and how errors are handled if data packets
don’t make it to the site’s server.
The most common transport protocols on the Internet are TCP (Transmission
Control Protocol) and UDP (User Datagram Protocol). We’ll go into these two
protocols later in this lesson!
OSI Layers 5, 6, 7
Layer 5 – Session
When two computers or devices have started an exchange of information, we
call that a session. The Session layer in OSI is responsible for opening, closing,
and maintaining sessions.
In terms of opening and closing, the session layer includes authentication and
authorization measures. For example, without logging in or having the right
permissions, you may not be able to connect to parts of a website. But if you
are logged in, your access permission is stored for a set amount of time or
session length.
Layer 6 – Presentation
The Presentation layer includes all the methods that convert data into a format
usable by an application. This layer handles functions such as
encoding/decoding, encryption/decryption, and compression/decompression
of files.
Layer 7 – Application
The final layer of the OSI model is the Application layer. This layer includes
websites, browsers, email, mobile applications, and how they render Internet
data so that we can interact with it.
TCP/IP Model and Implementation
The OSI Model isn’t the only model that describes networking.
You will hear more often about the TCP/IP model, which is a 4-layered model
that makes direct reference to current Internet implementations. Its
foundational protocols are TCP and IP.
Application Layer
This includes the opening and closing of sessions, translating data, and
interacting with content at the application level. Here, there are multiple
protocols for web content, email, and accessing files, including HTTP, FTP,
SMTP, and more.
Transport Layer
TCP and UDP are the core protocols here.
UDP is a more lightweight protocol that does not require a fixed channel
between a sender and receiver. It is often used when the amount of data sent
is piecemeal and needs to be transmitted quickly.
Now that we have a conceptual model of everything it takes for data to travel
in a network, let’s talk about some of the most common network protocols we
use every day.
What are network protocols? They are simply a set of standards for devices
interacting on the Internet! It’s important to understand these protocols from
the angle of network security. Threat actors often abuse the rules of a protocol
to gain access to sensitive information.
In this exercise, we’ll talk about a few protocols within the TCP/IP
implementation Application layer.
DNS
The Domain Name System (DNS) protocol converts
domain names to IP addresses. Think of it as a
phonebook for the Internet. It’s hard to remember an
exact IP address when we want to access a website.
When we request the URL codecademy.com, our computer
sends a DNS request to a DNS server. The server then
returns the correct IP addresses to route data to and
from Codecademy.
HTTP
The HTTP (The Hyper Text Transfer
Protocol) handles our web requests to servers.
HTTP uses a set of verbs, like GET, POST, PUT,
and HEAD, to retrieve and send data. Anytime a
page is loaded, there are multiple web requests
to retrieve content like images, text, and
formatting code.
DNS TCP/UDP 53
The protocols in the last exercise are all involved in everyday Internet activity.
Below are some other Application-layer protocols that are more commonly
used by IT professionals.
SSH
Secure Shell (SSH) is used to access a remote terminal
or virtual machine (VM) over a secure connection. IT
professionals and engineers use this to help configure
and program a system remotely and securely. For
example, accessing GitHub from the command line uses
SSH!
FTP
SMB
The Server Message Block (SMB) protocol
allows multiple users to interact with a
remote system like a file share or printing
services. Multiple people can view and
modify shared resources and files in a
centralized server.
Again, these are some of the protocols that are most often used and
configured by IT professionals. They are central to the behind-the-scenes work
of maintaining the web.
Review
Networks, and the technology behind networking, help us connect to the
world around us. By following multiple protocols, we’re able to use physical
technologies to exchange a massive amount of information every single day.
To review, we’ve:
The four main functions of a computer are input, processing, memory, and output; but where
do operating systems fit into this? In this article, we’ll go over the various responsibilities of an
operating system at a high level.
• Use our mouse to open up our favorite music application and turn up our speakers to
enjoy our favorite song.
• Start up a word processing software to write something for work and then save it to our
computer in a folder we use specifically for our job.
• Open up an internet browser to write an email while playing our favorite online
multiplayer game.
The possibilities are truly endless. The process of interacting with our computers to do these
types of activities often seems easy from our perspective. The truth is, these tasks are quite
complicated from the perspective of our computers. Let’s revisit this task:
Use our mouse to open up our favorite music application and turn up our speakers to enjoy our
favorite song.
For our computer to accomplish this task, it needs to handle the input of mouse movement and
mouse clicks, fetch the data necessary to run the software responsible for the music
application, run that software, retrieve the data necessary to play a specific song, communicate
with the speaker to output this song, handle the input of the speaker dial being turned, and
communicate with the speaker to output the music at a louder volume.
That’s a lot of work being done in just a few seconds! Lucky for us, as users, we don’t have to
think about any of this. The responsibility of handling tasks like this fall on the operating
system.
What is an operating system?
An Operating System, or OS, is system software that’s responsible for handling the basic
functionalities of a computer. Some examples of popular OSs are:
• Windows
• Linux
• Mac
• Android
• iOS
Every computer contains at least one operating system which starts working the moment a
computer is turned on. The OS has control over both the software and hardware resources of a
computer. At the core of an operating system is the kernel which manages all the interactions
between the hardware and software components of a computer.
Functions of an OS
Take a look at some of the vital functions of an OS:
• Process Management
• Memory Management
• File Management
• IO Management
• Multitasking
• Networking
• Security
• Providing a user interface
We’ll focus on the following: process management, memory management, file management,
and IO management.
Process Management
Our computers run a lot of software. Word processing documents, internet browsers,
spreadsheet documents, video games - all these are examples of software. But how does the
software know what to do? Being on Codecademy, we might already be familiar with this
answer - computer programs! Computer programs contain specific instructions that dictate
how a program should work when they’re run.
When we run a program, the instance of that execution is represented by a process. Operating
systems handle the responsibility of managing active processes.
Memory Management
We utilize a significant amount of memory to store data in our computers; however, not all
data is treated the same! Some data, like pictures, need to be stored permanently. Other data,
like the information we need to run a process, only needs to be stored temporarily while the
application is in use. This temporary memory is known as primary, or main, memory. While
hardware like hard disks is used to store permanent data, the operating system is responsible
for the management of primary memory stored in RAM.
IO Management
Keyboards and speakers and mice, oh my! IO stands for Input/output and represents the
devices used for interaction. A mouse is considered an input device because we use them to
send data to our computer. A monitor is regarded as an output device since it is used to
communicate data (like an image) to us, the user. The operating system plays a large role in
managing IO by ensuring communication between IO hardware and IO software.
Review:
• The operating system (OS) is system software that manages the basic functionalities of a
computer.
• Every computer has at least one operating system. The operating system starts running
as soon as a computer is turned on.
• Some of the tasks that an OS is responsible for our process management, memory
management, file system management, and IO management.
FILESYSTEMS
Introduction to Filesystems
Whether it is playing music, looking at photos, or watching a movie,
computers are responsible for holding a lot of data. Having this data be stored
safely in an efficient way is critical for the operation of any computer and the
filesystem is the component within the operating system that handles this.
The filesystem is the data structure used by the operating system to store and
retrieve data. This is a software abstraction that allows developers to
manipulate data without having to be concerned with the minutiae of how
each storage device works.
This data is organized into files that are units of storage used to describe a
self-contained piece of data. Each file has a format depending on what that
file contains. This is indicated by the file’s extension that follows the file’s
name.
These files are in turn organized into directories. A directory is a data structure
that contains references to files and other directories. They are typically
organized in a hierarchical tree structure called a directory tree, as shown in
the image on the right.
In this lesson, we’ll learn about the metadata and permissions that organize
files, the layers of abstraction that make up a filesystem, and common
operations for files and directories.
Alongside this bookkeeping metadata, files can also have attributes that
indicate special behavior. While this differs on the operating system, common
attributes include:
Example images of file metadata, permissions, and attributes in MacOS (left) and
Windows (top right and bottom right). This shows information such as when the
file was created, who can read the file, and if it is ready to be archived.
File Permissions Overview
Within the file permissions are controls for the three main actions that can be
performed on a file: reading, writing, and executing. These permissions differ
by the user as well as collections of users called groups.
In Unix operating systems, the permissions for a file are represented using a
line of 10 characters. The first character can either be - for a file or d for a
directory. The other 9 characters are separated into three equal parts called
triads.
The first triad containing the first three characters contains the permissions for
the owner, the second triad contains the permissions for the group, and the
third triad contains the permissions for any other user outside of this.
A directory from a Linux operating system showing the permissions for a variety
of files:
• For apple, -rw------- means that the file is readable and writable for only
the owner.
• For banana, -rw-rw-rw- means that
the file is readable and writable for
all users on the system.
• For cranberry, -rwxrwxrwx means
that the file is readable, writable,
and executable for all users on the
system.
• For pear, -rw-r--r-- means that the
file is readable and writable for the
owners, but only readable for
everybody else.
• For raspberry, -r--r--r-- means that the file is read-only.
Hardware Representation of Data
As data is the cornerstone of how a computer operates, discussing its physical
representation is crucial to best understanding it. What does it look like in the
real world when a file is saved onto a hard drive?
For this discussion, we will focus mainly on the spinning metal hard disc drive,
as most of the design choices for filesystems were based on their inclusion
and they are still the most prevalent form of data storage, especially in servers.
Within a hard disk drive is a spinning platter with a thin magnetic coating. A
pointy head that looks like a thin fountain pen moves over this platter to etch
data into the platter by adjusting the direction of the magnetic field at an
incredibly precise location.
The smallest chunk of this physical storage is called a sector. It is the smallest
unit of storage for the physical drive and its size is determined by a balance
between excessive metadata and wasting space.
Smaller sectors require more information to index the entire drive, like a
librarian trying to organize millions of small pamphlets. This ruins performance
for finding files as well as creates substantial overhead for documenting the
location and content of each sector.
However, larger sector sizes also have drawbacks. For example, if saving a file
that has a size of 512 bytes and the sector size is 4096 bytes, the entire sector
is written and used, effectively wasting 3584 bytes of space.
This is abstracted further in the software filesystem, where blocks are used to
represent groupings of sectors. This is used as an abstraction so that the
operating system and all of the applications that reside on it can have a
common block size to target instead of needing to accommodate whatever
arbitrary sector size is chosen by the hardware manufacturer.
A sector is shown as a small region on a hard disk drive, while a block is a
collection multiple such sectors.
For example, user applications such as text editors make up the highest layer.
At this level, a developer can easily and abstractly request to write to a file.
However, this simple task becomes more intricate as it bubbles down to the
lowest device layer. At this level, the on-board computers of the storage
device need to activate certain motors with a precise amount of force to alter
the magnetic state of a sector of the drive.
Application Programs - The day-to-day programs that are run by the user,
like web browsers and text editors.
Logical File System - The system that manages the file control blocks
containing the metadata of files such as file permissions, owners, sizes, and
access times. Simplifies the access to files for applications regardless of how
the underlying filesystem or hardware organizes them.
Basic File System - Communication layer between software block layout and
hardware sector layout. Schedules IO requests and manages resource blocks
for file-organization module.
IO Control - The low-level software drivers that can communicate with the
storage device’s controller. Understands how to manipulate the physical
device to read and write data.
Devices - The mechanisms of the physical storage devices. For example, the
motors and controls that do the physical act of storing data within the
medium, be it changing the magnetic state of spinning disks or altering the
placement of electrons in flash storage.
The hierarchy of the many layers of the filesystem. The top is the most user-
facing applications, while the bottom is the hardware devices:
File Operations
A file can be manipulated in a variety of ways. In fact, Unix built upon this to
create an operating system where everything is treated as a file. Therefore,
learning some simple command line file operations is crucial:
• New empty files are commonly created using the touch command.
• The contents of a directory can be listed using the ls command. (Be sure
to type a lowercase “L” as in “list” and not the number 1.)
• A string of text can be output to the terminal using the echo command.
This is useful in coordination with the > operator that redirects the text
output to a file.
• A file can be output and read using the cat command.
• A file can be deleted using the rm command.
Instructions
1.
Using the command line, create a new file called lunch using the
command touch lunch.
Optionally, you can verify that this file has been created by using the
command ls to list all the files in the current directory.
Checkpoint 2 Passed
Hint
Type touch lunch into the command line and press enter. After, type ls into the
command line and press enter.
Remember to type the ls command using a lowercase “L” as in “list” and not
the number 1.
2.
Write a list of foods such as burger, salad, and sandwich to the lunch file using
the following command:
Optionally, you can verify this by reading the file using the command cat
lunch.
Checkpoint 3 Passed
Hint
Type:
into the command line and press enter. After, type cat lunch into the
command line and press enter.
3.
Hint
Directory Operations
Directories give a hierarchy to files and therefore learning commands for their
manipulation is important as well:
• New empty directories can be created using the mkdir command. This
can also create directories within existing directories, called sub-
directories.
• Again, the contents of a directory can be listed using the ls command.
• A directory can be deleted using the rm command with the -r recursive
flag to also delete any files it may contain.
Instructions
1.
Using the command line, create a new directory called dinner using the
command mkdir dinner.
Verify that this new directory has been created using the command ls to list
all the files in the current directory.
Checkpoint 2 Passed
Hint
Type mkdir dinner into the command line and press enter. After, type ls into
the command line and press enter.
2.
Create 2 more directories within the dinner folder using the command:
Hint
Type mkdir dinner/entree dinner/dessert into the command line and press
enter. After, type ls -R into the command line and press enter.
3.
Create a variety of files within these new folders using the command:
touch dinner/entree/turkey dinner/entree/fish dinner/dessert/cake
dinner/dessert/pudding
Hint
Type:
into the command line and press enter. After, type ls -R into the command
line and press enter.
4.
Hint
Filesystems are the data structure used by operating systems to store and
retrieve data. Therefore, they are crucial for the daily operations of a computer
and learning about them.
The building blocks of the filesystem are the files themselves. A file is a unit of
storage used to describe a self-contained piece of data.
Files can have a variety of formats depending on the type of data that they
store, as indicated by the file extension following their name.
Files have permissions that determine which users and groups can read, write,
and execute that file.
Directories are the data structure that contains references to files as well as
other directories. Both files and directories can be created, opened, written,
listed, and deleted using a wide variety of commands.
The file system itself is organized in a collection of abstract layers. These layers
include the applications, logical file system, file-organization module, basic file
system, IO control, and the storage devices themselves.
Understanding Applications
Learn about what applications are and how to manage them.
What is an application?
An application (or “app”) is a computer program that performs a certain task.
You’re using an app right now to read this! A web browser is just one of the
many apps you have on your computer.
The framework that an app is anything that takes care of a certain task is
powerful. If there is no existing app to address a task, someone can build their
own! Of course, starting this journey requires building technical knowledge!
Types of applications
There are many different types of apps, and some can fit into multiple
categories or defy classification altogether. However, there are a few broad,
non-exhaustive categories that many if not most apps fall into.
Productivity applications
Productivity apps allow users the ability to perform daily tasks and engage
with information in an efficient way. A word processor is considered a
productivity app. A lot of time is saved by typing documents on a word
processor rather than a typewriter. A web browser is a productivity app too as
it is much faster to search a term online rather than page through an
encyclopedia.
Collaboration applications
Then there are collaboration apps. These apps help people work together and
communicate efficiently. Email and video-conferencing applications would fall
into this category.
Business applications
A third category you should be aware of is business apps. Apps in this
category revolve around certain business needs. Included here might be a
stock-trading app, an accounting app, or a supply-chain management app.
Managing applications
Viewing a running application
Being able to determine which apps are currently running is critically
important to IT. Sometimes apps will operate in the background. Between
foreground and background apps, you can sometimes lose track of all the
apps you’re running. When too many apps are open, our computer can slow
down as its hardware struggles to keep up with all the requests.
Killing an application
Sometimes, an error may occur and an app stops responding to your
computer. When this happens, you will not be able to interact with the app
until it starts responding again. But since you may be waiting indefinitely, you
may just want to force the app to close so that you can relaunch it.
Try this on your computer
For PC users
To view running apps, press CTRL + ALT + DELETE . Once you do this, you will
see a screen with a variety of options. Click Task Manager. You should now see
a window with several currently-running apps.
To kill an app, open Task Manager, click on the name of the app you wish to
close and then click End Task.
Review:
A computer without apps is like a video game console without any games.
Your computer is a powerful tool, but without apps, it is a tool with no
purpose.
Beyond just the importance of apps, though, you should take away a few key
points from this article.
• Certain apps can work on more than one operating system while others
cannot. The ones that cannot are called single-platform apps; the ones
that can are called cross-platform apps.
• There is a wide range of apps, but some key categories are productivity,
collaboration, and business.
• Using your computer’s tools, you can know what apps are running and
close any or all of those apps.
What is Programming?
Programming is a collaboration between humans and computers.
PROGRAMMING IS EVERYWHERE
Programming is, quite literally, all around us. From the take-out we order to
the movies we stream; code enables everyday actions in our lives. Tech
companies are no longer recognizable as just software companies — instead,
they bring food to our door, help us get a taxi, influence outcomes in
presidential elections, or act as a personal trainer.
For many years, only a few people have known how to code. However, that’s
starting to change. The number of people learning to code is increasing year
by year, with estimates of around 26.2 million software developers worldwide,
which doesn’t even account for the many OTHER careers that relate to
programming.
WHAT IS PROGRAMMING?
Put simply, programming is giving a set of instructions to a computer to
execute. If you’ve ever cooked using a recipe before, you can think of yourself
as the computer and the recipe’s author as a programmer. The recipe author
provides you with a set of instructions that you read and then follow. The
more complex the instructions, the more complex the result!
Over the past century, humans have been trying to figure out how to best
communicate with computers through different programming languages.
Programming has evolved from punch cards with rows of numbers that a
machine reads, to drag-and-drop interfaces that increase programming speed,
with lots of other methods in between.
via GIPHY
PROGRAMMING AS COLLABORATION
“The problem with programming is not that the computer isn’t logical—the
computer is logical, relentlessly literal-minded.”
Ellen Ullman, Life in Code
The computer is just one (particularly powerful) tool in a long list of tools that
humans have used to extend and augment their abilities.
As mentioned before, computers are very good at certain things and well, not
so good at others. But here’s the good news: the things that computers are
good at, humans suck at, and the things that computers suck at, humans are
good at! Take a look at this handy table:
Just imagine what we can accomplish when we work together! We can make
movies with incredible special effects, have continuous 24/7 factory
production, and improve our cities and health.
via GIPHY
The best computer programs are the ones that enable us to make things that we
couldn’t do on our own but leverage our creative capacities. We may be good at
drawing, but a computer is great at doing the same task repeatedly — and
quickly!
CONCLUSION
As programming becomes a larger part of our lives, everyone must have an
understanding of what programming is and how it can be used. Programming
is important to our careers, but it also plays a key role in how we participate in
politics, how we buy things, and how we stay in touch with one another.
For example:
numberOfApples = 12
The above example shows a variable numberOfApples set to a value of 12.
Variables are an important first step in coding because with variables we can
start using an important programming tool: repetition. Rather than writing out
a piece of data every time we need it, we write it out once and the computer
remembers it and can repeat that information back.
Imagine that you’re building a game using tiles with different patterns,
representing different terrains. We can consider Terrain One, Terrain Two, and Terrain
Three as variables - the data they store represents the type of terrain shown on
the tile.
Data Types
Data types are exactly what they sound like: different types of data. Data types
tell us about the data, including how it can be stored and what types of
operations we can perform. For example, we can write a program that squares
numbers, but it wouldn’t be able to square a word.
• Numbers
• Strings - any sequence of characters such as "Hello!"
• Booleans - a True or False value
Computers can do different things with different kinds of data. This computer
will process data according to the function that you give it. If the function
matches the data type, you will get an answer! If it doesn’t, you’ll see an error.
In computing, we work with lots of different forms of data. But the real fun
comes when we can do something with this data.
Operators are different symbols that represent an operation, such as the plus
sign (+) as a symbol for addition. Operations enable us to process our data, to
transform it into something else. There are different ways we can use
operators in programming.
Arithmetic Operators
If we want to write a program that performs calculations, we need to
use arithmetic operators. They include addition (+), subtraction (-),
multiplication (*), and division (/).
Comparison Operators
Comparison operators allow us to compare values and evaluate their
relationships true or false, AKA Boolean values. Expressions that evaluate to
Boolean values are known as Boolean expressions. Comparison operators
include:
• Less than < — value to the left is less than the value to the right: 2 < 6
• Greater than > — value to the left is more than the value to the right: 14
> 5
• Equals == — value to the left is equal to the value to the right: 3 == 3
Logical Operators
Logical operators, also known as Boolean operators, evaluate multiple Boolean
expressions. It looks at several relationships by connecting them with logical
operators and then determines the logic/validity of the overall expression.
Logical operators include:
In our social media example to the right, all the instructions are shown in the
diagram, but only some of them will be executed each time. Here they are in
text form:
When is step 2 executed and when is 3 executed? The answer is: it depends.
The control flow is 1-2 if the profile is private and 1-3 if the profile is public.
The condition is the privacy setting on the profile.
Lists
When we start writing more complex programs, we’ll start working with more
pieces of data. But data can get messy real fast if we’re not careful.
To keep our data tidy, we’ll want to use data structures. Data structures are
formats that we can use to keep track of our data in an organized fashion.
Lists are one very basic data structure. Programmers use lists as a container to
store multiple pieces of information that relate to each other in some way. Like
a list of the presidents of the US, types of cheeses in alphabetical order, and
the finishing positions of runners in a race. Lists are useful because we can
add, remove, search through, and access values within them.
What makes lists special is that they order our data in a specific, linear
sequence. Since our values are kept in order, it allows us to easily find the
information we’re looking for; otherwise, we’d have a huge jumbled mess of
data!
The position of value in a list is known as its index. You can think of an index
like an address - it’s what we use to locate an item in a list.
List indices (the plural of index) are numbers. Usually, lists will start their index
at 0 and then add one for each value. So, if you want to select the first item in
the list, make sure to remember to use 0 in order to do so!
Functions
Imagine we were creating a sandwich-making program for a store. The four
instructions could be to add bread, add peanut butter, add jelly, and then add
another bread on top. Sounds easy, right?
But imagine needing to write enough code for 1000 sandwiches? That requires
us to write a lot more code over and over again. Luckily, we can use functions
to make this process easier!
However, no store only sells peanut butter and jelly sandwiches - our program
needs to be able to make all kinds of sandwiches. Instead of writing a different
function for each type of sandwich, we can have one function that can make
them all!
Review:
• Variables are named pieces of data. We can create and update the value
attached to a variable.
• Operators allow us to process and transform data. There are different
kinds of operators like arithmetic operators, conditional operators, and
comparison operators.
• Data types are used to specify various kinds of data, such as numbers,
strings, or Booleans.
• Conditionals use true or false expressions to determine whether a block
of code is executed or not.
• A loop is a block of instructions that is executed repeatedly for a
specified number of times.
• A list is a data structure that stores multiple pieces of data.
• A function is a reusable block of code that can be called multiple times
in a single program.
Password validator
The problem
Passwords are everywhere, and we create them all the time to access a great
array of services. However, it can sometimes be helpful to guide users to make
stronger passwords. This can be done by imposing some restrictions on what
passwords are considered valid.
• supers3cure
• james1510
• meandmy2dogs
But these would not:
• password
• dog
• hunter2
We have all seen plenty of passwords like these, so let’s come up with a simple
algorithm to validate passwords like this!
The solution
First, let’s take this problem and brainstorm some steps to validate passwords
that are at least 8 characters long and also contain a number:
If so, set the contains_number variable to True and then go back to step 4.
8. Is the pass_length greater than 8 and is contain_number equal to True?
Terminal
The terminal is an oval that indicates the beginning and end of a program. It
usually contains the words Start or End.
Flowline
The flowline is a line from one symbol pointing towards another to show the
process’s order of operation. This displays the flow of execution in a program.
Input/Output
Input/output is represented by a rhomboid and indicates the input or output
of data. This is similar to setting a value to a variable.
Process
A process, represented by a rectangle, is an operation that manipulates data.
Think of this as changing the value of a number-based variable using an
operator such as +.
Decision
Decisions are represented by a rhombus and show a conditional operation
that will determine which path a program should take. This is similar to
conditional statements which control the flow of execution in a program.
To create pseudocode from what we have so far we can use the flowchart’s
flowlines to guide the structure of our code as we simplify the steps we
outlined earlier:
define password
create a pass_length variable and set it to 0
create a contains_number variable and set it to False
if the entire password hasn't been searched:
iterate to the next character of the password
increment the pass_length variable
if the current character of the password contains number:
set contains_number to True
if pass_length is greater than 8 and if contain_number is equal to True:
valid password
otherwise:
invalid password
The final code
Now the closing moments! With pseudocode in hand, the algorithm can be
programmed in any language. Here it is in Python:
Review:
What is a Database?
A database is a set of data stored in a computer. This data is usually structured
in a way that makes the data easily accessible.
What is a Relational Database?
A relational database is a type of database. It uses a structure that allows us to
identify and access data in relation to another piece of data in the database.
Often, data in a relational database is organized into tables.
Tables can also have many columns of data. Columns are labeled with a
descriptive name (say, age for example) and have a specific data type.
For example, a column called age may have a type of INTEGER (denoting the type
of data it is meant to hold).
In the table above, there are three columns (name, age, and country).
The name and country columns store string data types, whereas age stores integer
data types. The set of columns and data types make up the schema of this
table.
The table also has four rows, or records, in it (one each for Natalia, Ned, Zenas,
and Laura).
What is a Relational Database Management System (RDBMS)?
A relational database management system (RDBMS) is a program that allows
you to create, update, and administer a relational database. Most relational
database management systems use the SQL language to access the database.
What is SQL?
SQL (Structured Query Language) is a programming language used to
communicate with data stored in a relational database management system.
SQL syntax is similar to the English language, which makes it relatively easy to
write, read, and interpret.
Many RDBMSs use SQL (and variations of SQL) to access the data in tables. For
example, SQLite is a relational database management system. SQLite contains
a minimal set of SQL commands (which are the same across all RDBMSs).
Other RDBMSs may use other variants.
MySQL
MySQL is the most popular open source SQL database. It is typically used for
web application development, and often accessed using PHP.
The main advantages of MySQL are that it is easy to use, inexpensive, reliable
(has been around since 1995), and has a large community of developers who
can help answer questions.
Some of the disadvantages are that it has been known to suffer from poor
performance when scaling, open source development has lagged since Oracle
has taken control of MySQL, and it does not include some advanced features
that developers may be used to.
PostgreSQL
Oracle DB
Oracle Corporation owns Oracle Database, and the code is not open sourced.
The main disadvantage of using Oracle is that it is not free to use like its open
source competitors and can be quite expensive.
SQL Server
Microsoft owns SQL Server. Like Oracle DB, the code is close sourced.
Microsoft offers a free entry-level version called Express but can become very
expensive as you scale your application.
SQLite
SQLite is a popular open source SQL database. It can store an entire database
in a single file. One of the most significant advantages this provides is that all
of the data can be stored locally without having to connect your database to a
server.
SQLite is a popular choice for databases in cellphones, PDAs, MP3 players, set-
top boxes, and other electronic gadgets. The SQL courses on Codecademy use
SQLite.
For more info on SQLite, including installation instructions, read this article.
That being said, let’s take a look at some of the more subtle details:
The SQL language is widely used today across web frameworks and database
applications. Knowing SQL gives you the freedom to explore your data, and
the power to make better decisions. By learning SQL, you will also learn
concepts that apply to nearly every data storage system.
The statements covered in this course use SQLite Relational Database
Management System (RDBMS). You can also access a glossary of all the SQL
commands taught in this course.
Relational Databases
A table is a collection of data organized into rows and columns. Tables are
sometimes referred to as relations. Here the table is celebs.
A column is a set of data values of a particular type. Here, id, name, and age are
the columns.
A row is a single record in a table. The first row in the celebs table has:
• An id of 1
• A name of Justin Bieber
• An age of 22
All data stored in a relational database is of a certain data type. Some of the
most common data types are:
The structure of SQL statements varies. The number of lines used does not
matter. A statement can be written all on one line, or split up across multiple
lines if it makes it easier to read. In this course, you will become familiar with
the structure of common statements.
Create
CREATE statements allow us to create a new table in the database. You can use
the CREATE statement anytime you want to create a new table from scratch. The
statement below creates a new table named celebs.
Insert
The INSERT statement inserts a new row into a table.
We can use the INSERT statement when you want to add new records. The
statement below enters a record for Justin Bieber into the celebs table.
Hint
Make sure there is a set of parentheses around the column names and values
to be inserted into the table!
Notice the single quotes around Justin Bieber. This is because text strings
require quotes around them, while numbers don’t.
Hint
Make sure to enter the three new INSERT statements beneath the
first INSERT statement.
Select
SELECTstatements are used to fetch data from a database. In the statement
below, SELECT returns all data in the name column of the celebs table.
You can also query data from all columns in a table with SELECT.
SELECT statements always return a new table called the result set.
Alter
The ALTER TABLE statement adds a new column to a table. You can use this
command when you want to add columns to a table. The statement below
adds a new column twitter_handle to the celebs table.
4. NULL is a special value in SQL that represents missing or unknown data. Here,
the rows that existed before the column was added have NULL (∅) values
for twitter_handle.
Update
The UPDATE statement edits a row in a table. You can use the UPDATE statement
when you want to change existing records. The statement below updates the
record with an id value of 4 to have the twitter_handle @taylorswift13.
UPDATE celebs
SET twitter_handle = '@taylorswift13'
WHERE id = 4;
1. UPDATE is a clause that edits a row in the table.
2. celebs is the name of the table.
3. SET is a clause that indicates the column to edit.
4. WHERE is a clause that indicates which row(s) to update with the new column
value. Here the row with a 4 in the id column is the row that will have
the twitter_handle updated to @taylorswift13.
Delete
The DELETE FROM statement deletes one or more rows from a table. You can
use the statement when you want to delete existing records. The statement
below deletes all records in the celebs table with no twitter_handle:
1. DELETE FROM is a clause that lets you delete rows from a table.
2. celebs is the name of the table we want to delete rows from.
3. WHERE is a clause that lets you select which rows you want to delete.
Here we want to delete all of the rows where the twitter_handle
column IS NULL.
4. IS NULL is a condition in SQL that returns true when the value
is NULL and false otherwise.
Constraints
Constraints that add information about how a column can be used are invoked
after specifying the data type for a column. They can be used to tell the
database to reject inserted data that does not adhere to a certain restriction.
The statement below sets constraints on the celebs table.
2. UNIQUE columns have a different value for every row. This is similar to PRIMARY
KEY except a table can have many different UNIQUE columns.
3. NOT NULL columns must have a value. Attempts to insert a row without a
value for a NOT NULL column will result in a constraint violation and the new
row will not be inserted.
4. DEFAULT columns take an additional argument that will be the assumed value
for an inserted row if the new row does not specify a value for that column.
Review
SQL is a programming language designed to manipulate and manage data
stored in relational databases.
In this lesson, we have learned SQL statements that create, edit, and delete
data. In the upcoming lessons, we will learn how to use SQL to retrieve
information from a database.
The Cybersecurity Industry
In this article, we will break down common domains in cybersecurity.
There are lots of overlap between different domains and cybersecurity careers,
so keep in mind that the domains are not drawn with hard lines, especially as
they keep evolving.
Security engineering
This section refers to the technical implementation of various forms of security.
• Information security, or InfoSec, protects data in any form from being accessed,
modified, shared, or deleted by the wrong people.
• Network security is concerned with the network infrastructure of an organization
that guards against unauthorized access or data from being intercepted.
• Application security refers to implementing measures that defend an application
(mobile, desktop, or web) from attack, including both software and hardware
solutions. Examples of application security include secure coding, the use of
antivirus programs, firewalls, and encryption.
• Cloud security refers to the new field of making sure resources uploaded into the
cloud are secure. Companies and users are constantly moving more resources
into the cloud, and professionals in this field need to be familiar with
implementing security in this environment.
• Cryptography focuses on methods to hide and un-hide information so that data
is only readable or usable by authorized people. This requires familiarity with all
types of encryption and hashing algorithms.
• Critical infrastructure security is defending physical systems that are becoming
more digital/networked, such as energy grids, hospitals, water and waste systems,
and even schools. Among the issues that come up are natural disasters and
outages.
Governance and compliance
It’s critical to understand international, federal, and state laws and regulations for
security. This has implications on the security operations for all organizations.
Compliance refers to making sure an organization enforces certain policies, and
continuously auditing as well.
This is becoming an increasingly important area of work. While these roles might not
require programming knowledge, these roles require foundational knowledge of
cybersecurity as well as all the laws and regulations that impact a particular industry.
How is risk managed? Through identifying risks, assessing the likelihood and potential
threat of security vulnerabilities, and finding the most cost-effective and efficient
security measures.
Security operations
People who work in this area are responsible for implementing security principles,
monitoring for incidents, and recovering from disasters. They work closely with everyone
under the security umbrella to:
Education
Security education is a growing area in itself! This domain acknowledges that the most
securely designed technologies are only as strong as the people who use them. User
education teaches best practices for people to protect themselves against cyber threats.
Security training also happens in large organizations, where employees are educated
and updated on the organization’s security policies and practices.
This domain can also include the career development and training of new security
professionals as well.
Conclusion
There are a broad set of cybersecurity roles that vary in technical expertise and required
training. There are roles that intersect with engineering, roles that intersect with
education, and roles that intersect with administration and management.