Exchanging data Flashcards

1
Q

Why is compression important for sharing files?

A

Compression is the process of reducing the amount of storage required by a file.

The bigger the file = the more time it takes to get transferred

So compressing files increases the number of files that you can transfer in a given time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Downloading the full version of a file is faster than downloading the compressed file over the internet
TRUE OR FALSE

A

FALSE
Downloading the compressed file over the Internet is faster than downloading the full version of a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give categories of compression

A

Lossy and Lossless

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Lossy compression

A

Reduces file size while REMOVING SOME INFORMATION
So compressed image is more pixelated/sound is less clearer
Compressed file cant be turned back into original

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Lossless compression

A

Reduces file size WITHOUT REMOVING INFORMATION
So compressed file can be turned back to the original without loss of quality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How would you compress audio files? Which compression category would you use?

A

Using LOSSY
Removing very high or very low frequences which are less noticeable to the ear
However, there is no way to go back to the original as there is no record of these high or low frequences and how high and low they were

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Run Length Encoding is a type of….

A

Lossless compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Run Length Encoding

A

LOSSLESS COMPRESSION
Repeated values are rempved and replaced with one occurence of the data followed by the number of times its repeated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When would Run Length Encoding not be suitable?

A

When there is not much redundant data so it wouldnt offer a large reduction in file size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Dictionary encoding?

A

LOSSLESS COMPRESSION
Frequently occuring pieces of data are replaced with an index
Compressed data is stored alongside a dictionary which matches the frequently occuring data to an index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Dictionary encoding is an example of….

A

Lossless compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Give a disadvantage of Dictionary encoding

A

The compressed data has to be stored alongside the dictionary which will increase the file size of the compressed data.
Without the dictionary the original data cant be restored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is meant by encryption?

A

The process of scrambling data do that it can only be understood by the sender and intended recipient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is symmetric encryption?

A

Both the sender and receiver share the same private key

So SAME KEY IS USED FOR ENCRYPTING AND DECRYPTING DATA

This private key is distributed in a process called key exchange

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In Symmetric encryption both the sender and receiver share the same private key

This private key is distributed in a process called…

A

Key exchange

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Asymmetric encryption?

A

2 keys are used
The 2 public keys can be published anywhere but the 2 private keys are to be kept secret

Message is encrypted with senders private key and recipients public key and decrypted using receivers private key and senders public key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Explain the process of hashing (simple)

A

An input called a key is turned into a fixed size value called a hash using a hashing function (algorithm)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The output of a hash function can be reversed to form the key
TRUE OR FALSE

A

FALSE
The output of a hash function CAN’T be reversed to form the key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The output of a hash function CAN’T be reversed to form the key
What would this fact make hashing useful for?

A

Storing passwords as the password entered by the user can be hashed and checked against a key to see if it is correct.
But a hacker would only get accessed to the key which can’t be reversed to gain passwords

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What would be the time complexity for looking up data in an array?

A

O(1) Constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is meant by a collision in hash tables?
Give methods to deal with these?

A

When 2 pieces of data produce the same hash

-Making a new/bigger hash table
-Storing items with same hash in a list under same hash value
-Use a second hash function to generate a new hash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A good hash function should…..

A

-Have a low chance of collisions
-Provide an output/hash that is smaller than the input/key ==> because otherwise it would take longer to search for the hash than just searching for the key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is a hash table?

A

A data structure which holds key-value pairs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

A relational database is a d….

A

database that recognises the differences between entities by creating different tables for each entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is an attribute in databases?

A

A characteristic of an entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is meant by a primary key?

A

A unique identifier for each record in the table
(shown by underlining)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is meant by a foreign key?

A

An attribute which links two tables together
-It will be the primary key in a table and then the foreign in another
(denoted using asterisk *)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is meant by a secondary key?

A

A key which allows a database to be searched quicker

eg. patientID is primary key but a patient may not know this. So a secondary key could be their surname
-So you can search and order by surname to find specific patients

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Give examples of entity relationship modelling

A

ONE TO ONE
ONE TO MANY
MANY TO MANY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

ONE TO ONE
MANY TO ONE
MANY TO MANY

Are examples of entity relationship modelling?

A

FALSE

ONE TO ONE
ONE TO MANY (NOT MANY TO ONE)
MANY TO MANY

MANY TO ONE DOESNT EXIST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What does database normalisation try to accomplish?

