Database Contains A Collection of Related Items or Facts Arranged in A Specific Structure
Database Contains A Collection of Related Items or Facts Arranged in A Specific Structure
– Flat-file database
– Relational database
Flat-file Databases
Relational Databases
• Fields
• Records
• Tables
• Fields
• Records
• Tables
Field
Record
• Forms
• Reports
• Forms
• Reports
• Entering data
• Querying data
• Printing reports
ER Diagram
ER Diagram
• Creating tables
• Viewing records
• Sorting records
• Alphabetic
• Numeric
• Chronological
• Ascending
• Descending
• Querying a database
– Uses of querying
• Find data
• Delete records
• Query languages
– xBase
Query Examples
• SQL
From tblPhoneNumbers
Where LastName=“Norton”;
• xBase
Use tblPhoneNumbers
• Generating reports
– Can manage small accounting applications and inventory, or customer record of a small
business etc.
– Can manage small accounting applications and inventory, or customer record of a small
business etc.
• Oracle
– Platform independent
• DB2
– Venerable IBM database
– Platform independent
• MySQL
– Very inexpensive
– Platform independent
Processing Techniques and Enhancing OS
• Operating System uses following processing techniques to get most out of the available
resources in the computer:
– Multi-tasking
– Multi-processing
– Batch processing
– Spooling
– Virtual Storage
Multitasking
• Multiple tasks, also known as processes, share common resources in computer, such as CPU
and Memory
• In computers with single CPU, multi-tasking is performed by employing scheduling, i.e. assigning
CPU the tasks, and switching between the tasks in time-domain. This kind of assignment is also
known as Context Switch.
Multiprocessing
• The computer system / OS must be capable of allocating tasks between two or more CPUs
Batch Processing
• Batch-processing can applied for data processing, printing, database loading, image processing
etc.
Spooling
• It is a process of transferring data by placing it in a temporary working area where another
program may access it for processing at a later point in time.
Virtual Storage
• It is basically a technique enhance effective size of memory its original physical size
• Performed by memory management program, which effectively utilizes hard disk space to act
like virtual memory
– Realtime OS
– Multiuser/Multitasking OS
– Batch-processing is possible
• Single user/Multitasking OS
– Windows XP and OS X
– Tend to be complex
• Multi user/Multitasking OS
Enhancing an OS
• Utilities
– Prices vary
• Backup software
• Anti-virus software
– Crucial utility
• Firewall
– Crucial utility
• Screen savers
• Prevents burn in
• Binary Numbers
• Text Codes
• – Binary Numbers
• Computer processing is performed by transistors, which are switches with only two possible
states: on and off.
• All computer data is converted to a series of binary numbers– 1 and 0. For example, you see a
sentence as a collection of letters, but the computer sees each letter as a collection of 1s
and 0s.
• If a transistor is assigned a value of 1, it is on. If it has a value of 0, it is off. A computer's
transistors can be switched on and off millions of times each second.
• To convert data into strings of numbers, computers use the binary number system.
• The binary number system works the same way as the decimal system, but has only two
available symbols (0 and 1) rather than ten (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9).
• Computers work with collections of bits, grouping them to represent larger pieces of data,
such as letters of the alphabet.
• Eight bits make up one byte. A byte is the amount of memory needed to store one
alphanumeric character.
• With one byte, the computer can represent one of 256 different symbols or characters.
• A text code is a system that uses binary numbers (1s and 0s) to represent characters
understood by humans (letters and numerals).
• An early text code system, called EBCDIC, uses eight-bit codes, but is used primarily in older
mainframe systems.
• In the most common text-code set, ASCII, each character consists of eight bits (one byte) of
data. ASCII is used in nearly all personal computers.
• In the Unicode text-code set, each character consists of 32 bits (four bytes) of data.
• Machine Cycles
• The Role of Memory in Processing
• Types of RAM
• Both the CPU and memory are attached to the system's motherboard, which connects
all the computer's devices together, enabling them to communicate.
The two main parts of a CPU are the control unit and the arithmetic logic unit (ALU)
• The control unit directs the flow of data through the CPU, and to and from other
devices.
• The control unit stores the CPU's microcode, which contains the instructions for all the
tasks the CPU can perform.
• The ALU is connected to a set of registers—small memory areas in the CPU, which hold data
and program instructions while they are being processed.
• Machine Cycles
• The CPU follows a set of steps called a machine cycle to complete each set of
instructions
• By using a technique called pipelining, many CPUs can process more than one
instruction at a time.
• During the execution cycle, the ALU carries out the instruction, and
may store the instruction's result in memory.
• RAM stores data and program code needed by the CPU. The contents of RAM change rapidly
and often.
• Read-only memory (ROM) is nonvolatile (or permanent). It holds instructions that run the
computer when the power is first turned on.
• The CPU accesses each location in memory by using a unique number, called the memory
address.
contents.
Another type of RAM, called flash memory, can store its contents after power is turned off. Flash
memory is used in digital cameras to store pictures.
• Registers
• RAM
• The Bus
• Cache Memory
• The size of the registers (also called word size) determines the amount of data with which the
computer can work in one go.
• Today, most PCs have 32-bit registers, mean the CPU can process four bytes of data at one
time. Ind more advanced workstations, you may even find register sizes of 64 bits.
• The more RAM a PC has, the more program instructions and data can be held in memory,
which is faster than storage on disk.
• If a PC does not have enough memory to run a program, it must move data between RAM and
the hard disk frequently. This process, called swapping, can greatly slow a PC's
performance.
• The computer's system clock sets the pace for the CPU by using a vibrating quartz crystal.
• A single "tick" of the clock is the time required to turn a transistor off and back on. This
is called a clock cycle.
• Clock cycles are measured in Hertz (Hz), a measure of cycles per second. If a computer has a
clock speed of 300 MHz, then its system clock "ticks" 300 million times every second.
• The faster a PC's clock runs, the more instructions the PC can execute each second.
• The Bus
• A bus is a path between the components of a computer. Data and instructions travel along
these paths.
• The data bus' width determines how many bits can be transmitted between the CPU and
other devices.
• The address bus runs only between the CPU and RAM, and carries nothing but memory
addresses for the CPU to use.
• Cache memory is high-speed memory that holds the most recent data and instructions that
have been loaded by the CPU.
• Cache is located directly on the CPU or between the CPU and RAM, making it faster than
normal RAM.
• CPU-resident cache is called Level-1 (L1) cache. External cache is called Level-2 (L2) cache.
• The amount of cache memory has a tremendous impact on the computer's speed.
• to Other Devices
• Ports
• External devices—such as those used for input and output—are connected to the system by
ports on the back of the computer.
• PCs feature a number of built-in ports, which are ready to accept devices such as a printer,
mouse, keyboard, phone line, microphone and speakers, and others.
• Most computers come with a serial port and a parallel port. A serial port transmits one bit of
data at a time; a parallel port transmits data one byte at a time.
• If the PC does not have a port for an external device, you can install an expansion board into
one of the empty expansion slots.
• A board provides the correct port for the new device, and connects the device to the
CPU by way of the computer's expansion bus.
• Newer bus technologies such as Universal Serial Bus (USB) and IEEE 1394 enable many devices
to be connected to one port.
• Small Computer System Interface (SCSI) is an older standard for extending the bus to multiple
devices through a single port.
• Operating Systems
• Run programs
1. Graphical
2. Command-line
• Running Programs
• System call
• Interrupts
– CPU is stopped
• Organized storage
• PC Operating Systems
PC Operating Systems
• DOS
– 16-bit OS
– Powerful
– Fast
• Windows NT
– 32-bit OS
– Very stable
– Windows NT Workstation
• Windows 9x
– 32-bit OS
• Windows 2000
• Windows XP
• UNIX
– Runs on all computer types
– 32- or 64-bit
– Command-line interface
• Linux
– 32-bit OS
– X Windows GUI
NOS Features
• Runs on servers
• 32- or 64-bit
• Data integrity
• Data security
• Windows NT Server
Real-time OS / Embedded OS
• Windows XP embedded
• Based on Windows XP
• Customized for each device
• Windows CE
• PalmOS
• Pocket PC
• Symbian OS