EXAM Flashcards

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
Q

What do you put in the WHERE clause when you are joining tables (inner)

A

WHERE Customers.CustomerID = Orders.CustomerID

26
Q

How do you do a nested select

A
27
Q

What is normalisation?

A

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
Q

What is the aim of normalisation?

A

The aim of normalisation is to minimize data redundancy and maximise data integrity

29
Q

What do you do for first normal form?

A

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
Q

What does first normal form do?

A

Makes all the data atomic

31
Q

What does atomic mean?

A

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
Q

What does second normal form do?

A

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
Q

When would you not need to do anything for second normal form?

A

If you don’t have any composite primary keys

34
Q

Passing a parameter by value

A

A copy of the variable is passed where it is treated as a local variable to project the value being changed

35
Q

Passing a parameter by reference

A

The reference to the memory location is passed so the value can be changed

36
Q

What can’t be passed by reference?

A

Literal values as there is no reference

37
Q

What will happen if ref or val is not stated

A

It will be passed by value

38
Q

What is bad about value

A

It uses additional memory space

39
Q

What is abstraction?

A

Removing unnecessary details from a problem to focus on the details are are needed which makes the problem easier to solve

40
Q

Example of abstraction

A

Underground tube maps as they leave out above ground landmarks and roads as that is not relevant to travelling on the tube

41
Q

Why would a man who works in an office use a usb

A

To transfer data between his home and work computer

42
Q

Man in office Hard drive

A

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
Q

Man in office ssd

A

For home computer

44
Q

What are two of the gaps you need to fill in the gap fill exercise

A

13 and position

45
Q

Why does passing something be reference require less storage

A

Because A copy does not have to be made

46
Q

What is another advantage of passing by value

A

Value is good as if there is a logical error it wont affect code

47
Q

Why would passing my reference be used here

A

there wasnt a point where you could accidentally override the player so no need to pass by value to use less storage

48
Q

Another advantage of abstraction

A

Requires less computing power as details are removed

49
Q

Example 1 of abstraction furniture

A

Only one room will be customisable at a time so the computer does not have to render the other rooms

50
Q

Example 2 of abstraction furniture

A

Textures for carpet/floor and cieling dont have to be loaded

51
Q

first two positives of waterfall model

A

Lots of documentation, does not require a lot of customer involvement

52
Q

Second two positives of waterfall model

A

Easy to schedule and arrange tasks and judge progress, Simple and easy to understand model

53
Q

First two negatives of waterfall model

A

Lots of documentation, efficient code is not prioritized

54
Q

Second two negatives of waterfall model?

A

No new ideas can be included during development, Users not involved until testing

55
Q

When might waterfall model be used?

A

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
Q

What is the waterfall model?

A

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
Q

first normal form

A

Each row is unique, data is atomic and no fields taht represent a group of data

58
Q

What does it mean if data is atomic

A

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
Q

Second normal form?

A

Data is in first normal form
Non-key fields must depend on every part of the primary key (no partial dependencies)

60
Q

Why wasn’t it in thirds normal form?

A

3nf as destination name relies on destination code which isnt the primary key

61
Q

What are the three stages of an LOR?

A

Knowledge and Understanding, Application, Evaluation