Chapter 8 (Advanced File Handling Techniques) Flashcards

1
Q

When sorting data in ascending order, you arrange records from ________ to _______ based on the value in a specific field.

A

lowest to highest

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

Normal alphabetic order is in _________ order.

A

ascending

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

When computers sort string data, _______ values are used to make comparisons.

A

numeric

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

When records are arranged one after another on the basis of the value in a particular field, this is sorting in _________ _____.

A

sequential order

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

the value of the middle item when the values are listed in order

A

median value

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

arithmetic average is called the….

A

mean

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

This is often used in statistics because it represents a more typical case where half the values are below it and half are above it.

A

median

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

A list of instructions that accomplish a task.

A

algorithm

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

In this method, after each adjacent pair of items in a list has been compared once, the largest item in the list will have “sunk” to the bottom.

A

ascending bubble sort

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

What is another phrase for a “bubble sort”?

A

a “sinking sort”

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

exchanging the values of two items is called.

A

swap values

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

Ducks in a row, New York office windows in a…

A

column

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

You access a two-dimensional array value using 2 subscripts, in which the first subscript represents the _____ and the second subscript represents the _____.

A

row, column

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

True or False: The legal values for a subscript (size - 1) is the same for both single-dimensional arrays and multi-dimensional arrays.

A

True

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

What are others words for a two-dimensional arrays?

A

matrix, table

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

A “real” order for storage

A

physical order

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

The field of a record; its contents make the record unique among all records in a file.

A

key field

18
Q

storage locations in computer memory

A

addresses

19
Q

storing a list of key fields paired with the storage address for the corresponding data record.

A

to “index” records

20
Q

A computer’s ________ ______ takes care of locating available storage for records’ address

A

operating system

21
Q

The index is stored on a ______ or the disk.

A

portion

22
Q

When a record is removed from an indexed file, it does not have to be…

A

physically removed.

23
Q

Creating one extra field, which holds the physical address of the next logical record, in every record of stored data.

A

linked list

24
Q

It is more efficient to store and access records based on their _______ order than than their ________ order.

A

logical, physical

25
Q

When computers sort data, they always use ________ values when making comparisons.

A

numeric

26
Q

tempname = x
x=y
y = tempname

(pg 341)

A

This is a proper swap value formula

27
Q

a sorting algorithm in which a list of elements is arranged by comparing iterms in pairs; when an item is out of order, it is swapped with the item below/next to it

A

bubble sort

28
Q

a sorting algorithm in which list elements are examined and if an element is out of order relative to any of the items earlier in the list, each earlier item is moved down one position and then the tested element is placed in the “empty” spot.

A

insertion sort

29
Q

a sorting algorithm in which list values are divided into sorted and unsorted sublists; then, the unsorted sublist is repeatedly examined for its smallest value which is then moved to the end of the sorted sublist.

A

selection sort

30
Q

which sort is the one that uses sublists?

A

selection sort

31
Q

The greatest number of comparisons needed during each loop of a bubble sort is…

A

one less than the number of elements in the array

32
Q

True or False: For each element in a two-dimensional array, the first subscript represents the row number and the second one represents the column.

A

True

33
Q

a two-dimensional array is a type of…

A

multidimensional array

34
Q

You can store records in any physical order on the disk, but when you _____ records, you store a list of key fields paired with the _______ ________ for the corresponding data record.

A

index, storage address

35
Q

A disk is an example of a ______-______ storage device

A

random-access

36
Q

Creating a ______ ___ involves creating one extra field in every record of stored data. This field holds the PHYSICAL address of the next LOGICAL record.

A

linked list

37
Q

This type of sort compares list items in pairs, swapping any two adjacent values that are out of order.

A

bubble sort

38
Q

True or False: The bubble sort is the most efficient compared to others.

A

False, it is simply considered more easy to understand

39
Q

A two-dimensional array declared as num myArray[4][10], has how many columns?

A

Ten

40
Q

In a two-dimensional array declared as num myArray[12][17], the highest row number is….

A

Eleven / 11

41
Q

True or False: When you store a list of key fields paired with the storage address for the corresponding data record, you are creating a linked list.

A

False, you are creating an index.

42
Q

In terms of an index, every record contains a field that holds the address of another record in a….

A

linked list