Computer Architecture
Computer Architecture
UNIT STANDARDS
14921: Describe the types of computer systems and associated
hardware configurations
14917: Explain computer architecture concepts
14944: Explain how data is stored on computers
COMARC11V1
TABLE OF CONTENTS
MODULE UNIT STANDARD ALIGNMENT 6
ALIGNMENT MATRIX 10
REFERENCE 166
US
Title NQF Credits
Number
Describe the types of computer
14921 systems and associated hardware 4 6
configurations
Explain computer architecture
14917 4 7
concepts
Explain how data is stored on
14944 4 7
computers
ALIGNMENT MATRIX
Questions Role-play
Notes and
Case Study
observations
Formative Summative
Assessment Assessment
Activity Preparation
1. INTRODUCTION
1.1.1 Microcomputers
Figure - Workstations
Laptops generally are bigger and clumsier due to the power supply
being encased in the box holding the CPU. The notebook is
normally smaller. Notebooks and laptops can work on batteries for
hours allowing the user to work with it in aeroplanes, in the car and
places computers are not normally available. Initially designed as
stand-alone machines the PC and the operating systems popular
on the PCs do not integrate as well into networked environments
as the other computer systems. Personal Digital Assistants (PDAs)
are a very recent enhancement of electronic productivity tools
based on microprocessor technology. Personal Digital Assistants
such as Apple’s Message pad 2000 and later The Apple Message
Pad 2100, with a vastly improved handwriting recognition system,
162 MHz Strong ARM SA-110 RISC processor, Newton OS 2.1,
and a better, clearer, backlit screen, attracted critical plaudits. This
new technology has provided business people, and technocrats,
with common daily Organisation tools (such as a diary, telephone
book, and notepad) in a small packaging usually no larger than a
stenographer/short-hand notepad and many other.
1.1.2 Minicomputers
Figure - Minicomputers
1.1.3 Mainframes
The term originally referred to the large cabinets that housed the
central processing unit and main memory of early computers. Later
the term was used to distinguish high-end commercial machines
from less powerful units.
1.1.4 Supercomputers
1.1.5 Client-server
Optimisation
Server hardware (the physical, touchable, material parts of a
computer or other system) is designed to quickly serve requests
from clients.
Centralisation
Files are in one location for easy administration.
Security
Multiple levels of permissions - access privileges associated with a
file or directory can prevent users from doing damage to files.
Server Hardware
Any normal desktop computer could act as a server, but typically
you want something much more robust. Standard server hardware
includes:
Hot swappable drives to speed up adding or replacing hard disks
(used in RAID) - drives can be changed without having to shut
down the server.
The ability to support multiple processors – in actual fact this is the
brains behind a computer. Processors are responsible for
performing calculations and tasks that make computer programs
work. Multiple processors can be an advantage if you need to run
applications that are processor intensive such as a very large
database. Support for larger amounts of RAM - the more memory
you have the faster your network can run. Faster input and output
- information can travel around the network more quickly. Fast
network cards.
Server Software
Server software comes in two categories, operating systems and
applications:
If you can, try to make sure that this person is not the person who
would be doing the work or selling you the product, otherwise they
may have some conflicts of interest. This is a big decision, and it
will dramatically affect all of your future computer relationships.
Server Applications
In 1997, the Pentium II (2) had 7.5 million transistors, in 2000 the
Pentium 4 had 420 million, and the trend continues so that in 2007,
the Dual-Core Itanium 2 processor has 1.7 billion transistors.
Figure - CPUs
(Source:
http://www.hardwarecentral.com/hardwarecentral/reports/article.ph
p/3668756, accessed 12 January 2008). Supercomputers may
soon be the same size as a laptop if IBM brings to the market
silicon nanophotonics. In this new technology, wires on a chip are
replaced with pulses of light on tiny optical fibbers for quicker and
more power-efficient data transfers between processor cores on a
chip. This new technology is about 100 times faster, consumes
one-tenth as much power, and generates less heat (Source:
http://www.infoworld.com/article/07/12/06/IBM-researchers-build-
supercomputeron-a-chip_1.html, accessed 12 January 2008).
DDR clock speeds range between 200 MHz (DDR-200) and 400
MHz (DDR-400). DDR-200 transfers 1,600 megabits per second
(Mb s_1:106 bits s_1), while DDR-400 transfers 3,200 MB s_1.
DDR2 RAM is twice as fast as DDR RAM. The bus carrying data to
DDR2 memory is twice as fast. That means twice as much data
are carried to the module for each clock cycle. DDR2 RAM also
consumes less power than DDR RAM. DDR2 speeds range
between 400 MHz (DDR2-400) and 800 MHz (DDR2-800). DDR2-
400 transfers 3,200 MB s_1. DDR2-800 transfers 6,400 MB s_1.
DDR3 RAM is twice as fast as DDR2 RAM, at least in theory.
DDR3 RAM is more power efficient than DDR2RAM. DDR3
speeds range between 800MHz (DDR3-800) and 1,600 MHz
(DDR3-1600). DDR3-800 transfers 6,400 MB s_1; DDR3-1600
transfers 12,800 MB s_1.
Figure - RAM
You will also learn how the different types of applications perform
as well as the types of processing methods they can use.
Business applications
Business applications are a broad category that includes most
commercially available software packages available today. The
most common applications are spread sheet (MS Excel), word
processing (MS Word), database (MS Access), presentation (MS
Power Point) and project management (MS Project). Some more
examples are web browsers (Internet Explorer, Firefox), E-mail
clients (MS Outlook, Thunderbird), computer aided design (Turbo
CAD, Auto CAD), business management (SAP) and point of sales
software (Quickbooks and Pastel).
Scientific applications
Scientific applications are applications used in the fields of
medicine, scientific research, engineering and chemistry. These
applications are highly specialised. They sometimes perform
complex calculations and can therefore not be used on desktop
Home applications
Most of the time, our computers at home and at work have much
the same software setup. However, many companies do not allow
their employees certain privileges such as music, videos, pictures,
web browsing that is non-work related and gaming so we have
these things on our computers at home. For music and movies we
may have Windows Media Player, for pictures we may have
ACDsee and for gaming there may be a variety of gaming
application (games) that we may have installed at any one time.
We may also have an office package installed with Word
processing, spread sheets and so on.
Educational applications
Educational applications are software packages such as digital
encyclopaedias, language learning tools, typing tutors and many
more. Some encyclopaedic software may include Encarta,
Britannica and Wikipedia which is an internet based encyclopaedia
Batch processing
Let’s say you are a professional photographer and you need to
convert 800 images all from RAW format into JPG, resize them
and add a border and a watermark. This will take you forever to do.
You would have to go through every image several times. Some
photo editing applications have a batch processing function that
will allow you to do all of your changes on one image and the
program will apply them to all of the images in the batch you
specify.
Interactive processing
Interactive processing is where user input is required for an
application to perform certain tasks. Compute games are a good
example of this as you need to give the game input for anything to
happen. Another such example may be point of sales systems.
The POS system awaits input from the clerk. Let’s say scanning of
a barcode. Once the system received a barcode it immediately
checks for the product that was scanned and presents the clerk
with all the relevant information regarding the product such as
description, price, stock levels etc. Thus interactive processing
requires input in order to generate output for the user.
Real-time processing
Interactive processing is also real-time processing because your
input immediately results in an output. If you are in your car and
you step on the brake or accelerator you will immediately either
speed up or slow down. This is a real-time reaction. Similarly, if
you are chatting to your friends on MXiT, they immediately see the
text you entered. You also immediately see the text they entered.
Thus the conversation is happening in real-time.
Process control
“Process control is a statistics and engineering discipline that deals
with architectures, mechanisms, and algorithms for controlling the
output of a specific process. See also control theory.” - Wikipedia
Discuss the question: Where did computers come from, and where
is it going?
Background information
expensive.
2. INTRODUCTION
2.1.1 Hardware
2.1.2 Software
Software – System
System software is transparent, low level software that provides
interface with the computer’s hardware. All software communicates
with hardware but not as directly as system software. You will learn
about the Kernel later.
Software - Application
After you have installed your operating system, your system may
not be very useful. You may have the need to do word processing,
create spread sheets, make videos or play games. Application
software is the type of software that provides you the functionality
you require.
2.1.3 Firmware
Applications of firmware:
Computer BIOS (basic input output system)
Mobile device software (e.g. cell phones, MP3 players, GPS,
etc.)
Vehicular control systems (A car’s engine control unit / ECU)
Game consoles
Television sets and satellite decoders
Computer display units
There are two types of virtual machine. They are a) System virtual
machines and b) Process virtual machines:
This example may seem somewhat out of context but it’s a good
way of understanding how abstraction works. Similarly, a computer
also has abstraction levels or to get back into context, functional
levels. There are 5 main functional levels demonstrated by this
illustration.
Figure: Functional
Levels
The figure shows the abstraction levels from
the least abstract (bottom) to the most
abstract (top). We say that hardware is the
least abstract (or concrete) because it is
tangible. We can touch hardware and we
know for a fact that it is there. Software on
the other hand is the most abstract element
of computer architecture.
ROM or Read Only Memory is memory that can only be read but
not changed. The contents are fixed. The most common form of
ROM is CDs and DVDs with the latest addition being Blu-Ray.
These are disks you can write to and maybe add info to it later but
it cannot be erased with the exception of rewritable disks (CD-
RW/DVD-RW).They have a dissolvable chemical film inside that
can be smoothed out in order to erase the data so doing creating a
once again clean writable disk. This cannot be done on the fly
though. The disks need to be erased and formatted first.
Thanks to the hard disk, we can now easily access all of our
applications from one place in an instant. And what’s more, you
can store your documents and other information on it too.
Hard disks are sensitive devices. A fall or bump can easily damage
the device. They have another limitation. Due to its mechanical
nature, the laws of physics are its greatest enemy. Its data seek
times are greatly affected because of inertia. Spindle speeds affect
the performance of a hard drive since the faster they spin, the
more durable the material it is made of need to be. Nevertheless,
the technology came a long way and today we can see speeds of
up to 300MB/s for normal desktop computer hard disks and spindle
speeds of up to 15 000RPM.
Types of drive:
Mechanical
Solid State
2.2.8 Keyboard
2.2.9 Mouse
There are two types of display units. The first is a cathode ray tube
display or CRT for short (also known as rear projection display).
Though it’s quite interesting to know, we are not going into the
detail of how these units work. For many years they have been the
main display type but now there are two new successors, LCD and
LED with LCD being the older of the two technologies. Once again
those are the components that consume power. Also keep in mind
the amount of hard drives you will be using.
2.2.12 PC Cards
Today common uses for the express card are 3G cards, network
adapters (wired and wireless), USB controllers and many more.
2.2.13 Cables
IDE (P-ATA)
S-ATA
Figure: S-ATA Cable
The faster replacement for IDE is S-ATA
and they use a much more compact
cable to carry data from the drive to the
motherboard. It has two small flat plugs
on each end.
VGA Cables
COM / Serial
Figure: Serial Cable
Before PS2 we connected our mice via
COM or Communications ports better
known as serial ports. You will still find
these ports on most computers today
since they are still used for dialup
modems, shell access to servers or
hardware routers and switches.
Figure: LPT
LPT Cable
LPT, an abbreviation for Line Print Terminal
and also known as a Parallel port, are
commonly used for printing.
on their boards. This was the case for many other bus types such
as P-ATA (Parallel Advanced Technology Attachment) which was
replaced by S-ATA (Serial Advanced Technology Attachment).
AGP was replaced again in 2004 by PCI-Express.
Devices on the same bus would communicate with each other via
that bus. Though when they need to communicate with other
devices on other busses they would need to make use of the
bridge which would send the communications to the relevant
busses e.g. from the USB to the CPU on the System bus.
Instruction length
Depending on design, processors can only handle certain lengths
of instructions. This is obviously determined by the system
architects. If an instruction is longer or more complex than what the
processor supports, it won’t be able to execute it. Instruction length
is determined by the amount of operands in the instruction. The
longer the instruction the more complex it is. For instance, an
instruction with 3 operands will be more complex than an
instruction with 1 operand. An operand is the part of an instruction
that the processor will be working on or that will be changed.
Memory transfer
As we discussed earlier, memory is the workbench of the
processor. The processor needs to be able to move data in and
out of memory in the correct places. This ability is a very essential
part of a processor’s instruction set architecture.
Instruction format
Computer instructions in the smallest level are
made up of binary digits or bits. A bit is a “1” or a
“0” value that is represented by a specific point on
a storage medium (such as a hard drive or DVD)
by the presence (“1”) or absence (“0”) of an
electronic charge. A bit also represents the presence (“1”) or
absence (“0”) of electronic charges in all digital devices. This
includes bit is not limited to the processor, mice, keyboards,
printers, etc.
Operand specification
An operand is that part of an instruction that tells the processor
what it needs to do in order to correctly complete the instruction.
The more operands in an instruction the longer and more complex
the instruction become. Instruction set architecture or ISA for short
makes use of memory addresses and registers. A memory
address is the address where the processor can put information
about a process it is working on. A register is one single piece or
area of memory that the processor uses to store an instruction
while it is being processed. It is important that you know the
difference between the memory address and a register because
they are not located in the same place. Processors have what we
call cache memory and the cache memory contains the registers
we are talking about. The operands in the instructions tell the
computer what areas of memory it should use while the instruction
is processed. Operands also indicate to the computer where
processed information should be stored in order for it to be easily
accessed later.
Instruction fetch
For a computer to process an instruction it needs to transfer the
instruction from wherever it is stored into the correct areas of
memory inside the memory’s work space. Along with the
instruction there’s other information about how the instruction is to
be executed and this too needs to be transferred. This is referred
to as the fetch cycle so when a computer placed the instruction
and its data into the correct places in memory a fetch cycle is
completed. Instruction fetch can be defined as a machine cycle
used by the processor to obtain instructions from memory.
Word length
Processors are normally rated in bits. For instance modern day
computers all have 64bit processors. This refers to the word
length. Word length is the amount of bits that are strung together
when sent to the processor for processing. For instance a 32bit
processor cannot handle 64bit strings. The more bits are grouped
together the more complicated the instruction becomes. Though, a
64bit processor is much faster than a 32bit processor. 64bit
processors can process more instructions because it is capable of
processing larger quantities of data.
3. INTRODUCTION
Bit
A bit or binary digit is the basic unit of information in computing
and telecommunications; it is the amount of information that can be
stored by a digital device or other physical system that usually
exist in only two distinct states.
Byte
The byte is a unit of digital information in computing and
telecommunications. It is an ordered collection of bits, in which
each bit denotes the binary value of 1 or 0. Historically, a byte was
the number of bits (typically 5, 6, 7, 8, 9, or 16) used to encode a
single character of text in a computer and it is for this reason the
basic addressable element in many computer architectures. The
size of a byte is typically hardware dependent, but the modern de
facto standard is 8 bits, as this is a convenient power of 2. Most of
the numeric values used by many applications are representable in
8 bits and processor designers optimize for this common usage.
Signal processing applications tend to operate on larger values
and some digital signal processors have 16 or 40 bits as the
smallest unit of addressable storage (on such processors a byte
may be defined to contain this number of bits).
Word
In computing, word is a term for the natural unit of data used by a
particular computer design. A word is simply a fixed sized group of
bits that are handled together by the system. The number of bits in
a word (the word size or word length) is an important
characteristic of computer architecture.
Fixed-Point number
In computing, a fixed-point number representation is a real data
type for a number that has a fixed number of digits after (and
sometimes also before) the radix point (e.g., after the decimal point
'.' in English decimal notation). Fixed-point number representation
can be compared to the more complicated (and more
computationally demanding) floating point number representation.
Characters
In computer terminology, a character is a unit of information that
roughly corresponds to a grapheme, grapheme-like unit, or
symbol, such as in an alphabet or syllable in the written form of a
natural language.
Strings
Fixed-length string
Strings are variables that contain text, and they come in two sorts.
With a fixed-length string, you declare how many characters the
string is going to hold. Certain API calls in Windows require the
use of fixed-length strings, but generally they are not used in
BASIC. In C they are implemented as an array (or vector) of chars.
Variable-length string
A variable-length string is one where you don't define the length.
This is the default type in BASIC, and is useful for taking user input
where you don't know what the response will be. The maximum
Rational
A Rational number is a number that can be written in the form
a/b, where a and b are integers, with b ≠ 0 (b is not equal to 0).
The set of all rational numbers is usually denoted by Q. Rational
numbers cannot be represented natively in a computer.
Boolean
A Boolean variable can store one of two values - either TRUE or
FALSE. Like char, this is usually an integer - in Visual BASIC, for
example, FALSE is 0 and TRUE is -1, and the TRUE and FALSE
values themselves are constants.
Variables
A variable is a placeholder of information that can usually be
changed at run-time. Variables allow you to:
Store information
Retrieve the stored information
Manipulate the stored information
Variable Characteristics
A variable has:
Name
Type (of stored data)
Value
Example:
– int count = 5;
– Name: counter
– Type: int
– Value: 5
In this section you will learn how the selected coding systems are
used to represent data.
DECIMAL VALUE 92 73
EBCDIC 10010010 01110011
BIT PLACE VALUES 84218421 8421
8421 BYTE1 BYTE2
Character D P 3
EBCDIC 1100 0100 1101 0111 1111 0011
ASCII 0100 0100 0101 0000 0011 0011
The decimal values 1 through 9 are assigned the zone code 0011
in ASCII rather that 1111 as in EBCDIC. The table below is the
ASCII coding chart showing uppercase and lowercase alphabetic
characters and numeric digits 0 through 9.
At this point you should understand how coding systems are used
to represent data in both EBCDIC and ASCII. Regardless of what
coding system is used, each character will have an additional bit
called a check bit or parity bit.
Parity Bit
This additional check or parity bit in each storage location is used
to detect errors in the circuitry. Therefore, a computer that uses an
8-bit code, such as EBCDIC or ASCII, will have a ninth bit for parity
checking.
The parity bit (also called a check bit, the C position in a code)
provides an internal means for checking the validity, the
correctness, of code construction. That is, the total number of bits
in a character, including the parity bit, must always be odd or
always be even, depending upon whether the particular computer
system or device you are using is odd or even parity. Therefore,
the coding is said to be in either odd or even parity code, and the
test for bit count is called a parity check.
3.2.5 Unicode
Universality
Unicode defines a single repertoire of characters for universal use.
(See the previous section for other aspects of universality.)
Efficiency
Unicode text is simple to process. (See the previous section for the
complexity of this issue.)
Semantics
Characters have well-defined meanings. In fact, the meanings are
often defined rather indirectly or implicitly, if at all but Unicode are
generally much more explicit about meanings than other character
code standards, including ISO 10646. When the Unicode standard
refers to semantics, it often means (mostly) the properties of
characters, such spacing, combinability, and directionality, rather
than what the character really means. This is largely intentional:
the ultimate meaning may vary by language, context, and usage;
think about the various uses of the comma in English and other
languages e.g., as thousands separator or as a decimal separator.
Plain text
Logical order
The default representation of Unicode data uses logical order of
data, as opposed to approaches that handle writing direction by
changing the order of characters. The ordering principles also put
all diacritics after the base character to which they are applied,
regardless of visual placement. For example, the Greek capital
letter omega with tonos has the tonos (stress mark) visually on the
left of the omega, but the decomposed form of this character still
consists of omega followed by combining tonos.
Unification
Unicode encodes duplicates of a character as a single code point,
if they belong to the same script but different languages. For
example, the letter ü denoting a particular vowel in German is
treated as the same as the letter ü in Spanish, where it simply
indicates that the "u" is pronounced, in a context where it would
otherwise be mute.
Dynamic composition
Characters with diacritic marks can be composed dynamically,
using characters designated as combining marks. You can take
Equivalent sequences
Unicode has a large number of characters that are pre-composed
forms, such as é. They have decompositions that are declared as
equivalent to the pre-composed form. An application may still treat
the pre-composed form and the decomposition differently, since as
strings of encoded characters, they are distinct. However, usually
such distinctions are not made, and should not be made. The
Unicode standard does not declare either the pre-composed form
or the decomposed form as preferred; they are just two different
forms. So-called normalisation may make either form preferred in
some contexts.
Convertibility
Character data can be accurately converted between Unicode and
other character standards and specifications. As explained earlier,
this can be regarded as part of the universality principle.
Unicode Terms
Deprecated and Obsolete Characters
A deprecated character is a character that has been included in
Unicode but declared as deprecated in the Unicode standard. This
indicates a strong recommendation that the character not be used.
It remains in Unicode, though, due to the stability principle. For
example, a character may be declared deprecated if it turns out
that it was introduced into Unicode in error.
Digraphs
A digraph is a combination of two successive characters treated as
a unit in some sense, such as "ch" in many languages (e.g., when
used to indicate one sound) or "ll" in Spanish, where it denotes a
particular sound and might be treated in sorting as if it were a
single character. Thus, a digraph is a pragmatic concept, not a
formal one, and it is an example of a text element.
Text Elements
The concept of text element is informal: it means a sequence of
characters (including the special case of one character) that is
treated as a unit in some processing. In typical character input and
output, characters are text elements. In layout processes, syllables
might be treated as text elements, since line breaks are usually
allowed between syllables but not within them. When you form a
text concordance (a list of occurrences of words e.g., in alphabetic
order), a word is a text element.
Unicode Strings
The term "Unicode string" has a more technical meaning than you
might expect. It does not refer to a string (sequence) of Unicode
characters (code points) but to a sequence of code units. Thus, the
components of the string are of fixed size in bits (in practice, 8, 16,
or 32 bits). In many programming languages, Unicode strings have
a code unit size of 16 bits. This does not limit the range of
characters, since such a string could be interpreted according to
UTF-16.
Table: Unicode Chart
Arithmetic Operators
Routines which performs arithmetic operations on decimal, float,
money, numeric, and real data types.
Comparison Operators
Routines which compares date, time, decimal, float, money,
numeric, and real data types Comparison operators are used to
compare two things. You will find that when you get to working with
code and its structure these will be really useful.
Assignment Operators
Assignment operators are used to assign a value. These will be
used extensively when using variables. There are six assignment
operators. In the preceding examples, x and y are both variables.
Variables need to have unique names (unless you are reusing
them).
Logical Operators
Logical operators enable you to introduce logic to the code you
write and enable you to make combinations of the preceding
operators. There are three logical operators.
String Operators
String operators are operators that work on strings. Strings are
usually snippets of text. Here are two sample strings:
string1 = “Hello”
string2 = “World ”
The variable string3 will now hold the value Hello World!
One thing that newcomers to strings seem to find hard to cope with
is spaces. That is, keeping track of spaces between strings and
making sure that the end string makes sense.
Numeric Types
Integer
The integer is the most common primitive data type. The integer is
almost always an exact reflection of the hardware, so the mapping
is trivial. There may be as many as eight different integer types in a
language. For example java has four integer types i.e. byte, short,
int and long. Some languages use unsigned integers which are
integer values without signs and are used for binary data. Integer
types are supported by the hardware.
Floating-point
These model real numbers, but are only approximations for most
real values. For example TT cannot be represented in floating-
point notation. On most computers, floating-point numbers are
stored in binary, which exacerbates the problem. Another problem
is the loss of accuracy through arithmetic operations.
Decimal
The majority of larger computers that are designed to support
business applications have hardware support for decimal data
types. Decimal types store a fixed number of decimal digits, with
the decimal point at a fixed position in the value.
Boolean Types
Introduced by ALGOL 60, Boolean types are perhaps the smallest
of all data types. Their range of value is made up of only two
elements: True and False.
Character Types
Char types are stored as numeric coding (ASCII / Unicode).
A stack
When you hear the term “stack” used outside the context of
computer programming, you might envision a stack of dishes on
your kitchen counter. This organisation is structured in a particular
way: the newest dish is on top and the oldest is on the bottom of
the stack.
Each dish in a stack is accessed using FIFO: first in, first out. The
only way to access each dish is from the top of the stack. If you
want the third dish (the third oldest on the stack), then you must
remove the first two dishes from the top of the stack. This places
There’s no way to access a dish unless the dish is at the top of the
stack. You might be thinking stacks are inefficient, and you’d be
correct if the objective was to randomly access things on the stack.
There are other data structures that are ideal for random access,
which you’ll learn about throughout this book.
Note: Stacks and arrays are often bantered about in the same
discussion, which can easily lead to confusion, but they are really
two separate things. An array stores values in memory; a stack
tracks which array element is at the top of the stack. When a value
is popped off the stack, the value remains in memory because the
value is still assigned to an array element. Popping it only changes
the array element that is at the top of the stack.
A queue
A queue is a sequential organization of data. Data is accessible
using FIFO. That is, the first data in the queue is the first data that
is accessible by your program.
A linked list
A linked list is a data structure that makes it easy to rearrange the
data without having to move data in memory. Sound a little
confusing? If so, picture a classroom of students who are seated in
no particular order. A unique number identifies each seat, as
illustrated. We’ve also included the relative height of each student,
which we’ll use in the next exercise.
seat 1, Bob sits in seat 2, and Mary in seat 3. However, this can be
chaotic if there are a lot of students in the class.
3.4.2.1 Terminology
Field Each named unit of information to which one can make
reference. Examples: Person No, Name, Age etc. Field length may
be either fixed (e.g. Person No) or variable (Name). If variable, one
may treat it as an adequately long fixed-length field. If an actual
value is shorter, the rest of the field may be padded with spaces. If
it is too long, one would need to truncate the field. This is possible
as long as no essential information is lost in trimming the value.
There is some waste of storage space though. One may allow the
field to take variable length values by ending each field with an
end-of-field character. This eliminates wasted storage but
complicates processing.
Sequential file organisation is best for high hit rate applications, i.e.
when in a typical run a high proportion of the records are required.
Sequential files can be constructed on magnetic tape as well as
magnetic disc. If constructed on a magnetic tape, searching for
individual records is very slow. On average, one must look through
half the file whether the record is there or not. In this sequential
organisation is only marginally better than serial organisation. If the
file is on magnetic disc, searching is much more efficient because
one can employ binary search. This is like looking for a word in a
dictionary. One probes the file a number of times and at each
probe halves the search interval. This process continues till one
either finds the required record, or is able to decide that the record
is not in the file.
You now realize the use of databases for supporting the core
business of an organisation and enabling day-to-day operations.
These are production databases that support the operational
systems of an enterprise. More recently, with increasing demand
for information, databases fulfil another important function.
Databases provide support for strategic decision making in an
organisation. Such decision support databases are designed and
implemented separately and differently. Production databases and
decision-support databases are large-scale databases for the
several users within organisations.
A "flat file" is a plain text or mixed text and binary file which usually
contain one record per line or 'physical' record (example on disc or
tape). Within such a record, the single fields can be separated by
delimiters, e.g. commas, or have a fixed length. In the latter case,
padding may be needed to achieve this length. Extra formatting
may be needed to avoid delimiter collision. There are no structural
relationships between the records.
Think about this data model. This model should show that an
assembly contains subassemblies, a subassembly contains parts,
and a part contains subparts. Immediately you can observe that
this data model must be hierarchical in nature, diagramming the
assembly at the top with subassembly, part, and subpart at
successive lower levels.
Root Segment: The data segment at the top level of the hierarchy
is known as the root data segment (as in an inverted tree).
have rewrite the physical addresses in the data records every time
you reorganise the data, move the data to a different storage area,
or change over to another storage medium. The relational model
establishes the connections between related data occurrences by
means of logical links implemented through foreign keys.
3.5.1.6 Object-relational
Take the case of the State of Minerals which manages the mines
in the country. It maintains a library of more than half a million
pictures. Users access this library several times a day. A user
Figure: Object-relational
3.5.2.1 Centralised
Personalised databases are always centralised in one location. If
your company has a centralised computer system, then the
database must reside in that central location. In the client/server
architecture, the database resides on a server machine. The entire
database may be kept on a single server machine and placed in a
central location.
3.5.2.2 Distributed
Shows how fragments of a corporate database are spread across
remote locations. Global organisations or enterprises with
widespread domestic operations can benefit from distributed
databases. In such organisations computer processing is also
distributed, with processing done locally at each location. A
distributed database gets fragmented into smaller data sets.
Normally, you would divide the database into data sets on the
basis of usage. If a fragment contains data that are most relevant
to one location, then that data set is kept at that location. At each
location, a fragment of the enterprise data is placed based on the
usage.
3.5.3 SQL
The above SQL statement will find the name of all employees from
the EMPLOYEE table who’s Age is above 20. The words marked
in blue colour are keywords. Let us break the statement into 3
sections:
select name - SELECT is a keyword and NAME represents
the database field to select.
from employee - FROM is a keyword and EMPLOYEE
represents the database table to select data from.
where age > 20 - WHERE a keyword and AGE > 20 is the
condition based on which the records are selected from
the table.
can get data from distinct and consolidated data structures relating
to customer, orders, invoices, payments, and credit status.
REFERENCE
Developed for
MSC EDUCATION HOLDINGS (PTY) LTD
26 Bonza Bay Road,
Beacon Bay,
East London
Phone: (043) 7485778
Fax: (043) 7483610
E-mail: [email protected]