Exchanging data Flashcards

(104 cards)

1
Q

What are databases (flat file and relational, not MS)

A

Databases are structured persistent storage, and can either be flat file (such as CSV) where all data is stored in a single file, or it can be a relational database (more than one table connected together using relations created by pk’s and fk’s)

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

State properties of flat file (compared to relational)

A

May have redundant data
Harder to update
No specialist knowledge needed to operate
Searching is slower as there is more data
More difficult to manage and possibly expand in the future

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

State properties of relational (compared to flat file)

A

Data integrity
Linked tables
Easier to change format
Provides security features
More expensive (DBMS needed)
Specialist knowledge needed to operate (e.g. normalisation)

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

Primary key

A

A primary key is a field that has a unique value / a unique identifier (1) for every record in that table (1)

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

How can a PK be used as a FK?

A

Primary key in one table…
…used as an attribute / foreign key in
another
Provides a link between tables
Represents many-one relationship

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

Composite primary key

A

A composite primary key is when two attributes in a table are combined and used as the primary key

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

Foreign key

A

A field/attribute that links to a (primary) key in a second table (1)

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

Secondary key

A

A secondary key is an indexed attribute/field

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

Result of indexing attribute/field

A

Indexing a field/attribute allows for searches of the field to be performed quicker (1), but the index takes up extra space in the database (1)

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

Conditions for 1NF

A

No repeating fields/data
Data is atomic
Has a primary key

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

Conditions for 2NF

A

Is in First Normal Form
Every field is dependent on the primary key

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

Conditions for 3NF

A

Is in Second Normal Form
No transitive dependencies

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

Referential integrity

A

– Ensuring that changes are consistent across a database (1)
– If a record is removed all references to it are removed (1)
– A foreign key value must have a corresponding Primary key value in another table (1)

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

ACID

A

Atomicity - a transaction / review can only be fully complete or not complete / cannot partially complete (1)
Consistency - all validation rules in the database must be followed
Isolation - transactions are processed concurrently in such a way that the result would be the equivalent to them being processed sequentially
Durability - once a transaction is processed it is saved to storage, cannot be lost

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

Record locking

A

allows one user/process to access/modify record level data at any one time (1)

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

Database redundancy

A

When a database is copied/backed up (not data redundancy)

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

Capturing data (textbook)

A

Optical mark recognition (OMR) - A data input method that recognises the positions of marks made on paper
Optical character recognition (OCR) - A data input method that converts images of text to machine editable text

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

What is DBMS? (textbook)

A

-Database management system
-Layer of software between database and person/program using it
-Ensures consistent manipulation of software, ensuring integrity and security

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

Data selection and management (textbook)

A

Structured Query Language (SQL), a language used to find and manipulate data within a database
Query by Example (QBE).

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

Exchanging/transmitting data (textbook)

A

Preferable to use standard data format:
-SQL, structured query language
-CSV, Comma-separated value
-XML, eXtensible Markup Language
-JSON, JavaScript Object Notation

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

What is LAN?

A

-A group of devices/computers connected over a small geographical area
-Uses connections owned by the organisation that owns it (the LAN?)
-Stands for local area network
-Use of hard wiring/wireless communication

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

Advantages of LAN (at least 4)

A

communication between machines/workers
any machine can be used
easier to maintain software/files
sharing of peripherals/data
monitoring of workers
simplifies backup procedures

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

What is WAN

A
  • Wide Area Network
  • Collection of connected computers/devices over a large geographical area
  • Often using 3rd party communications
    channels / connections
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Disadvantages of WAN

A

