Você está na página 1de 23

Database Management Systems

• Database contains a collection of related items or facts arranged in a specific structure

– Organizes and describes the data

– Often includes helper documents

• Two different types of database

– Flat-file database

– Relational database

Flat-file Databases

• Typically has only one table

– If multiple, each has a separate file

• Useful for simple data storage needs

• Hard to manage large data needs

• Can waste disk space

Relational Databases

• Made of two or more tables

• Tables are related by a common field

– Called a relationship or join

– Can help organize data

• Most common form of database

• Maintaining data is easier than flat-file

• No wasted disk space

Key terms related to database

• Fields

• Records

• Tables
• Fields

• Hold an individual piece of data

• Are named descriptively

• Often called a column

• Phone book examples

• Name, address, e-mail, phone number

• Fields may contain no data

• Records

• One full set of fields

• Often called a row

• Phone book example

• Smith, Joe, 123 Some Street, 412-555-7777

• Databases may have unlimited rows

• Tables

• One complete collection of records

• Databases may have thousands of tables


Field Name

Field

Record

Database Helper Documents

There are two types of helper documents

• Forms

• Reports

• Forms

• Present one record to the user

• Often used to change or view data

• Reports

• Produce printed results from the database

• Includes tools to summarize data

• Programs that control the database


• Allows

• Entering data

• Querying data

• Printing reports

• Supports thousands of users

• Includes tools to protect the data

• Specifically required when we use Relational Database

ER Diagram

ER Diagram

Working with a Database

• Creating tables

– List the necessary fields


– Steps to define a field

• Descriptively name the field

• Specify the field type

• Determine the field size

• Entering data into a table

– Users type data into a field

– Data must be entered accurately

• Constraints help to verify data

– Forms are typically used for data entry

• Viewing records

– Datasheet view shows all records

– Filters can limit the records shown

• Display only records matching a criteria

– Forms allow viewing one record

• Sorting records

– Order records based on a field

– Multiple sub sorts resolve ‘ties’

– Several types of sorts

• Alphabetic

• Numeric

• Chronological

• Ascending

• Descending

• Querying a database

– Statement that describes desired data


– List of fields can be modified

– Uses of querying

• Find data

• Calculate values per record

• Delete records

– Most important DBMS skill

• Query languages

– All DBMS use a query language

• Most DBMS modify the language

– Structured Query Language (SQL)

• Most common query language

– xBase

• Query language for dBase systems

– Query by example (QBE)

• Interface to SQL or xBase

• Interactive query design

Query Examples

• SQL

Select FirstName, LastName, Phone

From tblPhoneNumbers

Where LastName=“Norton”;

• xBase

Use tblPhoneNumbers

List FirstName, LastName, Phone


For LastName=“Norton”

• Generating reports

– Printed information extracted from


a database

– Can calculate data

• Calculate data per row

• Calculate for entire table

– Pictures and formatting can be included

• Databases for individuals

– Manage aspects of your life

– Can manage small accounting applications and inventory, or customer record of a small
business etc.

– Microsoft Access is the most popular

Common Personal-use DBMS

• Databases for individuals

– Manage aspects of your life

– Can manage small accounting applications and inventory, or customer record of a small
business etc.

– Microsoft Access is the most popular

Common Corporate DBMS

• Oracle

– Most popular enterprise-level DBMS

– Very flexible storage system

– Can be very complex

– Platform independent

– Offers a wide range of solutions

• DB2
– Venerable IBM database

– Platform independent

– Only database using pure SQL

• Microsoft SQL Server

– Fastest growing DBMS

– Only runs on Microsoft platforms

– Eight different versions exist

– Extremely scalable architecture

• Software can grow with the data

• MySQL

– Leading DBMS for Linux

– Very inexpensive

– Features are those needed in business

– Often faster than other DBMS

– 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

• More than one processors working simultaneously within same computer

• The computer system / OS must be capable of allocating tasks between two or more CPUs

• Execution of multiple concurrent software processes in a system in contrast to a single process


at any one instant.

