EXAM Flashcards

(61 cards)

1
Q

What do you have to do when you store something in LMC

A

You have to store it into a memory address with an integer value between 1 and 99

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

FIVE DAT 5 or 5 DAT FIVE

A

FIVE DAT 5

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

What should you do when branching in LMC

A

Put your first instruction on the same line as the line for example POSITIVE LDA X all needs to be on the same line

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

How do you declare a 1d array pseudocode(first way)?

A

array names[3]
names[0] = “Ahmad”
names[1] = “Ben”
names[2] = “Catherine

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

How do you declare a 1d array pseudocode(second way)?

A

array names[3] = [“Ahmad”, “Ben”, “Catherine”]

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

First way to declare 2d array

A

array scores[2][2]
scores[0][0] = 14
scores[0][1] = 80
scores[1][0] = 20
Scores[1][1] = 82

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

Second way to declare 2d array

A

array scores[2][2] = [[14, 80],[20, 82]]

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

How many elements would be in the array chores[3][3]

A

9

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

How to delete whole rows from sql

A

Do not use a where clause so all values will be deleted

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

How to delete specific rows from sql

A

Use where clause to specify conditions that need to be met

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

Can you delete specific columns from sql

A

No

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

What do you need to remember

A

How many bits to use

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

Two’s comp

A

First bit is negative if it is 1

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

Sign and mag

A

First bit just determines wether it is pos or negative

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

Subtracting values tc

A

Convert the right one to other sign

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

Adding negatives values

A

Do it normally

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

When talking about what a queery does, what do you say

A

From “whatever the table is called” and then put what it returns

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

How do you select multiple atributes in SQL

A

Put a comma between them

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

How do you delete a table

A

DROP TABLE Students

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

How do you delete a database

A

DROP DATABASE GuestHouse

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

Can you do OR in SQL

A

Yes

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

Can you do AND in SQL

A

Yes

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

How to do like

A

WHERE City LIKE “Ber%”, this means it stars with Ber, if it was before it would end in Ber and if it was on either side it would contain Ber

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

In the select clause, what do you do when there is two tables

A

Customers.FirstName, Orders.OrderDate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What do you put in the WHERE clause when you are joining tables (inner)
WHERE Customers.CustomerID = Orders.CustomerID
26
How do you do a nested select
27
What is normalisation?
The process of structuring the data in a relational database according to formal rules, in order to avoid problems of data redundancy which leads to inconsistency and inaccuracy.
28
What is the aim of normalisation?
The aim of normalisation is to minimize data redundancy and maximise data integrity
29
What do you do for first normal form?
Each record (row) is unique i.e. it has a primary key Each field (column) has an unique name There are no fields with repeated or similar data e.g. choice1, choice2, choice3... Each field cannot be broken down any further e.g. addresses should be broken up
30
What does first normal form do?
Makes all the data atomic
31
What does atomic mean?
Atomic means each item of data is distinct and you can't separate the data any more or break it up any smaller without losing meaning.
32
What does second normal form do?
Non-key fields must depend on every part of the primary key In other words, if a field that isn't the primary key depends on only one part of the primary key (i.e. a partial key dependency) then it isn't in second normal form.
33
When would you not need to do anything for second normal form?
If you don't have any composite primary keys
34
Passing a parameter by value
A copy of the variable is passed where it is treated as a local variable to project the value being changed
35
Passing a parameter by reference
The reference to the memory location is passed so the value can be changed
36
What can't be passed by reference?
Literal values as there is no reference
37
What will happen if ref or val is not stated
It will be passed by value
38
What is bad about value
It uses additional memory space
39
What is abstraction?
Removing unnecessary details from a problem to focus on the details are are needed which makes the problem easier to solve
40
Example of abstraction
Underground tube maps as they leave out above ground landmarks and roads as that is not relevant to travelling on the tube
41
Why would a man who works in an office use a usb
To transfer data between his home and work computer
42
Man in office Hard drive
Used to store data on work computer as generally companies would use hard drives as they are cheaper especially because multiple devices have to be provided
43
Man in office ssd
For home computer
44
What are two of the gaps you need to fill in the gap fill exercise
13 and position
45
Why does passing something be reference require less storage
Because A copy does not have to be made
46
What is another advantage of passing by value
Value is good as if there is a logical error it wont affect code
47
Why would passing my reference be used here
there wasnt a point where you could accidentally override the player so no need to pass by value to use less storage
48
Another advantage of abstraction
Requires less computing power as details are removed
49
Example 1 of abstraction furniture
Only one room will be customisable at a time so the computer does not have to render the other rooms
50
Example 2 of abstraction furniture
Textures for carpet/floor and cieling dont have to be loaded
51
first two positives of waterfall model
Lots of documentation, does not require a lot of customer involvement
52
Second two positives of waterfall model
Easy to schedule and arrange tasks and judge progress, Simple and easy to understand model
53
First two negatives of waterfall model
Lots of documentation, efficient code is not prioritized
54
Second two negatives of waterfall model?
No new ideas can be included during development, Users not involved until testing
55
When might waterfall model be used?
Straight forward projects where requirements are known and understood at the beginning and do not change, When there is no benefit to the customer of having parts of the system available early and Short projects
56
What is the waterfall model?
A linear, sequence of stages. Each stage is completed before the next stage begins. Good for small, simple projects where requirements are clear and do not change.
57
first normal form
Each row is unique, data is atomic and no fields taht represent a group of data
58
What does it mean if data is atomic
Atomic means each item of data is distinct and you can’t separate the data any more or break it up any smaller without losing meaning.
59
Second normal form?
Data is in first normal form Non-key fields must depend on every part of the primary key (no partial dependencies)
60
Why wasn't it in thirds normal form?
3nf as destination name relies on destination code which isnt the primary key
61
What are the three stages of an LOR?
Knowledge and Understanding, Application, Evaluation