Less secure than LAN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
DNS server process
Customer enters domain name and this is sent to DNS servers DNS servers map this domain to an IP address If DNS server can’t resolve, it passes the request (recursively) to another DNS server …so it can retrieve website from server on which it is hosted
26
IP address
Numerical address made of 4 numbers each between 0-255 / 32 hexadecimal digits …that uniquely identifies a device on a network It is a logical identifier
27
Packet switching
Data split into (equal sized) chunks called packets (1) which have labels (each packet has a header) (1), including the address being sent to (1) and order (1) Each packet is sent on the most convenient route, meaning they may arrive in a different order to which they were sent Once packets arrive at receiver they are reordered
28
Circuit switching
Creates a direct link between two devices for the duration of the communication (eg. public telephone system - there is a direct link between two callers) For a phone call, it includes all silences and pauses, and there is no delay in delivering speech
29
Packet switching > circuit switching (explain 3 advantages)
Transmission is safer from interception because it’s impossible to intercept all packets as they use different routes Very efficient use of network as each channel is only used for a short time If there is an error then only a small, identifiable part of the data is affected, this can be retransmitted easily
30
Protocols
A set of rules (1) to govern data transmission between devices (1)
31
Need for protocols
They are necessary to allow networks to communicate (1) by ensuring all devices follow the same rules/standards (1) so they intercept data/signals in the same way (1)
32
Advantages of protocol layering
-To apply protocols in order -Layers can be modified without affecting other layers -Each layer does a specific job -Improved troubleshooting -Allows for compatibility (standards develop for individual layers)
33
Gateways
Provides a link between two dissimilar networks (networks with different protocols, eg. school networks to internet)
34
Bridge
Provides link between local area networks (eg. to connect student and teacher networks within a school, where a router passes data between the two networks)
35
(Redstone) repeater
Receives a signal and retransmits it
36
Hub
Receives data from a device and broadcasts it to all devices connected to it
37
Switch
Joins devices together on a LAN Receives packets/data Recipient’s address is given in packet header Sends packets/data Out the correct port/to the specific computer device
38
TCP/IP stack
Transmission control protocol/internet protocol Protocols/sets of rules …for communicating across a network/the internet Each protocol belongs to a different layer Layers: application, transport, internet, link Starting at application layer, data is further encapsulated as it is passed to the next layer
39
TCP/IP - application layer
-protocol to be used is decided based on the application -eg. Https for browser based service -adds encryption -decrypts message -removes headers or other non-viewable data from message -passes on to transport layer to send -gets data from transport layer when receiving
40
TCP/IP - transport layer
-data is split into packets and labelled with the packet number, total number of packets and the port number through which it should leave -requests retransmission of any lost packets -passes on data to internet layer when to send -gets data from internet layer when receiving
41
TCP/IP - internet layer
-adds destination IP address -passes on data to link layer to send -received data from link layer when receiving
42
TCP/IP - link layer
-Receives data from internet layer to send -MAC addresses are added to the packets -passes and receives data across wireless network -passes data back up to internet layer when receiving
43
Firewall
A hardware device/piece of software that monitors traffic going to and from a network
44
Importance of firewall for a firm
-prevent unauthorised access to a network -to restrict applications that are used internally that have internet access -to restrict websites that can be accessed from within the company -to protect the company’s data/intellectual property
45
Advantages of CSS
content and formatting kept separate (1), changes can be made to external style sheet and affect whole site (1), saving time (1) and ensuring consistency (1)
46
What is JavaScript
Programming language that runs in a web browser (1) that can be embedded into HTML (1) with < script > tag (1) to add interactivity to a page(1)
47
How is JavaScript translated and why
JavaScript is interpreted as it’s likely to be run on a variety of machines (1) with different processors/architectures, and interpreters run on high level code (1) which is machine independent (1)
48
What is PageRank
-Used to find and rank website pages and list the results in a search engine. Higher score = higher position in search results -Stored as a weighted, directed graph where the pages are nodes and hyperlinks are edges in one direction, weightings are calculated by page rank
49
Factors affecting page rank
-Number of sites that link to the site -PageRank of the linking sites -The number of outward links from the site
50
Search engine indexing
-Search engine indexing is where a database of key words is kept with links to relevant pages stored with the keyword -Words are stored along with their position on a page -Bots (spider/crawlers) will “crawl” the web finding web pages and looking for key words on them and extract metadata -The will navigate from page to page following hyperlinks -They are then sent back to the search engine’s database -When you search for a website, you are not searching on the web, you are searching in the search providers database
51
What is client-server (briefly)
Client computers connect to server Server provides access to resource/service
52
Advantages of client-server
Only one point of failure, easier to manage users, easier to backup, easier to keep data secure, technicians can more easily remotely install/monitor applications/software
53
Server
A device which provides a central point of control/access
54
What is peer-to-peer (briefly)
-Devices on a network have equal status/there is no server -Devices on the network share data
55
Advantages of peer-to-peer
No reliance on company’s server and its connection to the internet, system more likely to be fault tolerant
56
Compression (brief definition)
The process of making a file smaller / take up less storage
57
Why do photographs need to be compressed
Reduces the size of the image file Uses lower bandwidth in transmission Takes up less storage (on the HTTP server)
58
Lossy vs lossless compression
-Lossy permanently removes data -Lossless rewrites original data in more efficient format (using patterns) -Lossless is able to recreate the original file // Lossy is not able to recreate the original file
59
Lossy vs lossless compression for video streaming
-Lossy reduces quality of videos // Lossless keeps original quality -Lossy file size is smaller than if lossless were used -Lossy: compression ratio may be adjusted depending on bandwidth resulting in a noticeable decrease in quality on slower connections. -Lossy: the video will buffer less / quicker to start watching the video // Lossless: the video will buffer more / slower to start watching the video
60
What is run length encoding and suitability of it
-Relies on consecutive pieces of data / characters being the same -Each set of consecutive symbols can be represented by the symbol and its number of occurrences -e.g. AAAABBBBBCCC could be represented as 4A5B3C (or A4B5C3 or any sensible RLE encoding) -Run length encoding is not suited to natural language (more likely to be used in simple images)
61
Dictionary encoding
-Frequently occurring pieces of data / groups of characters are replaced by symbols / tokens / smaller groups of characters / indexes. -A dictionary is then used to say which symbols / tokens / characters / indexes match which groups of characters. When decompressed the dictionary is used to replace the tokens with the original text.
62
Symmetric vs asymmetric encryption
-Symmetric - same key is used to decrypt message as encrypt it -Symmetric encryption would require both parties to have copy of the key (1) this couldn’t be transmitted over the internet or an eavesdropper monitoring the message may see it (1) -Asymmetric gets round this requirement as there are two different keys (1) One key encrypts the data (1) which can be publicly distributed (1) and a different key to decrypt it (1) which is kept private (1)
63
NIC - Network interface card (textbook)
-Allows computer to connect to network... -...via Ethernet/WiFi protocols -NIC built into motherboard
64
WAP - Wireless access point (textbook)
-A device that is connected to a wired network and then provides a wireless signal -Other devices can then use wireless to connect to a Wi-Fi network -Devices can connect from distances of up to about 100 metres.
65
Compare transmission media (textbook)
-Copper cables for short distances, cheap to implement -Fibre optic for long distances, greater data capacity than copper -For wireless, radio waves are used, slower than cables and security risk
66
Briefly describe what is meant by client and server side processing
-Server side processing takes place on the web server. Data is sent from the browser to the server, the server processes it and sends the output back to the browser -Client side processing takes place in the web browser
67
Explain the advantages and disadvantages of client side processing
-Client side processing doesn’t require data to be sent back and forth meaning code is much more responsive -Code is visible which means it can be copied -The browser may not run the code either because it doesn’t have the capability or because the user has intentionally disabled client side code
68
Explain the advantages and disadvantages of server side processing
-Server side processing takes away the reliance of the browser having the correct interpreter -It hides the code from the user, protecting copyright and avoiding it being amended/circumvented -Server side processing puts extra load on the server. This is at the cost of the company hosting the website
69
When is client side processing most suitable?
-Client side processing is best used when it’s not critical code that runs (if it is critical then it should be carried out on the server) -Client side processing is also best where a quick response is needed, an example being games.
70
When is server side processing most suitable?
-Server side processing is best used where it is integral that processing is carried out. It is often used for generating content -It can be used to access data including secure data. For this reason any data passed to it has to be checked carefully.
71
Time complexity for searching hash table
O(1) or constant complexity
72
What is a hash function? (textbook)
A hash function is one that takes in any amount of data and gives a fixed sized output, regardless of the size of the input
73
Describe three properties of hash functions (other than fixed-sized output, textbook)
**Irreversibility** - The property such that an output of a process cannot be used to derive the original input **Determinism** - The property that a process with the same inputs will always give the same output **Collision resistance** - The property that different inputs giving the same output occurs as infrequently as possible
74
Uses of hashes regarding passwords (textbook)
When the user comes to log in: 1: The password they enter is hashed and compared against the stored hash of the password 2: If they are the same, the password is correct and they are granted access If the system is hacked, only the hashes are available and, as they cannot be reversed, the hacker is unable to get access to the passwords themselves
75
Uses of hashes regarding proof of state (textbook)
To prove that the contents of the computers haven’t been changed: 1: Take the contents of the entire secondary storage system and hash them 2: This hash is then recorded. 3: If anyone questions whether the evidence has been tampered with, the system can be hashed again 4: If so much as one bit of data has changed the hash will be different
76
What are hash tables (ChatGPT and textbook hybrid)
-A data structure that uses hashing to map keys to values. -Stores data at an index computed by a hash function. -Designed for fast data access
77
SQL general syntax - SELECT, FROM, WHERE
SELECT column1, column2, ... FROM table_name WHERE condition; Example: SELECT * FROM Customers WHERE Country='Mexico';
78
SQL general syntax - INSERT INTO
INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...); *or if for all columns* INSERT INTO table_name VALUES (value1, value2, value3, ...);
79
SQL general syntax - DELETE
DELETE FROM table_name WHERE condition;
80
SQL general syntax - LIKE
SELECT column1, column2, ... FROM table_name WHERE columnN LIKE pattern;
81
SQL - the two wildcards for LIKE
-The percent sign % represents zero, one, or multiple characters -Example: SELECT * FROM Customers WHERE CustomerName LIKE 'a%'; ...selects all customers that starts with the letter "a" (position of % sign can be changed e.g. "%a%" so it contains "a" or "a%" so it ends with "a" -The underscore sign _ represents one, single character -Example: SELECT * FROM Customers WHERE city LIKE 'L_nd__'; ...returns all customers from a city that starts with 'L' followed by one wildcard character, then 'nd' and then two wildcard characters:
82
SQL general syntax - (INNER) JOIN
SELECT column_name(s) FROM table1 INNER JOIN table2 ON table1.column_name = table2.column_name; Example: SELECT Products.ProductID, Products.ProductName, Categories.CategoryName FROM Products INNER JOIN Categories ON Products.CategoryID = Categories.CategoryID;
83
SQL general syntax - DROP
DROP DATABASE databasename;
84
HTML - hyperlink linking to website "https://esat-tmua.ac.uk" with title "ESAT"
85
HTML - ordered list of the three universities that rejected me
  1. Cambridge
  2. Imperial
  3. UCL
...this would return: 1. Cambridge 2. Imperial 3. UCL
86
HTML - unordered list of the three universities that rejected me
  • Cambridge
  • Imperial
  • UCL
...this would return: - Cambridge - Imperial - UCL
87
HTML - example of page with title, heading and paragraph
Page Title

This is a Heading

This is a paragraph.

88
HTML - insert an image called "EsatScores.jpg" located in the folder "Academic failures" of width 360 and height 640 pixels. In case image does not show, display text "A screenshot of my ESAT scores!"
<*img src="Academic failures/EsatScores.jpg" alt="A screenshot of my ESAT scores!" height="640" width="360"*>
89
HTML - a top UK University is creating a new website for people to apply through. This website consists of a form which asks for only two pieces of information needed to make a decision: -Full name -Average ESAT score Write suitable HTML for this purpose, including a way to submit the form
```

Full name:

Average Esat score:

```
90
HTML - show how style attribute can be used to set the colour of heading "This is a heading" to blue
```

This is a heading

```
91
CSS - show how all headings 1's across a page can be set to a dark blue colour and a font size of 13px
h1{ color: darkblue; font-size: 13px; }
92
CSS - the three ways of specifying size of font
-em: the number of times bigger it is than the standard font on the page -px: pixels -%: the percentage of the size it is of the standard font on the page For example: font-size: 3em; font-size: 11px; font-size: 150%;
93
HTML - link external style sheet to HTML page
``` ```
94
JavaScript - structure (two points)
-Command lines are terminated with a semicolon (;) -Curly brackets are used to define start and end of sections of code
95
JavaScript - defining a function "myFunction"
function myFunction() { ... ... }
96
JavaScript - defining a variable "esat_score"
var esat_score = 3.97;
97
JavaScript - three ways to include in HTML
``` ```
98
JavaScript - and, or
and = && or = ||
99
JavaScript - if statements
if (a == 'hello') { ____console.log('blah'); } else if (a == 'bye') { ____console.log('blah 2'); } else { ____console.log('blah 3'); } | _____ represents indent
100
JavaScript - for loops
``` for(var i = 0; i < 10; i++) { console.log(i); } for(var i of array) { console.log(i); } ```
101
JavaScript - read the password entered by user, identified by "Password", and set it as a variable
var elem = document.getElementById('Password'); var pass = elem.value; ...or all in one line: var pass = document.getElementById("Password").value;
102
JavaScript - display a message in HTML label tag identified by "error Text"
document.getElementById("errorText").innerHTML = "Password Length Error";
103
HTML - tag for italics
...text.... OR ...text...
104
HTML - tag for bold
...text...