• Multitasking is Software oriented, while Multiprocessing is Hardware oriented.

Batch Processing

• Execution of series of jobs / programs automatically without manual intervention

• Mostly, an script is used to set a batch processing task

• Completely in contrast to “Interactive” applications

• 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.

• Used when an storage or output device is slower than data transfer

• Requires a kind of buffer, or temporary storage area

• Most common application of spooling is “Printing”

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

Types of Operating System

• OS can be divided into following types based on processing techniques:

– Realtime OS

– Single User/ Single Tasking OS

– Single User/ Multitasking OS

– Multiuser/Multitasking OS

• Real-time operating system

– Very fast small OS

– Built into a device

– Respond quickly to user input

– MP3 players, Medical devices

– Batch-processing is possible

• Single user/Single tasking OS

– One user works on the system

– Performs one task at a time

– MS-DOS and Palm OS

– Take up little space on disk


– Run on inexpensive computers

• Single user/Multitasking OS

– User performs many tasks at once

– Most common form of OS

– Windows XP and OS X

– Require expensive computers

– Tend to be complex

• Multi user/Multitasking OS

– Many users connect to one computer

– Each user has a unique session

– UNIX, Linux, and VMS (Open Virtual Memory System)

– Maintenance can be easy

– Requires a powerful computer

Enhancing an OS

• Utilities

– Provide services not included with OS

– Goes beyond the four functions

– Firewall, anti-virus and compression

– Prices vary

• Backup software

– Archives files onto removable media

– Ensures data integrity

– Most OS include a backup package

– Many third party packages exist

• Anti-virus software
– Crucial utility

– Finds, blocks and removes viruses

– Must be updated regularly

– McAfee and Norton Anti-Virus

• Firewall

– Crucial utility

– Protects your computer from intruders

– Makes computer invisible to hackers

– Zone Labs is a home firewall

– Cisco sells hardware firewalls

• Screen savers

– Crucial utility for command line systems

• Prevents burn in

– Merely fun for GUI systems

– Screen saver decorates idle screens

• How Computers Represent Data

• Binary Numbers

• The Binary Number System

• Bits and Bytes

• Text Codes

• How Computers Represent Data

• – 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.

• The Binary Number System

• To convert data into strings of numbers, computers use the binary number system.

• Humans use the decimal system (“deci” stands for “ten”).

• 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).

• How Computers Represent Data - Bits and Bytes

• A single unit of data is called a bit, having a value of 1 or 0.

• 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.

• How Computers Represent Data - Text Codes

• 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.

• How Computers Process Data

Where Processing Occurs:

• The Control Unit

• The Arithmetic Logic Unit

• Machine Cycles
• The Role of Memory in Processing

• Types of RAM

• How Computers Process Data –

• Where Processing Occurs

• Processing takes place in the PC's central processing unit (CPU).

• The system's memory also plays a crucial role in processing data.

• Both the CPU and memory are attached to the system's motherboard, which connects
all the computer's devices together, enabling them to communicate.

• How Computers Process Data –

• The Control Unit

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.

• How Computers Process Data –

• The Arithmetic Logic Unit

• The actual manipulation of data takes place in the ALU.

• The ALU can perform arithmetic and logic operations.

• 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.

• How Computers Process Data –

• 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.

• The machine cycle includes two smaller cycles:


• During the instruction cycle, the CU "fetches" a command or data from
memory and "decodes" it for the ALU.

• During the execution cycle, the ALU carries out the instruction, and
may store the instruction's result in memory.

• How Computers Process Data –

• The Role of 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.

• How Computers Process Data - Types of RAM

There are two basic types of RAM: static and dynamic

• Dynamic RAM (DRAM) chips must be recharged

with electricity very frequently, or they will lose their

contents.

• Static RAM (SRAM) does not need to be recharged

as often as DRAM, and can hold its contents longer.

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.

Factors Affecting Processing Speed

• Registers

• RAM

• The System Clock

• The Bus

• Cache Memory

• Factors Affecting Processing Speed – Registers


