Professional Documents
Culture Documents
Computer Studies 11 Notes
Computer Studies 11 Notes
GRADE 11
SENIOR SECONDARY
SUMMARISED NOTES
TABLE OF CONTENT
Page
Chapter 1: ALGORITHM
1.1 Algorithm Planning and Designing…………………...……………………..2
Chapter 2: LOGIC GATES, CIRCUITS AND WEBSITE DESIGNING
2.1 Logic gates and Circuits……………..…………………………………...…15
2.2 Website Design and Development…………………………………...……..22
2.3 Virtual Reality and Simulation……………………………………………..35
Chapter 3: NETWORKS AND DATA COMMUNICATION
3.1 Computer Networking……………………………………………………....37
3.2 Networks Purpose and Limitations.……………………………………..….38
3.3 Elements and Networking…………….…………………………………….38
3.4 Types of Networks…………………………………………………….….....38
3.5 Network Topologies………………………………………………………...40
Chapter 4: COMPUTER SYSTEMS
4.1 Types of Computer Systems………………………………………………..43
4.2 Expert System and Artificial Intelligence………………………………......47
Chapter 5: DATABASE
5.1 Introduction to Access………………………………………………………52
5.2 Design Databases………………………………………………………...…52
5.3 Database Relationships……………………………………………………..57
Chapter 6: SOCIAL AND ECONOMIC IMPLICATIONS OF COMPUTER USE
6.1 Effects of Computer use on people and Organisations……………………..65
6.2 Data protection Legislation…………………………………………………65
Chapter 7: SPECIAL COMPUTER APPLICATION
7.1 Education………………………………………………………………...…66
7.2 Health……………………………………………………………………….67
7.3 Banking………………………...…………………………………………...67
7.4 Retailing…………………………………………………………………….68
7.5 Library………………………………………………………………………68
7.6 Commercial and General Data Processing………………………………….68
Chapter 1: ALGORITHM
Algorithm Planning and Design
- An algorithm is a sequence or procedure of instructions for solving problems.
Condition statements
Condition statements are statements which evaluate expressions and execute
instructions depending on whether the expression is True or False.
Types of Condition statements
1. (i) IF... THEN... ELSE
An IF statement starts with a condition which is tested for either True or
False or Yes or No.
Example: IF x = 1 THEN
print "Hello"
ELSEIF
print "Good night"
ENDIF
(ii) ELSE IF is used when there is more than one condition to check.
Example: IF x = 1 THEN
print "Hello"
ELSE IF x = 2 THEN
print "How are you?"
ELSE
print "Goodbye"
ENDIF
Iteration statements
Iteration statements are statements that repeat a set of instructions in order to
generate a sequence of outcomes.
Types of Iteration statements
1. FOR...TO...NEXT
The FOR loop is used to repeat code for a given number of repetitions.
Example: FOR x = 1 TO 10
print x
NEXT
2. REPEAT...UNTIL
A REPEAT loop will repeat the code block until the given condition is true.
The condition is not checked until after the code has run once, so regardless of
whether the condition is true or not the code will always run at least once. This
structure is often used for validation checks.
Example: REPEAT
INPUT x
UNTIL x < 10
This continue to take user input until the user inputs a value less than 10.
3. WHILE...DO...ENDWHILE
In a WHILE loop the code block will run, and continue to run, until the given
condition is no longer true. A WHILE loop is similar to the REPEAT loop in that
it decides when to terminate based on a condition. However the while loop
checks the condition prior to running the first time. If the condition is not true
then the code block will never run.
Example: INPUT x
WHILE x < 10
INPUT x
ENDWHILE
Answers:
1. (a) (i) Process 2. (a) 3 3. (a) Input
(ii) Output (b) True or Yes (b) Area = 20cm3
(b) Average = 5
The exam will normally ask you to create a trace table of some sort so you need to be
very confident with them. The exam will usually give you the headings but just in
case, there are several steps in making a trace table, the first one is to note the table
headings, this involves
the following:
1. VARIABLES: note all the variables in the piece of code you are looking at
(this includes arrays). Note each variable as a heading.
2. OUTPUTS: note if there is an output and put this as a heading.
3. INPUTS: if there are inputs specified, put an inputs column and be prepared to
fill it in.
It is very easy to jump right in when filling in trace tables, but you must be careful.
The exam will try and trick you, so trying to predict what a trace table will do is not a
good idea. Tackle the problem line by line, exactly as a computer would.
Example: Simple trace table
Dim num( ) as integer = {10, 8,3,5 ,6,1, 2}
Dim sum as integer = 0
Dim avg as decimal
For x = 0 to 5
sum = sum + num(x)
Loop
avg = sum / (x + 1)
Console.writeline( "average =" & avg)
Now looking at the names of the variables you might be tempted to add all the values
in the array together to find the sum, and then find the average number from this
calculation. However, you'd be wrong, create a trace table and see if you can find the
correct answer:
Answer:
num
0 1 2 3 4 5 6 sum avg x output
10 8 3 5 6 1 2 0
10 0
18 1
21 2
26 3
32 4
33 5.5 5 average
= 5.5
So what went wrong? If you look at the trace table you can see that we never added
the number 2 from the num array to the sum, it stopped at element 5.To fix this we
would adjust the following line: For x = 0 to 6
Exercise:
1. Complete the trace table for the following code, where input is 39.
Dim input As Integer = 78
Dim r As Integer
Console.Write( "Input a number:" )
input = Console.ReadLine( )
Console.Write(op)
Console.ReadLine( )
Answer:
input r op output
78
39 1 1
19 1 11
9 1 111
4 0 0111
2 0 00111
1 1 100111
0 100111
Answer:
(a) i n nums
0 12345
0 628192
0 6
1
2 8
3
4 9
5
(b) It finds the highest value in an array of values
Flowcharts
A flowchart is a graphical representation of an algorithm. Once the flowchart is
drawn, it becomes very easy to write the program in any high-level language.
Drawing Flowcharts
Rules for flowchart
• Every flowchart has a START and STOP symbols.
• The flow of sequence is from top of the page to the bottom, except for loops
which flow back to the entry point.
• Use arrow-heads on connectors where flow direction may not be obvious.
• Draw only one flowchart per page which must not break to another page.
• A flowchart should have not more than 15 symbols except for START and STOP.
Flowchart symbols
Structure of Flowcharts
Drawing Flowcharts
Draw a flowchart for each pseudo code below.
1. 2. START
START Enter A
Read x, y, z Enter B
Sum = x + y + z IF (A > B) THEN
Average = Sum ÷ 3 Big = A
Write value of Average ELSE
STOP Big = B
ENDIF
STOP
3. START 4. START
Sum = 0 Get a year
Get a value IF (year is not divisible by 4) THEN
IF (value = -1) THEN Output: not leap year
Divide sum by 1 500 and STOP ELSE IF (it is not divisible by 100)
THEN
ELSE Output: leap year
Sum = Sum + value ELSE IF (it is divisible by 400)
ENDIF THEN
STOP Output: leap year
ELSE
Output: not leap year
ENDIF
STOP
Solution:
3. 4.
Exercise:
1. Draw a flowchart for the algorithm Answer:
in pseudo code below.
START
Enter b
Enter h
IF (b < 0) or (h < 0) THEN
PRINT input error
ELSE
Calculate Area = 1/2 * b *h
Print Area
ENDIF
STOP
Answer:
2. (a) (i) Answer = multiple + m
= 75 + 75
= 150
(ii) Answer = m
= 100
(iv) Answer = m
= 110
(b) START
Multiple = m
Input multiple
IF (m < 100) THEN
Add m to multiple
ELSE
Answer = m
Output Answer
ENDIF
STOP
Testing Algorithm
The algorithm is very modular with its behavior partitioned into small functions,
most of which are independently testable.
Search function may be a case for system testing addressing functional requirements,
such as "does the algorithm deliver optimized solutions ".
Unit Testing
- Unit testing is a type of software testing that involves the preparation of
well-defined procedural tests of discrete functionality of a program that provide
confidence that a module or function behaves as intended. Unit tests are referred to as
'white-box' tests (contrasted to 'black-box' tests) because they are written with full
knowledge of the internal structure of the functions and modules under tests. Unit
tests are typically prepared by the developer that wrote the code under test and are
commonly automated, themselves written as small programmers that are executed by
a unit testing framework (such as JUnit for Java or the Test framework in Ruby).
- The objective is not to test each path of execution within a unit (called complete-test
or complete-code coverage), but instead to focus tests on areas of risk, uncertainty, or
criticality. Each test focuses on one aspect of the code (test one thing) and are
commonly organized into test suites of commonality.
assert_not_equal (p2 , s)
s .size .times {| i| assert ( (p1 [i]== s[i]) || ( p2[i]== s[i ]) ) }
end
end
9. Test odd sized population
def test_reproduce_odd
pop = Array .new (9) {|i| {:fitness => i,:bitstring =>"0000000000" } }
children = reproduce(pop , pop .size , 0 , 1)
assert_equal (9, children. size)
end
10. Test reproduce size mismatch
def test_reproduce_mismatch
pop = Array .new (10 ) {|i | {:fitness =>i,: bitstring=>"0000000000" } }
children = reproduce (pop, 9, 0 , 0)
assert_equal (9, children. size)
end
end
Chapter 2:
1. AND gate: gives a "True or On (1)" output only if all its inputs are "True or On”.
2. OR gate: gives a "True or On (1)" output if one or more of its inputs are "True or
On".
3. NOT gate or Inverter: it produces an inverted version of the input as its output.
E.g. Input "True or On (1)" produce "False or Off" output.
4. NAND gate: is a NOT-AND gate. It operates as an AND gate followed by a NOT
gate. The output is "False or Off (0)" if both inputs are "True or On (1)" Otherwise,
the output is "True or On".
5. NOR gate: is a NOT-OR gate. It is a combination of OR gate followed by an
inverter. Its output is "True or On (1)" if both inputs are "False or Off (0)."
Otherwise, the output is "False or Off".
6. EXOR gate: is the Exclusive-OR gate that gives a "True or On (1)" output if
either, but not both of its two inputs are "True or On".
7. EXNOR gate: is the Exclusive-NOR gate that gives a "False or Off (0)" output if
either, but not both of its two inputs are "True or On".
NOTE: True or On = One (1) while False or Off = Zero (0)
2. OR gate
3. NOT gate
4. NAND gate
5. NOR gate
6. EXOR gate
7. EXNOR gate
Logic Circuits
Logic circuits are electric circuit whose output depends upon the input in a that can
be expressed as a function in symbolic logic.
A logic circuit consists of a number of a logic gates. It has one or more binary inputs
(capable of assuming either of two states, e.g. “On” or “Off”) and a single binary
output. Logic circuits that are used to perform particular functions are called GATE.
Example:
From the circuit diagram below:
(a) Draw a Truth table for this circuit.
(b) State the name of the logic gate represented in this circuit.
Answers:
(a) (b) AND gate
Switch A Switch B Lamp (Bulb)
Closed (1) Closed (1) On (1)
Closed (1) Open (0) Off (0)
Open (0) Closed (1) Off (0)
Open (0) Open (0) Off (0)
Logic Representation:
Three ways of representing the working of a logic circuit.
1. Truth Tables: is a chart of Boolean values (1s and 0s) arranged to indicate
the results (or outputs) of all possible inputs combinations.
2. Logic Circuit Diagram: is a graphical representation or description of logic
gates in a combination to represent a logic expression.
3. Boolean Expression: Boolean algebra can be used to write a logic expression
in the form of an equation.
- The outputs of Combinational Logic Circuits are only determined by the logical
function of their current input state, logic “0” or logic “1”, at any given point in
time.
- Combinational Logic Circuits are made up from basic logic NAND, NOR or NOT
gates that are “combined” or connected together to produce more complicated
switching circuits.
- An example of a combinational circuit is a decoder, which converts the binary code
data present at its input into a number of different output lines, one at a time
producing an equivalent decimal code at its output.
- Combinational logic circuits can be very simple or very complicated and any
combinational circuit can be implemented with only NAND and NOR gates as these
are classed as “universal” gates.
- Common combinational circuits made up from individual logic gates that carry out a
desired application include Multiplexers, De-multiplexers , Encoders , Decoders ,
Full and Half Adders etc.
Classification of Combinational Logic
Solution:
(a) ( (b)
D D
Exercise:
1. Draw a logic circuit for the Boolean expression shown below.
(a) D = AB + AC. Answer:
2. Write the Boolean expression for the logic circuit shown below.
Answer: E = (A + B) (C + D) C.
3. Complete the truth table for the logic network shown below.
Answer:
A B C D
(Output)
1 0 0 1
0 1 0 1
0 1 1 0
1 1 1 1
A B C D
(Output)
1 0 0
0 1 0
0 1 1
1 1 1
Answer:
E = NOT C F = A OR B E AND F E NOR (A OR B) E NAND F
0 1 0 0 1
1 1 1 0 0
Data Encryption
Encryption is a security method in which information is encoded in such a way that
only authorized user can read it.
Types of Encryption
1. Symmetric Key encryption: Symmetric key encryption algorithm uses same
cryptographic
keys for both
encryption and
decryption of
cipher text.
2. Public Key encryption: Public key encryption algorithm uses pair of keys, one of
which is a secret key
and one of which is
public.
Web Page
Web page is a document available on World Wide Web. Web Pages are stored on web
server and can be viewed using a web browser.
A web page can contains
huge information
including text, graphics,
audio, video and
hyperlinks.
These hyperlinks are the link to other web pages.
Website is a collection of linked web pages on a web server.
Web Design
Web designing has direct link
to visual aspect of a web site.
Effective web design is
necessary to communicate
ideas effectively.
Web designing is subset of
web development. However
these terms are used
interchangeably.
Key Points
Design Plan should include the following:
Details about information architecture.
Planned structure of site.
A site map of page
Wireframe refers to a visual guide to appearance of web pages. It helps to define
structure of web site, linking between web pages and layout of visual elements.
Following things are included in a wireframe:
Boxes of primary graphical elements
Placement of headlines and sub headings
Simple layout structure
Calls to action
Text blocks
Wireframe can be created using program like Visio but you can alsouse a pen and
paper.
Container Block can be in the form of page’s body tag, an all containing div
tag. Without container there would be no place to put the contents of a web
page.
Logo refers to the identity of a website and is used across a company’s
various forms of marketing such as business cards, letterhead, broachers and
so on.
Navigation The site’s navigation system should be easy to find and use. Often
the navigation is placed right at the top of the page.
Content The content on a web site should be relevant to the purpose of the
web site.
Footer is located at the bottom of the page. It usually contains copyright,
contract and legal information and few links to the main sections of the site.
Whitespace It is also called as negative space and refers to any area of page
that is not covered by type or illustrations.
Web development
Web development refers to building website and deploying on the web.
Web development requires use of scripting languages both at the server end as well
as at client end.
Before developing a web site once should keep several aspects in mind like:
What to put on the web site?
Who will host it?
How to make it interactive?
How to code it?
How to create search engine friendly web site?
How to secure the source code frequently?
Will the web site design display well in different browsers?
Will the navigation menus be easy to use?
Will the web site loads quickly?
Web hosting
Web hosting is a service of providing online space for storage of web pages.
These web pages are made available via World Wide Web.
The companies which offer website hosting are known as Web hosts.
The servers on which web site is hosted remain switched on 24 x7. These servers are
run by web hosting companies. It is not possible to host your website on your local
computer, to do so you would have to leave your computer on 24 hours a day. This is
not practical and cheaper as well. This is where web hosting companies comes in.
Types of Hosting
1. Shared Hosting - the hosting company puts thousands of websites on the
same physical server. Each customer has their own allocation of physical web
space and a set of bandwidth limit. Experiencing of high traffic load affects
performance of all websites on the server.
2. Virtual Private Server (VPS) or Virtual Dedicated Server - It is a server
which is partitioned into smaller servers. In this customer is given their own
partition, which is installed with its own operating system. Unlike shared
hosting, VPS doesn’t share memory or processor time rather it allocates
certain amount of memory and CPU to use which means that any problem on a
VPS partition on the same drive will not affect other VPS customers.
3. Dedicated Server – single dedicated server is setup for just one customer. It is
commonly used by the businesses that need the power, control and security
that a dedicated server offers.
4. Reseller Hosting - acts as a middle man and sells hosting space of someone
else’s server.
5. Grid Hosting - Instead of utilizing one server, Grid Hosting spreads resources
over a large number of servers. It is quite stable and flexible. The servers can
be added or taken away from the grid without crashing the system.
Website Publishing
Website publishing is the process of uploading content on the internet. It includes:
Uploading files
Updating web pages posting blogs
Website is published by uploading files on the remote server which is provided by the
hosting company.
Internet Connection
Internet connection is required to connect to a remotely located web server.
Web Server
Web server is the actual location where your website resides on. A web server may
host single or multiple sites depending on what hosting service you have paid for.
Proxy Server
Proxy server is an intermediary server between client and the internet. Proxy servers
offers the following basic functionalities:
Firewall and network data filtering.
Network connection sharing
Data caching
Proxy servers allow to hide, conceal and make your network id anonymous by hiding
your IP address.
Type of Proxies
1. Forward Proxies - In this the client requests its internal network server to
forward to
the
internet.
2. Open Proxies helps the clients to conceal their IP address while browsing the
web.
3. Reverse Proxies - In this the requests are forwarded to one or more proxy
servers and the response from the proxy server is retrieved as if it came
directly
from
the
original
Server.
Proxy Server Architecture is divided into several modules as shown in the following
diagram:
Proxy user interface - This module controls and
manages the user interface and provides an easy to use
graphical interface, window and a menu to the end user.
This menu offers the following functionalities:
Start proxy
Stop proxy
Exit
Blocking URL
Blocking client
Manage log
Manage cache
Modify configuration
server else will check its last modified date from the reply header and
accordingly will read from the cache or server from the web.
Check whether caching is allowed or not and accordingly will cache the page.
Cache Manager
This module is responsible for storing, deleting, clearing and searching of web pages
in the cache.
Log Manager
This module is responsible for viewing, clearing and updating the logs.
Configuration
This module helps to create configuration settings which in turn let other modules to
perform desired configurations such as caching.
Website Threats
Websites are always to prone to security risks.
Cyber-crime impacts your business by hacking your website. Your website is
then used for hacking assaults that install malicious software or malware on
your visitor’s computer.
Hackers may also steal important customer data such as credit card
information, destroy your business and propagate illegal content to your users.
Website monetization
Website monetization refers to making money from the website. It is done by
converting existing traffic to a particular website into revenue.
Methods of Monetization
1. Display Advertising - It refers to the banners and text ads. This method is
good for the websites that have significant traffic, valuable audience, relevant
and active advertisers.
2. Affiliate Marketing - It refers to steering the visitors to products and services
of a third party merchant. It is good for the websites that are product centric
and have easy integration into content.
3. Lead generation - It refers to capturing the customer information and selling
it to a third party.
4. Email rental - It refers to renting out your email lists to third parties. In this
you will send an email on their behalf to your distribution list.
Then, go to your newly created site directory, open it, create a new folder
called images and select that as your default folder. That way, Dreamweaver
will save images associated with your site automatically there. Click Save to
go back to your workspace.
2. Create Your Homepage File
• If Dreamweaver doesn’t offer you the option itself, go to File then New.
You can either create a completely new file or use an existing template.
• For document title, input index.html and choose Create.
3. Create a Header
• To insert an element into the page, you first need to choose its location by
either clicking on the empty page or placing the cursor in the same element
in the code portion of the screen.
• Go to the Insert tab in the upper right corner and choose the HTML and
site elements that you can add to your page by clicking on Header as an
option.
• Change the text inside the header and turn it into a heading. Mark the text
in the code editor at the bottom. Go back to Insert , click on the arrow next
to Heading and choose H1 .
• You can also type in a title for your page. In your real website, you would
choose something descriptive with keywords and not just Welcome to My
Test Website
4. Create a CSS File
CSS allows you to define colours, dimensions of elements, font types and
sizes, etc.
• Give your new header a CSS class or id.
• Go to the DOM menu in the lower right part of the screen that lists your
entire site structure. Make sure your header is selected.
• Click the plus sign and type in #header in the field that open.
The hashtag means you are assigning an id as opposed to a class. Press enter
and now select Ok.
5. Create a CSS Selector for the Page Title
• To create a CSS selector, click on the line where it says Selectors and then
click on the plus symbol. This should automatically propose a
6. Change the Headline Font
• To change the font type, click on the Text option at the top (alternatively,
scroll down). Click on default font .
7. Centre the Headline and Change Its Size
• To use Quick Edit, go to the code view and right click the part you want to
edit (<h1> bracket).
• Choose Quick Edit at the top.
• If you are ever unsure about what a CSS property means, simply
right-click it and choose Quick Docs (or press Ctrl+K ). Dreamweaver will
then give you an explanation.
8. Add more Content
box, click All Files, and then type .html at the end of the file's name. Click Save.
Close your text editor.
• Upload your website.
Virtual Tour
Virtual tour - is a collection of connected images which can be viewed and rotated in
web browsers.
Image Creation and Processing
- Images are created by shooting using either a 1800 or 3600 camera or Fisheye Len
camera.
- Images are processed by first assembling them by an assembly software like Auto
pane Giga rendering them in a spherical geometric projection and finally image
cube sides are automatically distorted to be watched on Online page.
Data Communication is the process of transferring data from one location to another.
Components of Data communication
The Message - is Information or data that is to be communicated. E.g. text,
pictures, numbers, videos and sounds.
The Sender - is the device that is used for sending messages. E.g. telephone,
video camera, etc.
The Receiver - is a device that is used to receive messages. E.g. computer,
printer, telephone, fax machine, etc.
The Medium - is the path through which data/message is transmitted (or sent)
from one location to another. E.g. telephone line, fibre optics, microwave,
satellite system, etc.
The Encoder - is an electronic device that receives data from the sender in
digital signals and converts it into a form that can be transmitted through the
transmission medium.
The Decoder - is an electronic device that receives data from the transmission
medium and converts the encoded signals from analogue to digital.
Purpose of Networking
- Resource sharing.
- Remote communication.
- Distributed processing facilities.
Limitations of Networking
- Security issues and threats.
- Expensive setup.
- Rapid spread of computer viruses.
- Dependency on the main File Server when the main File Server breaks
down the system becomes useless.
Elements of Networking
- Data communication media, such as cables and wireless.
- Data signals, such as digital and analogue.
- Communication devices, such as modems, network cards, routers, switches
and hubs.
- Networking software, such as Operating System and protocols.
Types of Networks
Local Area Network (LAN): - PAN Wide Area Network (WAN): - MAN
- HAN - Internet
- SAN
• Workstation - is a computer connected to a network.
• Server - is a computer that provides services to other computers (users).
Local Area Network (LAN): connects computers and devices which close to each
other or in a limited small area, such as an office, a school, a home, a computer lab,
even a group of buildings close to each other.
Advantages LAN
• Hardware and software are shared.
• Has high data transferring rate.
• There is component and System evolution.
Disadvantages of LAN
• It has a high maintenance cost.
• It covers a small area.
Wide Area Network (WAN): connects computers and devices which are far away
from each other or in a large area, such as a city, a country, even worldwide.
Advantages of WAN
• It covers a large area.
• It shares variety software and other resources.
Disadvantages of WAN
• It is expensive to install.
• It has a low data transfer rate.
Personal Area Network (PAN): is a network of personal devices for one person,
such as a laptop, mobile phone, and portable printer.
Home Area Network (HAN): is a network which spans a house or home office and is
typically used by more than one person.
Wireless LAN (WLAN): is a LAN in which the nodes in the network can
communicate without physical connections. A node is a computer or any device that
can be connected to a network.
Network administrator is a person responsible for maintenance and proper
functioning of servers and workstations in a LAN. A workstation is any
computer connected to a network.
Metropolitan Area Network (MAN): is a network that serves a metropolitan area
typically a city or county.
Network Topology
Network Topology is the layout of a network and how different nodes in a network
are connected to each other and how they communicate.
Network Protocol are the rules of communication between network devices,
such as Hypertext Transfer Protocol (http).
RINGS Topology
It is called ring topology is a network in which
computers and devices are connected in ring form as
each computer is connected to another computer.
Exactly two neighbours for each device.
Features of Ring Topology
- A number of repeaters are used with large number
of nodes.
- Data is transferred in a sequential manner that is
bit by bit.
Advantages of Ring Topology
- Transmitting network is not affected by high traffic or by adding more
nodes.
- Cheap to install and expand.
Disadvantages of Ring Topology
- Troubleshooting is difficult in ring topology.
- Adding or deleting the computers disturbs the network activity.
- Failure of one computer disturbs the whole network.
STAR Topology
In Star topology, all the computers and other nodes are connected to a single hub or
switch through a cable.
Features of Star Topology
- Every node has its own dedicated connection to
the hub.
- Hub acts as a repeater for data flow.
- Can be used with twisted pair, Optical Fibre or
coaxial cable.
Advantages of Star Topology
- Fast performance with few nodes and low network
traffic.
- Hub can be upgraded easily.
- Easy to troubleshoot.
- Easy to setup and modify.
- Only the node that failed is affected, the rest work smoothly.
Disadvantages of Star Topology
- Cost of installation is high.
- Expensive to use.
- If the hub fails then the whole network is stopped because all the nodes depend on
the hub.
- Performance is based on the hub that is it depends on its capacity
MESH Topology
It is a point-to-point connection to other nodes or devices. All the network nodes are
connected to each other.
There are two techniques to transmit data
over the Mesh topology, they are:
1. Routing
2. Flooding
Routing
In routing, the nodes have a routing logic, as
per the network requirements. Like routing
logic to direct the data to reach the destination
using the shortest distance. Or, routing logic which has information about the broken
links, and it avoids those node etc. We can even have routing logic, to re-configure the
failed nodes.
Flooding
In flooding, the same data is transmitted to all the network nodes, hence no routing
logic is required. The network is robust, and the its very unlikely to lose the data. But
it leads to unwanted load over the network.
Types of Mesh Topology
Partial Mesh Topology: In this topology some of the systems are connected
in the same fashion as mesh topology but some devices are only connected to
two or three devices.
Full Mesh Topology: Each and every nodes or devices are connected to each
other.
Features of Mesh Topology
- Fully connected.
- Robust.
- Not flexible.
Advantages of Mesh Topology
- Each connection can carry its own data load.
- It is robust.
- Fault is diagnosed easily.
- Provides security and privacy.
Disadvantages of Mesh Topology
- Installation and configuration is difficult.
- Cabling cost is more.
- Bulk wiring is required.
TREE Topology
The Tree topology has a root node and all other nodes are connected to it forming a
hierarchy. It is also called hierarchical topology. It should at least have three levels to
the hierarchy.
Features of Tree Topology
- Ideal if workstations are located in
groups.
- Used in Wide Area Network.
Advantages of Tree Topology
- Extension of bus and star
topologies.
- Expansion of nodes is possible and
easy.
- Easily managed and maintained.
- Error detection is easily done.
Disadvantages of Tree Topology
- Heavily cabled.
- It is Costly.
- If more nodes are added maintenance is difficult.
- Central hub fails, network fails.
HYBRID Topology
The Hybrid topology is a mixture of two or more topologies. E.g. if in an office in one
department ring topology is used and in another star topology is used, connecting
these topologies will result in Hybrid Topology (ring topology and star topology).
Features of Hybrid Topology
- It is a combination of two or
more topologies.
- Inherits the advantages and
disadvantages of the topologies
included
Advantages of Hybrid Topology
- Reliable as Error detecting and trouble shooting is easy.
- Effective.
- Scalable as size can be increased easily.
- Flexible.
Disadvantages of Hybrid Topology
- Complex in design.
- It is Costly.
batch systems.
• Best for large organizations but small organizations can also benefit from it.
• Batch systems can work offline so it makes less stress on processor.
• But in batch systems the processor knows how long the job is as it is queued.
• Sharing of batch system for multiple users.
• The idle time batch system is very less.
• You can assign specific time for the batch jobs so when the computer is idle
It starts processing the batch jobs i.e. at night or any free time.
• The batch systems can manage large repeated work easily.
A trainee pilot sits in the cockpit and reacts to values which appear on the
instruments and to the pictures on the screens.
What the computer does?
The computer presents the pilot with a flying situation selected from a number of
choices, e.g. landing. It is programmed to react to the pilot's handling of the
engine controls and the joystick in a realistic way. It can change the readings on
the instruments, the picture on the screen and can also tilt the whole simulator.
• A computer controlling an industrial process: A food processing plant produces
canned soups. The cans have to be sealed within a certain temperature range. A
temperature sensor at the point where the cans are sealed is connected to a
computer. This can alter the temperature if it starts to move outside the set range.
• An interactive game: The user has to react to what is happening on the computer
screen by pressing keys quickly.
3. Interactive System
Interactive systems are computers which accept input from humans.
- Human send commands or data to computers by typing or by any gestures.
Examples are MS word or spreadsheet.
- An operating system which supports interactive behavior is known as
Interactive operating systems.
Examples are Mac and Windows operating system.
- Interactive operating systems can also get input from the graphical interface.
- To design interactive system, customer-oriented communication is used which
involves media and collaborative process between technology and people. The
aim of the interactive system is simplicity with unique goals and eye-catching
interface.
- Interactive media plays an important role in designing interface. Interactive
media includes text, animation, video, animated image and buttons, video games
etc.
Advantages of Interactive Systems
• They help disabled people perform their tasks like iPad and other interactive
devices used. E.g. in latest home AC, disabled people can control the temperature
of a room, check the voltage of AC, AC timer from mobile or tablet device.
• They are easy to use.
• They get an immediate response from the audience.
• They help business to make a long-term relationship between customers not get
whiteboard. It also makes bad impact on user’s eyes. The content preparation for
the interactive whiteboard is also tough.
Knowledge representation
It is the method used to organize and formalize the knowledge in the knowledge base.
It is in the form of IF-THEN-ELSE rules.
Knowledge Acquisition
- The success of any expert system majorly depends on the quality, completeness,
and accuracy of the information stored in the knowledge base.
- The knowledge base is formed by readings from various experts, scholars, and the
Knowledge Engineers.
- The knowledge engineer is a person with the qualities of empathy, quick learning,
and case analyzing skills. He acquires information from subject expert by recording,
interviewing, and observing him at work, etc. He then categorizes and organizes the
information in a meaningful way, in the form of IF-THEN-ELSE rules, to be used by
interference machine. The knowledge engineer also monitors the development of the
ES.
Inference Engine
Use of efficient procedures and rules by the Inference Engine is essential in deducting
a correct, flawless solution.
In case of knowledge-based ES, the Inference Engine acquires and manipulates the
knowledge from the knowledge base to arrive at a particular solution.
In case of rule based ES, it − Applies rules repeatedly to the facts, which are
obtained from earlier rule application.
Adds new knowledge into the knowledge base if required.
Resolves rules conflict when multiple rules are applicable to a particular case.
To recommend a solution, the Inference Engine uses the following strategies:
Forward Chaining - It is a strategy of an expert system to answer the
question, “What can happen next?
Here, the Inference Engine follows the chain of conditions and derivations and
finally deduces the outcome. It considers all the facts and rules, and sorts them
before concluding to a solution.
- This strategy is followed for working on conclusion, result, or effect. E.g.
prediction of share market status as an effect of changes in interest rates.
Backward Chaining: With this strategy, an expert system finds out the
answer to the question, “Why this happened?”
On the basis of what has already happened, the Inference Engine tries to find
out which conditions could have happened in the past for this result.
- This strategy is followed for finding out cause or reason. For example,
diagnosis of blood cancer in humans.
User Interface
User interface provides interaction between user of the ES and the ES itself. It is
generally Natural Language Processing so as to be used by the user who is
well-versed in the task domain. The user of the ES need not be necessarily an expert
in Artificial Intelligence.
It explains how the ES has arrived at a particular recommendation.
The explanation may appear in the following forms:
- Natural language displayed on screen.
- Verbal narrations in natural language.
- Listing of rule numbers displayed on the screen.
The user interface makes it easy to trace the credibility of the deductions.
Chapter 5: DATABASE
Introduction to Microsoft Access
A database is a collection of information that's related. Access allows you to manage
your information in one database file. Within Access there are four major areas:
Tables, Queries, Forms and Reports
• Tables store your data in your database
• Queries ask questions about information stored in your tables
• Forms allow you to view data stored in your tables
• Reports allow you to print data based on queries/tables that you have created
Creating a Database
1) Start Access
Datasheet view
Creating a Table
Your new database will already have one table called Table1. Access creates this
automatically when you create a new database.
Table Structure
Fields (Columns)
Records (Rows)
In the table above, there are 4 Fields (columns) and 11 Records (rows) in the table
above.
Table 1 is created
Date/Time - Date and time values for the years 100 through 9999. 8 bytes
Yes/No - Yes and No values and fields that contain only one of 1 bit
two values (Yes/No, True/False, or On/Off).
Calculated - You can create an expression that uses data from one or more fields. You
can designate different result data types from the expression. You can create an
expression that uses data from one or more fields.
You can designate different result data types from the expression.
Data Type - tells Access the type of data that will be stored in that field. By assigning
a data type,
Access can make sure that nobody enters the wrong type of data into that field. For
example, no one will be able to enter a phone number into the “First_Name” field.
Data Size
If the field does not contain data:
When you change the field size, the size of new data values is limited for the field.
For number fields, the field size determines exactly how much disk space Access uses
for each value of the field. For text fields, the field size determines the maximum
amount of disk space that Access allows for each value of the field.
If the field contains data:
When you change the field size, Access truncates all the values in the field that exceed
the specified field size, and also limits the size of new data values for the field, as
described above.
Set Field
Data Type
Set Field
Data Size
Data Input
To input data into the table is to copy or move data from external sources, such as
Excel.
When inputting data into the table, Access automatically saves the data after each new
record.
Navigating Records
Use the arrows at the bottom of the table to navigate among records.
You are able to navigate from the first record, previous record, next record, last record,
and create a new record (as shown in the picture below).
Current record Next record Last record
Database Relationship
A relational database is database in which all data is stored in Relations which are
tables with rows (called records or tuples) and columns (called fields or attributes).
- A relational database allows records from one table to link to related records on
different tables.
- A relational table is a table of columns (or fields) that describe rows (or records)
of data. E.g. a relational table may contain fields, such as customer ID,
transaction number, product purchased, product price, sale date, and purchase
location.
2.
3.
One-to-One Relationship
A row in table A can have only one matching row in table B, and vice versa.
This is not a common relationship type, as the data stored in table B could just have
easily been stored in table A.
However, there are some valid reasons for using this relationship type.
A one-to-one relationship can be
used for security purposes, to
divide a large table, and various
other specific purposes.
Table A Table B
One-to-Many Relationship
A row in table A can have many matching rows in table B, but a row in table B can
have only one matching row in table A. This is the most common relationship type.
One-to-Many relationships can also be
viewed as Many-to-One relationships,
depending on which way you look at it.
In the above example, the Customer
table is the “many” and the City table
is the“one”. Each customer can only be assigned one city. One city can be assigned to
many customers.
Many-to-Many Relationship
A row in table A can have many matching rows in table B, and vice versa.
A many-to-many relationship could be thought of as to a one-to-many relationships,
linked by an intermediary table.
The intermediary table is typically referred to as a“junction table” (also as a
“cross-reference table”). This
table is used to link the other two
tables together. It does this by
having two fields that reference
the primary key of each of the
other two tables.
Customer
Table
6. When you Drag and Drop the primary key (customer_id) field in the Order
table. Access will show you the Edit Relationships window.
Access already filled out the
most important information
for you, based on your
selection of the customer_id
fields.
One-to-Many
Relationship
Reasons why you should create table relationships before you create other
database objects, such as forms, queries and reports.
Table relationships:
Establishes a connection between a pair of tables that are logically related to
each other. This is useful when designing a query.
Enables you to draw data from multiple tables simultaneously. This is useful
when designing a Form and Report.
Help to further refine table structures and minimise redundant (duplicate) data.
Are the foundation upon which you can enforce referential integrity to help
prevent orphan records in your database. An orphan record is a record with a
reference to another record that does not exist.
In addition, again only if you selected the Enforce Referential Integrity check
box, the number 1 appears over the thick portion of the line on one side of the
relationship, and the infinity symbol (∞) appears over the thick portion of the
line on the other side.
ORDER
CUSTOMER PRODUCT PRICE QTY AMOUNT
TEMBO X 100 C
MWALA Y A 40 2 400
NAMWINGA 50
Solution:
(a) PRODUCT
(b) (i) X = C-OIL (ii) Y = MAIZE (iii) A = 60
(c) AMOUNT = PRICE × QUANTITY (QTY)
EXERCISE
1. Study the linked database tables below and answer the questions that follow.
PRODUCT CUSTOMER
PRODUCT TYPE PRICE CUSTOMER PRODUCT QTY
PO1 SALT 30 CO1 PO3 100
PO2 SUGAR 20 CO2 PO2 50
PO3 RICE 15 CO3 PO3 60
CO4 PO1 70
LINKED FIELD
ORDER QUERY
Answers:
(a) - It establishes to further refine data structures and minimise
redundant.
- It enables you to draw data from multiple tables simultaneously.
(b) The primary key “PRODUCT” field in the PRODUCT table is the
foreign key in the CUSTOMER table. They contain common
fields.
(c) AMOUNT = [QTY] * [PRICE]
X = 100 * 15 Y = 60 * 15
= 1500 = 900
(d) Using Group by Clause of Structured Query Language (SQL) to
group data based upon any column or a number of columns.
(e) Forms
relationship.
COMPUTER USE
Social and Economic effects of Computer use on People and Organisations
Positive effects of computers on People
- People use computers to communicate easily e.g. making phone calls and social
media.
- People use computer to search for information rapidly and reliably on the Internet.
- People use computers for e-shopping.
Negative effects of computers on people
- Loss of job, since the computer does the job.
- People become addicted to social media and fail to work, hence less productivity.
Positive effects of computer systems on an organisation
- High productivity
- Produce output in a variety of formats.
- Processes data repetitively, accurately and rapidly.
- Reduces the risk of losing vital information.
- Making sales systems available to customers through a website.
Negative effects of computer systems on an organisation
- Incorrectly designed business procedures.
- Lack of compatibility with organisation's existing hardware and software.
Health
In the Health Sector Computers are used:
• In Clinical implication - for assessment, patient monitoring, documentation,
telemedicine and electronic medical records.
• In Research - for preparation of a research document, data gathering, computer
assisted instruction, simulation and tutorials.
• In Community settings - for gathering statistics, patient appointments
identification systems, home care management and automated remote patient
monitoring.
• In Administration - to define the cost of nursing and other health personnel’s
services.
Banking
In Banking Computers are used:
• For Electronic Fund Transfer (EFT) - a system that allows money transfer
instructions to be sent directly to a bank's computer system. It involves the payment
of salaries and wages.
• In Cash Machines, e.g. Automated Teller Machines (ATMs) - to provide a
number of baking services, such as withdrawing cash, depositing money, paying
bills, checking the balance of the account and transferring money between
accounts.
• In E-commerce - for Internet buying and shopping.
Customers like Internet shopping because:
- Food are often cheaper than in shops.
- Stores are open 24hours a day and every day of the year.
- Wider range of choice.
- It convenient because goods are browsed from home.
Business like Internet shopping because:
- No expensive retail stores and no less staff.
- Higher sales and bigger profits.
- Many more potential customers.
Problems of Internet Shopping
- You can't try items like clothes before purchasing.
- There is a security risk using credit cards online.
- Returning goods or getting help can be difficult.
• In Internet or Online Banking - checking the account balance, paying bills,
Retailing
In Retailing Computers are used:
• On Point-of-Sale (POS) - a place where you pay for your purchases in a store.
It is usually where the till (cash register) is located.
A typical POS will have:
- A method of inputting the codes of goods purchased usually a barcode scanner.
- A system to accept electronic payment.
- A method of producing a receipt for purchases.
- A system to update the stock-level of goods.
• In Electronic Payment for Goods (EFTPOS) - for paying for the goods
electronically using a bank card.
• In Swiping Payment system - using smart cards that are more secure (since the
data is encrypted) and more reliable than magnetic strip cards.
• For withdrawing money using cash back.
• In Automated Re-ordering of Stock, e.g. Stock Control system - a system that
keeps track of what you have in stock.
Library
In Libraries Computers are used for:
Keeping records of the books maintained using special library software.
Keeping records of the issues and returns of the books.
Online magazines, journals, brochures, research articles, etc.
Documents stored as soft copy students and staff use.
• Verifying - is the process of checking e.g. typed reports are re-read for
corrections.
• Classifying - is separation of data into categories.
• Merging - is taking two or more sets of data and put them together to make a
single sorted set of data.
• Calculating - is performing numerical calculations on the numerical data.