Technical Support Basic
Technical Support Basic
Technical Support Basic
Answers:
Unique Key: A unique key is similar to a primary key in that it ensures all values
in a column are different. However, unlike a primary key, a table can have
multiple unique keys, and they can contain NULL values
Foreign Key: A foreign key is a column or a set of columns in one table that
references the primary key columns of another table. The purpose of the foreign
key is to ensure referential integrity of the data. In other words, only values that
are supposed to appear in the database are permitted
3.
Figure 2 Many2Many
4. Algorithm BubbleSort(A)
n = length(A)
repeat
swapped = false
for i = 1 to n-1 inclusive do
if A[i-1] > A[i] then
swap(A[i-1], A[i])
swapped = true
end if
end for
n = n - 1
until not swapped
end Algorithm
A is the array to be sorted.
n is the number of elements in the array.
The repeat-until loop continues until no swaps are needed, which means the
array is sorted.
The for loop goes through each element of the array, comparing it with the next
element and swapping them if necessary.
5. Code Multiply()
for i := 1 to 100 do
switch (i mod 15)
case 0:
print "AB"
case 3:
print "A"
case 5:
print "B"
end switch
end for
End Code