SQL AND DATA STRUCTURES Flashcards
what are data structures
organised collections of items
what is an array
contains items of the same data type and is of fixed length
array scores[5]
array scores = [3,53,92,40,13]
print(scores[2])
scores[4]=5
what loop should you use to check an array
FOR loop
What is a sql
structures query language
what is sql select
used to search and retrieve data
how do you index with two numbers in a 2d array
print(Exams[1,2])
what do you write when doing sql
SELECT
FROM WHERE
what do you have to do to a file before doing anything to it
Open it
textfile = open(“client_data.txt”)
what do you need to do when youre done with a file
textFile.close()
what do you do when youre writing to a file
textFile.writeLine (“AJ,24,London”)
what do you do when trying to read a file
while not textFile.endOfFile()
print(MyFile.readLine())