Tutor profile: Sofia J.
Questions
Subject: SQL Programming
What is an inner join in SQL
Inner join will join two tables and result in the intersection of two tables. Inner joins are used as the default join and are very useful as they don't result in null values. Outer joins must be explicitly specified as most often when combing tables, we are only interested in overlapping data.
Subject: Python Programming
What is the difference between arrays and lists in Python?
Lists can contain multiple data types while arrays can only contain a single data type. Python does not require type declaration and unless explicitly imported, Python will use lists instead of arrays. import array as arr my_list = ['hello', 5, 12] #seldom used, index is i my_array = arr.array( 'i', [5, 6, 33])
Subject: Databases
Why are databases used instead of a collection of files?
Using only files can result in data redundancy, requiring additional storage as well as multiple versions of the truth. For example, a customer may not update their address and this address could be updated on one file but missed on another file. Another issue is it is quite difficult to combine separate files. Files may have different attributes for similar data, when combining this can lead to many null values or loss of data. It is also an issue when data is being accessed concurrently, two people may attempt to update a bank balance but if they are doing this on separate files the bank balance will show two different values. Using a database allows for atomic, all or nothing, transactions that ensure data reliability. All data is stored in an organized way, where duplicate data is much easier to spot. In a relational database, all data is related and the relationship of data must be thought of before entering data.
Contact tutor
needs and Sofia will reply soon.