• The CPU contains a number of small memory areas, called registers, which store data and
instructions while the CPU processes them.

• 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.

• Factors Affecting Processing Speed – RAM

• The amount of RAM in a PC has a direct affect on the system's speed.

• 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 System Clock

• 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.

• Peripheral devices are connected to the CPU by an expansion bus.

• Factors Affecting Processing Speed –


• Cache Memory

• 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.

• Extending the Processor's Power

• to Other Devices

• Ports

• Expansion Slots and Boards

• Extending the Processor's Power

• 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.

• Adding Other Devices –

• Expansion Slots and Boards

• 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

• Functions of Operating Systems

• Provide a user interface

• Run programs

• Manage hardware devices

• Organized file storage

• Providing a User InterfaceUser interface

– How a user interacts with a computer

1. Graphical

2. Command-line

• Running Programs

• Many different applications supported

• System call

– Provides consistent access to OS features

• Share information between programs

– Copy and paste

– Object Linking and Embedding

• Managing HardwarePrograms need to access hardware

• Interrupts

– CPU is stopped

– Hardware device is accessed

• Device drivers control the hardware

Organizing Files and Folders

• Organized storage

• Long file names


• Folders can be created and nested

• All storage devices work consistently

Overview of Operating Systems

• PC Operating Systems

• Network Operating Systems

• Embedded Operating Systems/RTOS

PC Operating Systems

• Microsoft Windows is the most popular

– Installed more than other OS combined

– Installed on about 95% of computers

– Apple and Linux represent the other 5%

• DOS

– Disk Operating System

– Single user single-tasking OS

– Command line interface

– 16-bit OS

– Powerful

– Fast

– Supports legacy applications

• Windows NT

– Designed for a powerful system

– 32-bit OS

– Very stable

– Windows NT Workstation

• Single user multi tasking OS


– Windows NT Server

• Multi user multi tasking OS

• Network operating system

• Windows 9x

– 95, 98, and Millennium Edition (Me)

– 32-bit OS

• Supported 16-bit programs well

– Very pretty not stable OS

– Still found in large corporations

– 95 introduced the Start button

– 98 introduced active desktop

– Me improved multimedia software

• Windows 2000

– Look of 9x with NT stability

– Optimized for office and developers

– Application software ran very well

– Entertainment software ran very poorly

• Windows XP

– Microsoft’s new desktop product after 2000

– Different look from 2000

– Many different versions (with SPx)

– Digital multimedia support was enhanced

– Communications was enhanced

– Mobile computing became a priority

• UNIX
– Runs on all computer types

– 32- or 64-bit

– Very stable and fast

– Command-line interface

– Can cost thousands of dollars

• Linux

– Free or inexpensive version of UNIX

– 32-bit OS

– Very stable and fast

– Most flavors are open source

– X Windows GUI

• Command line interface is available

NOS Features

• Network operating system

• Fast and stable

• Runs on servers

• Multi-user and multitasking OS

• 32- or 64-bit

• File and print sharing

• Users access the same files

• Hundreds of users use a printer

• Different OS can interact

• Data integrity

• Backups copies data onto tape

• RAID copies data onto other drives


• Redundant Array of Inexpensive Disks

• Relies on two or more hard drives

• May speed access to data

• Data security

• Access to data can be restricted

• Access to server resources is controlled

• Audits can be kept

Networking Operating Systems

• Windows NT Server

• Windows 2000 Server

• Windows 2003 Server

• UNIX (for servers)

• Linux (for servers)

Real-time OS / Embedded OS

• Real-time operating system

– Very fast small OS

– Built into a device

– Respond quickly to user input

– MP3 players, Medical devices

Embedded Operating Systems

• Devices have EOS built in

• Cell phones, PDAs, medical equipment

• Stable and fast

• Windows XP embedded

• Based on Windows XP
• Customized for each device

• Windows CE

• Not based on a desktop OS

• Customized for each device

• PDA and cell phones

• Microsoft Automotive will run in cars

• PalmOS

• Pocket PC

• Symbian OS

Você também pode gostar