A

-No redundancy (unnecessary duplicates)
-Complex queries can be carried out
-Records can be added and removed without issues
-Consistent data throughout linked tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What happens in first normal form?

A

No attribute contains more than a single value
(No repeated attributes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What happens in second normal form?

A

No partial dependencies meaning that no attributes can depend on part of a composite key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What happens in third normal form?

A

Nonkey dependencies which means the attribute only depends on the value of the primary key and nothing else

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What is meant by indexing in databases?

A

A method used to store the position of each record ordered by a certain attribute (called secondary key).(eg.surname instead of patientID)
Even though the primary key is automatically indexed it is almost never used as its hard to remember
-So we use secondary keys instead

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

How would you capture the data when people pay cheques?

A

Pay cheque = ordering bank to get money from your account and give it to the person that is on the cheque.

Bank scans cheque using MICR Magnetic Ink Character Recognition.
-All the details excluding the amount which is to be entered manually are printed in a special magnetic ink which can be recognised by a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

How would you capture data from multiple choice questions?

A

Using Optical Mark Recognition (OMR)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Exchanging data

A

The process of transferring the collected data.
Can use Electronic Data Interchange (EDI) which doesnt require human interaction and enables data transfer from one computer to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Structured query language (SQL) is an example of a…

A

Declarative language used to manipulate databases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

SQL SELECT statement structure

A

SELECT attribute
FROM table
WHERE conditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

ORDER BY

A

ASC = ascending
DESC= descending

If you say:
ORDER BY DatePublished
it wil automatically order in ascending
Also can do:
ORDER BY DatePublished ASC

so ORDER BY DatePublished ASC = ORDER BY DatePublished

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

X JOIN in databases

A

Combines rows from multiple tables based on a common field between them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

What is the difference between VARCHAR and CHAR in databases?

A

VARCHAR(n) is a string of variable length with upper limit n (max length is n)

CHAR(n) is a string of fixed length n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

ALTER in databases

A

Used to add, delete or modify the columns/ ATTRIBUTES in a table

E.g
ADDING ATTRIBUTE:
ALTER TABLE Students
ADD Birthday DATE

DELETING ATTRIBUTE:
ALTER TABLE STUDENT
DROP COLUMN Birthday

MODIFYING DATA TYPE
ALTER TABLE STUDENT
MODIFY COLUMN Birthday INTEGER

45
Q

Using ALTER write an SQL query deleting the Birthday attribute from the students table

A

ALTER TABLE STUDENT
DROP COLUMN Birthday

46
Q

Using ALTER write an SQL query modifying the Birthday attribute from the students table so that its data type is integer

A

ALTER TABLE STUDENT
MODIFY COLUMN Birthday INTEGER

47
Q

Using ALTER write an SQL query adding the Birthday attribute to the students table

A

ADDING ATTRIBUTE:
ALTER TABLE Students
ADD Birthday DATE

48
Q

INSERT SQL query format

A

INSERT INTO (birthday, surname)
VALUES (11/02/2004, “Smith”)

49
Q

Updating a record in a database table format
E.G In the students table change the birthday from 11/02/2004 to 11/04/2004 for the student with surname Smith

A

UPDATE Students
SET Birthday= 11/04/2004
WHERE Surname = “Smith”

50
Q

What is meant by referential integrity?

A

A process which ensures consistency.
Ensures that info is not removed if it is required elsewhere in a linked table

-This means that when 2 databases are linked one cant be deleted as the other needs its contents
(e.g pet and owner) without an owner the animal isnt a pet the pet needs its owner

51
Q

What is meant by transaction?

A

A single operation being executed on data
-Sometimes a collection of operations can also be called a transaction

52
Q

WHAT IS THIS?
A process which ensures consistency.
Ensures that info is not removed if it is required elsewhere in a linked table

-This means that when 2 databases are linked one cant be deleted as the other needs its contents
(e.g pet and owner) without an owner the animal isnt a pet the pet needs its owner

A

Referential integrity

53
Q

Explain the term deadlock

A

A situation in which two or more transactions are waiting for one another to give up locks.

eg user1 (transaction) finishes with record1 and user2(transaction) finishes with record2 but now user1 wants record2 and user2 wants record1

54
Q

Explain ACID in transactions

A

ACID = ATOMICITY, CONSISTENCY, ISOLATION, DURABILITY

Atomicity= A transaction must be processed in its entirety or not at all (fully or then no)

Consistency= A transaction must maintain the referential integrity rules between linked tables (one table cant be deleted as the other table requires its contents)

Isolation= Simultaneous transactions should lead to the same result as if they were carried out one after the other
At the same time=one after the other

Durability=When a transaction has been executed it will remain just in case (e.g in the event of a power cut)

55
Q

TRANSACTIONS
Explain what the A in ACID stands for

A

ATOMICITY
A transaction must be processed in its entirety or not at all (fully or then no)

56
Q

TRANSACTIONS
Explain what the C in ACID stands for

A

CONSISTENCY
A transaction must maintain the referential integrity rules between linked tables (one table cant be deleted as the other table requires its contents)

57
Q

TRANSACTIONS
Explain what the I in ACID stands for

A

ISOLATION
Simultaneous transactions should lead to the same result as if they were carried out one after the other
At the same time=one after the other

58
Q

TRANSACTIONS
Explain what the D in ACID stands for

A

DURABILITY
When a transaction has been executed it will remain just in case (e.g in the event of a power cut)

59
Q

Explain record locking in databases

A

Prevents simultaneous access to records in order to prevent inconsistencies and loss of updates

Once a person is editing a record, this ‘locks’ the record so that no one else can access the same record until the person is finished

DRAWBACKS = Deadlocks

60
Q

Give an advantage and disadvantage of using record locking

A

ADVANTAGE=
-Doesnt allow more than one person to modify a record at a time =>
-No loss of updates
-Prevents inconsitencies

DISADVANTAGE
-Deadlocks

61
Q

Explain what is meant by a deadlock by giving an example

A

If user 1 accesses record1 and user2 accesses record2
Then user1 wants to access record2 and user2 wants to access record1

Now they are both waiting for eachother but no progress is made

62
Q

Give an advantage of data redundancy

A

In situations such as big companies who cant afford to lose important data, it means that if one copy of the data is lost there is still another copy which remains unaffected and be recovered
(as redundancy= having one or more copies of data in physically different locations)

63
Q

What is meant by data redundancy?

A

Having one or more copies of data in physically different locations

64
Q

Give types of networks

A

Local Area Network (LAN)
Wide Area Network (WAN)

65
Q

What is meant by a network?

A

When two or more computers are connected together with the ability to transmit data between eachother

66
Q

When would you use a WAN?

A

Its a network which is spread over a large geographical area so therefore large corporations with offices in multiple locations for example

-This way they can communicate with eachother between different sites

WANs also require extra telecommunication hardware.
Infrastuctures used in WANs are owned by 3rdparties

67
Q

When would you use a LAN?

A

Its a network which is spread over a small geographical area or a single site so perhaps a school

68
Q

What is the difference between a LAN and a WAN?

A

LAN= Small geographical area/single site
WAN= Large geographical area/multiple sites

69
Q

What is meant by the term protocol?

A

A set of rules defining how two computers communicate with eachother

Protocols are standard so that all devices have a designated method of communicating with eachother, regardless of manufacturer

70
Q

Protocols are standard. What is meant by this?

A

Protocols are standard so that all devices have a designated method of communicating with eachother, regardless of manufacturer

71
Q

What is FTP?

A

FILE TRANSFER PROTOCOL

A protocol used for the transmission of files over networks

72
Q

What is IMAP and POP3?

A

IMAP= Internet message access protocol
POP3= Post office protocol

Mailing protocols used for email access

73
Q

What is TCP/IP?

A

TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL

Networking protocol used for routing packets through a network

74
Q

Networking protocol used for routing packets through a network

A

TCP/IP
(TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL)

75
Q

What is HTTP? HTTPS?

A

HYPERTEXT TRANSFER PROTOCOL/(SECURE)
HTTP= used for web page rendering
HTTPS= encrypted version of HTTP (more secure)

76
Q

What is meant by webpage rendering?

A

The process of turning HTML, CSS, and JavaScript code into an interactive page that website visitors expect to see when clicking on a link.

77
Q

The internet is…

A

a network of networks which allows computers on opposite sides of the globe to communicate with eachother

78
Q

What happens in the application layer?

A

Specifies which protocol needs to be used in order to relate the application being sent

79
Q

What happens in the transport laye?

A

-Uses TCP (Tranmission control protocol) to establish an end-to-end connection bewteen the source and recipient computer

-Splits data into packets, adds sequence number and port number being used for communication

-If any packets gets lost==> transport layer requests retransmission of these

80
Q

What happens in the network layer?

A

-Adds source and destination IP addresses

-Combo between IP address and port number is a socket address

-Routers operate in this layer and they use the IP addresses to determine where to forward the packet to next

81
Q

The router uses the… to forward packets

A

IP address

82
Q

In which TCP/IP layer do routers operate?

A

Network layer

83
Q

What does a socket tell you?

A

IP+Port num=Socket
IP= Which devices the packets must be sent to
Port num= Which application is being used on that device

84
Q

What happens in the link layer?

A

-Creates a physical connection between the network nodes

-Adds a MAC address which identifies the NICs of the source and destination computers so that the packets can be sent properly

85
Q

For devices on the same network, the destination MAC address is….

A

SAME NETWORK
Destination MAC address =MAC address of recipient computer

Otherwise it will be the MAC address of the router

86
Q

Once the destination has been reached, what happens in the TCP/IP stack?

A
  1. MAC address is removed by link layer
  2. IP address is removed by network layer
  3. Port number is removed and packets are reassembled by transport layer
  4. Application layer presents the data to recipient in the form it was requested in
87
Q

Give an example of a WAN

A

The Internet

88
Q

Give a disadvantage of WANs

A

Usually require extra telecommunication hardware.

89
Q

Explain the Domain Name System (DNS)

A
90
Q

What is a firewall? (simple)

A
91
Q

Explain how a firewall works

A

Prevents unauthorised access to a network.
Consists of 2 NICs which sit between the user and the internet
Firewall passes packets between these and compares the packets against a set of rules set by the firewall software

92
Q

When access is denied by a firewall either the packet is dropped or the packet is rejected. Explain the difference

A

Rejected packet sends an alert to the sender to notify them whereas a dropped packet won’t

93
Q

Explain what is meant by packet filtering?

A

Packet filtering/static filtering

Limits network access in accordance to administrator rules and policies

It examines source and destination IPs, protocols and ports being requested

94
Q

Why is encryption important when transmitting data over the Internet?

A

Its a way of keeping data secure as it makes data unreadable if intercepted

95
Q

Proxy servers

A
96
Q

How many bits in a MAC address?

A

48 Bit value code

97
Q

What is a NIC?

A

NETWORK INTERFACE CARD

It is a card usually built into a device required for a device to connect to a network.
It assigns a device a unique MAC address

98
Q

What is a switch?

A

A device used to direct the flow of data
(Most commonly used in star topology)

99
Q

What is a WAP?

A

WIRELESS ACCESS POINT

A device which allows other devices to connect to a network

100
Q

What is a router?

A

A device which is used to connect 2 or more networks together

101
Q

What is a Gateway? How do they work?

A

A device used to connect 2 or more networks together but when the networks have different protocols from eachother.
-It translates protocols so the networks can communicate with eachother

They work by:
Removing packet header then add data to packets using the new protocol

102
Q

Give some points on the idea of Client Server networks

A

Clients = terminals
-They can request to use server

Server:
-Powerful, central computer
-Greater processing power than terminals
-Holds all important info and resources

103
Q

Give advantages of Client Server networks

A

-More secure as data is stored in one place
-Central backups are carried out so no need for individual backups
-Data and resources can be shared between clients

104
Q

Give disadvantages of Client Server Networks

A

-Expensive to set up
-If server fails the performance fails as clients depend on server
-Trained staff required to maintain server

105
Q

Give advantages of using Peer to Peer networks

A

-Cheaper than cs networks
-Users can share resourses
-Easy to maintain (no specialist staff needed, so cheaper)
-Not dependent on central server, so if one computer fails the rest wont (only performance as that computer may have some resources that the other may not have)

106
Q

Give disadvantages of using Peer to Peer networks

A

-Impossible to trace origin of files (thats why they are commonly used in piracy)
-Poorer security
-May be diff to locate resources
-Backups must be done on each separate computer

107
Q

Give some points on the idea of Peer to Peer networking

A

Computers are connected to eachother so they can share files

Each devices is both the client and server as it can both request and provide resources

Used in piracy as its almost impossible to trace the origin of files

108
Q

Why would Peer to Peer networks be useful in piracy?

A

Because its almost impossible to trace the origin of files

109
Q
A