1.3 Exchanging data Flashcards
Why do we need to reduce the size of files
Data is sent more quickly
Less bandwidth is used
Buffering less likely to occur
Less storage is required
What are the two types of compression
lossy and lossless
What is lossless compression?
File size reduced without losing any original data
What is lossy compression?
Unneeded data permanently removed to lower file size. This data that is removed will be non noticable such as certain sound frequencies.
How does lossless compression work?
Records patterns in the data instead of the data instead to prevent recording redundant data
when should lossless compression be used
when no data can be lost for example a word document
examples of lossy compression
JPEG, MP3, MPEG
examples of lossless compression
ZIP
PNG
GIF
What are the two types of lossless compression
Run length encoding
Dictionary encoding
What is run length encoding?
Compression where conexcutive identical pieces of data are stored as one piece of data and a number representing length
What is dictionary compression
Spots regularly occuring data and stores it in a dictionary
How does dictionary compression reduce size
Repeated phrases are only stored once and are referenced with an identifier
What is encryption
The process of encoding a message so that it can be read only by the sender and intended recipient.
What is symmetric encryption?
An encryption method in which the same key is used to encrypt and decrypt a message
What is asymmetric encryption?
An encryption method in which two keys (one private, one public) are used to encrypt and decrypt a message. Such that someone with the public key can only encrypt and someone witht he private key can only decrpyt.
What is a one time pad
A one time key generated via random methods used for symmetric encryption
What is hashing
A one-way encryption an algorithm but no key
What are the uses of hashing
Storing passwords securly
Uniquely identify a file
What is a flat file database?
A database that consists of information on a single entity
What is an entity
A category of object, person, event or thing of interest about which data needs to be recorded
ther names for entities
Record, tuple
What is a relational database
Database that stores data points that are related to each other
What is a primary key
A field (or group of fields) that uniquely identifies a given entity in a table
What is a secondary key
Another field that can be used to identify an entity in a table
What is a foreign key?
A primary key of one table that appears as an attribute in another table and acts to provide a logical relationship between the two tables
How to write an entity description
EntityName(__PrimaryKey__, foreignKey, secondaryKey1, secondaryKey2)
What is a composite primary key?
A key made up of two primary keys from different tables
What is a one to one relationship
One entity is related to another single entity
What is a one-to-many relationship?
One entity is related to many entities
What is a many-to-many relationship?
Many entities a re related to many other entities
Diagram for one to one
Straight line between entities
Diagram for one to many
One ended 3 pronged pitch fork
Diagram for many to many
many
Two ended 3 pronged pitchfork
What are some manual methods of capturing data
Forms or surveys
What are some automatic methods of capturing data
Smart card readings
Barcode readers
Scanners
Optical character recognition
Optical mark recognition
Magnetic ink character regonition
Sensors
How can data be transferred to a databse
Automatically using DBMS software
By typing it in using a customised format
Importing from a spreadsheet or file
Using an EDI (Electronic Data Ingterchange)
What is an EDI
Computer to computer exchange of documents such as purchase orders
All documents must be in standard format
How do we select data in a database
Use SQL or similar to query data bases
What is database normalization
Process used to come up with the best possible design for a database
It avoids data duplication and inconsistency.
When is a database in first normal form
Contains no repeating attributes
All attributes must be atomic
When is a database in second normal form
It is in first normal form
It contains no partial dependencies
When is a database in third normal form
In second normal form
Contains no non key dependencies
Why is it important to be in third normal form
Easier to maintain data as integrity is preserved, so wen one piece of data is changed other instances of it a re changed
Searches are faster and less storage space is used due to no duplication of data
Easy to update data, due to fields only having to be added to one table as well as necessary data not being able to be deleted without being replaced
Example table creation sql
CREATE TABLE tblProduct
(
ProductID CHAR(4) NOT NULL PRIMARY KEY,
Description VARCHAR(20) NOT NULL,
Price CURRENCY
)
Alter table examples sql
ALTER TABLE tblProduct
ADD QtyInStock INTEGER
DROP QtyInStock
MODIFY COLUMN Description VARCHAR (30) NOT NULL
Linked table example sql
CREATE TABLE ProductComponent
(
FOREIGN KEY ProductID REFERENCES Product(ProductID),
FOREIGN KEY CompID REFERENCES Component(CompID),
PRIMARY KEY (ProductID, CompID) )
Insert into example sql
INSERT INTO Product (ProductID, Description, Price),
VALUES (“A345”, “Pink Rabbit”, 7.50)
Update example sql
UPDATE Product,
SET Description = “Blue Rabbit”, Price = 8.25,
WHERE ProductID = “A345”
Delete example sql
DELETE FROM Product
WHERE ProductID = “A345”
What is the default order for ORDER BY sql
Ascending
Select example sql
SELECT productID, productName, subject, price
FROM tblProduct
WHERE level = 4
ORDER BY productName
Between example sql
WHERE price BETWEEN 5.00 AND 10.00
In example sql
WHERE subject IN (‘Computing’, ‘Maths’)
LIKE example sql
WHERE subject LIKE “Comp*”
Selecting from multiple tables example sql
SELECT tblCustomer.custID, surname, tblProduct.productID, productName
FROM tblCustomer, tblProduct, tblSubscription
WHERE tblSubscription.custID = tblCustomer.custID AND tblSubscription.productID = tblProduct.productID
Join example sql
SELECT tblPlayer.surname, tblPlayer.firstname, tblTeam.teamName
FROM tblTeam, tblPlayer
JOIN tblPlayer
ON tblTeam.teamID = tblPlayer.teamID
WHERE team.teamName = “Binham”
What is transaction processing
The processing of several operations as part of a transaction (a single logical operation)
What is referential integrity
No foreign key in one table can reference a non existent record in a related table
Transaction processing example
Customer makes order:
may consist of several order line all of which must be processed
the quantity of each product adjusted on the stock fill
credit card details checked
payment accepted or rejected
What does ACID stand for?
Atomicity, Consistency, Isolation, Durability
What is ACID for
Ensures that the integrity of the database is maintained under all circumstances
It guarantees that transactions are processed reliably
What is Atomicity in ACID?
All or nothing principle
This property requires that a transaction is processed in its entirety or not at all
What is consistency in ACID
This property ensures that no transaction can violate any of the defined validation rules
Referential integrity, specified when the database is set up, will always be upheld
What is isolation in ACID?
Ensures that concurrent execution (at the same time) of transactions leads to the same result as if transactions were processed one after the other
What is durability in ACID
This ensures that once a transaction has been committed, it will remain so, even in the event of a power cut
As each part of a transaction is completed, it is held in a buffer on disk until all elements of the transaction are completed
Only then will the changes to the database tables be made
What is a potential problem with multi user databases
Simultaneous accessing of records may cause updates to the database to be lost
What is record locking
Record locking prevents simultaneous access to objects in a database in order to prevent updates being lost or inconsistencies in the data arising
What is the problem with record locking
If two users are attempting to update two records, a situation can arise in which neither can proceed, known as deadlock
What is serialisation
ensures that transactions do not overlap in time and therefore cannot interfere with each other or lead to updates being lost
What are the two types of serialisation
Timestamp ordering
Commitment ordering
How does timestamp ordering work
Every object in the database has a read timestamp and a write timestamp
These are updated whenever an object is read
or written
When a user tries to save an update, if the read timestamp is not the same as it was when they started the transaction, the transaction fails
What is commitment ordering
ensures that no transactions are lost if two clients are simultaneously trying to update a record
Transactions are ordered in terms of their dependencies on one another as well as the time they were initiated
What is redundancy?
Having backups for when the main system goes down so everything continues to work as normal
Example of redundancy
Duplicate hardware, located in different geographical areas, mirrors every transaction that takes place on the main system
What is the internet
A network of inter connected networks
What is the world wide web
A collection of resources accessed via the internet
What is the backbone of the internet
The set of dedicated connections that connect several large networks at various points on the globe
What is an IP address?
a unique string of numbers separated by periods that identifies each computer using the Internet Protocol to communicate over a network.
What is a URL
specifies the means of accessing a resource across a network and its location, is linked to an IP address
What is a DNS
The Domain Name System (DNS) converts domain names or host names into IP addresses.
Instead of having to remember a host’s IP address, DNS allows you to use a friendly name to access the host. For example, it is easier to remember http://www.cisco.com than 198.133.219.25.
Why are URLs and DNSs so important
Instead of having to remember a host’s IP address, DNS allows you to use a friendly name to access the host.
How might an IP address be resolves
1.Asks for bbc.co.uk
2.Local DNS doesnt know, refers to root DNS
3.Root DNS knows where .uk server is
4..uk server finds .co serveer
5..co server finds BBC server and resolves IP address
What is A LAN
Local Area Network: two or more computers connected together within a small geographical area, for example confined to one building or site
What is a WAN
Wide area network Systems of LANs that are connected over a large geographical distance
What is a network topology
A network topology is the arrangement of the various computing devices which make up a computer network
What is a bus topology
An arrangement where nodes are connected in a daisy chain by a single central communications channel
What is a star topology?
An arrangement where a central node or hub provides a common connection point for all other nodes
What hardware might be used in a star network as the central node
Switch: sends each communication to the specific computer it is intended for
Advantages of a bus network
Inexpensive to set up
Devices can easily be added
Good for small networks
Disadvantages of a bus network
Main cable is a point of failure
Limited cable length
Performance degrades with heavy use, owing to data “collisions”
Poor security
Advantages of a star network
Easy to isolate problems
Good performance
More secure if a switch is used as data is sent only to the recipient
Disadvantages of a star network
Can be expensive to set up because of the length of cable required
Central device is point of failure
What is physical topology
The physical topology of a network defines how the devices are physically connected
What is a logical topology?
The logical topology defines how the devices communicate across the physical topologies
What is a wifi newtork
One that allows devices to connect to it wirelesses
What is wireless hardware
Wireless Network Interface Card
Wireless access point connected to a router, connected to a modem
What is circuit switching
Circuit switching involves creating a communication connection between two endpoints for the duration of a phone call or transfer of data
Why is circuit switching unfeasible for the internet
Too many devices to be able to make manual connections between
What are packets
Small chunks of one whole data sent individually throughout the web on their own path
What is the advantage of packets
Means large pieces of data are split up so one connection isnt taken up completely for a long time
What is latency
Latency is the length of time it takes to receive a response back after receiving a packet
What is packet switching
The packets across multiple, not necessarily perfect routes to reach a destination
What is a router
A piece of hardware that forwards packets based on IP address
What is a transfer between routers called
A hop
How does routing work
Each router stores data about the available routes to the destination node
Looks up the destination IP address in its routing table to find the best router to forward the packet to
Routers continue to forward the packet until it reaches its destination node
What is a packet made of
Sender IP address
Receiver IP address
Protocol
Packet number
Data
Checksum
What is a protocol
A set of rules, or a formal description, of the format of a digital transmission
What is a gateway
Connects one network to another And converts data to required protocol
Why are protocols important for networking?
Defines the rules of communication so data can be transferred and meaningfully decoded such that we can communicate over a network
What is the TCP/IP protocol stack
A set of rules used in turn, to format a message so it can be sent over a network
What are the layers in the TCP/IP stack
Application
Transport
Network
Link
What happens in the application layer while transmitting
Determines the format of the data to be transmitted
What happens in the application layer while receiving
Receives full data and displays or stores it
What happens in the transport layer when sending
Establishes an end‐to‐end connection with the recipient computer
Splits data into packets
What happens in the transport layer when receiving
Rearranges packets into full data
What happens in the internet layer when sending
Addresses packets with recipient and sender
What happens in the internet layer when receiving
Removes addresses of recipient and sender and pass up to transport layer
What happens in the link layer when sending
Addresses packets with mac addresses of next hop
What happens in the link layer when receiving
Receives packets and strips mac address
Explain why TCP and IP are able to work with different application protocols and different network media
Anything above or below these protocols is separate and does not interact with them
What is a MAC
Media Access Control address: uniquely identifies a physical device with a Network Interface Card
What is a port
The logical connection point for the transmission of information packets.
Used to alert a specific application to deal with data sent to a computer
What is FTP
File Transfer Protocol is an application level protocol used to move files across a network
What is SMTP
Simple Mail Transfer Protocol, Used to send emails and forward them between mail servers to their destination
What is POP3?
Post Office Protocol 3, Downloads email stored on a remote server to a local client (removed after download)
What is IMAP
Internet Message Access Protocol, Manages emails on a sever so multiple clients can access the same email account in synchronicity
What is a firewall
A firewall is either software or hardware that controls access to and from a network
Numbered doors called ports are opened so that only certain traffic is allowed to pass through
What is packet filtering
Packets of data are inspected by the firewall to check which port they are attempting to access
If this traffic is to be allowed through, the port must be opened for the duration of the connection, otherwise the firewall will automatically reject it
What is a proxy server?
A proxy server makes a web request on behalf of your own computer, hiding the true request IP addresses from the recipient
What are the functions of a proxy server
Enables anonymous surfing
Can be used to filter undesirable online content
Logs user data with their requests
Provides a cache of previously visited sites to speed access
What is a worm
A self-replicating program or algorithm that consumes system resources.
What is a trojan
malicious software programs that masquerade as innocuous or useful applications
What is phishing
using email to manipulate a victim into visiting a fake website and giving away personal information
What can help prevent malware and attacks
Guarding against buffer overflow attack
Guarding against SQL injection attack
Use of strong passwords for login credentials
Two-factor authentication
Use of access rights (file system permissions)
What is buffer overflow
Buffer overflow occurs when a program accidentally writes data to a location too small to handle it
As a result the overflowed data (written to location #3 below) may end up in a neighbouring instruction space, causing a system to crash
What is SQL injection?
A malicious user can enter SQL commands via online database forms to change the processing
How can we monitor a network for safety
Packet sniffers
User access logs
What is a client server model
A network model consists of two parts: the client and the server
The client accesses data, services and files from the server
The client initiates communication to the server
The server waits for requests from clients
What is a peer-to-peer network?
A network in which each computer has both server and client capabilities.
What are the characteristics of client server
User IDs, passwords and access levels centrally controlled
Used in many small, medium-size and large organisations
Can be expensive to set up and to manage
Backup is centralised and usually automated
No access to other users’ files
What are the characteristics of peer to peer
Files and programs stored on individual computers
Suitable for a home computer network
Cheap to set up and maintain
Each computer on the network can act as both client and server
Can be used for sharing of music and streaming coverage of live events
What is client processing
Data is processed before it is sent to a server by the client
What is Server processing
Data is processed when it is received by the server from the user
What is an API
An application programming interface, a set of tools that can be used for building software applications
What is a search engine
systems that locate resources (web pages, files, pictures) on the World Wide Web
What is a search engine index
A record of the resources located on the world wide web
How is an index created
Using a web crawler
Why is an index useful
Collecting all web pages in one place is very useful to the user as they can more easily find the web pages they want without having to search through many pages to find what they want.
How does a web crawler work
Follows every link on a website and does the same for each link in order to index as many web pages as possible
What are meta tags
Describe the content of the web page
How are meta tags used in the search process
Sites with relevant content in metatags will be more highly recommended by the search engine as it is more likely for the user to want to go to that site
What is pagerank
Algorithm to determine which web pages should be shown when a user searches somethink
What affects a web pages page rank
Incoming links
Outgoing links
Meta tags
When should server side processing be used
Database queries
Encoding data to readable HTML
Updating the database
Calculations
What are the benefits of server side processing
Provides further validation
Keeps data owned by organisations secure
What should client side processing be used for
Initial validation
Web page interactivity
Manipulating interface elements
Applying styles (CSS)
What are the benefits of client side processing
Reduces the load on the server
Reduces the amount of web traffic