Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Databases and Ethical Data

COMP SCI 2208

Question 1  Probability and Entropy

 

Equation for Entropy given in the course, you may assume b is 2 .

(a)   A fixed” 4-sided dice also have a 25% chance of showing each face, but the faces are

labelled 1, 1, 3, and 5 . What is the probability of showing a 1? [1 mark]

(b)   Use the entropy equation to provide the entropy of a fair dice that has an equal chance of

showing each face . You must show your working . [3 marks]

(c)   The DNA of living things is made up of nucleotides . Each sugar in a nucleotide has a nitrogen base attached to it . There are four different types of nitrogen bases found in DNA . They include adenine (A), cytosine (C), guanine (G), and thymine (T) . In standard humans, these occur roughly equally . You tinker a little and produce a human which has A:C:G:T in ratios 1:6:3:5 . What is the entropy of a random variable that models this? Show your working . [4 marks]

(d)   You have 3 green balls and 4 red balls in a jar. You pick two balls from the jar without looking. What is the probability that you picked a red ball first, then a green ball? [4 marks] [Total marks for Question 1: 12 marks]

Question 2  SQL and Normalisation

STUDENT

(a)   What will be displayed if we entered the SQL command SELECT * FROM FEE;” . [2 marks]

(b)    What is the full outer join of these relations? [4 marks]

(c)   What is the result of an INNER JOIN on the ID attribute between the tables shown above? [4 marks]

(d)   Why  have  the  fees  been  separated  from  the  student  data?  Explain  in  terms  of normalisation . [4 marks]

[Total marks for Question 2: 12 marks]

Question 3  Indexing and Storage

(a)   What is the possible advantage if an individual database record can fit within one page? [2 marks]

(b)   You have an unsorted file storage for 100 records . If it takes 1 second to examine each

record, how long, on average, will it take to find a record that is there? [2 marks]

(c)   Give examples of three different forms of index and describe them? [2 marks]

(d)   You are writing an index for a cookbook and want to write a program that will make it easy find all of the recipes that use avocadoes . What sort of index do you think you would use to do it efficiently? Explain your answer . [2 marks]

(e)   You have 40,000 distinct words to index and your blocking factor is 50 index entries per

block, which is also your fan-out . How many levels will your multilevel index have and which level is the top? [4 marks]

[Total marks for Question 3: 12 marks]

Question 4  Trees and Entity-Relationship Diagrams


 

(a)   What string is produced if you traverse the tree above in pre-order traversal? [2 marks]

(b)   Is the tree shown above a balanced tree? Explain your answer . [2 marks]

(c)   Draw the entity-relationship (ER) diagram for a model that has entities ANIMAL and FOOD and a relationship linking them called CAN_EAT . ANIMAL has the attribute SPECIES and FOOD has the attribute NAME . [5 marks]

(d)   Explain what total participation” means in a relationship mean for an entity . [3 marks]

[Total marks for Question 4: 12 marks]


Question 5  Ethics, Knowledge and Security

(a)   Your web-based business is located in America, but you do extensive business with firms

in London . Are you liable to the provisions of the GDPR? [2 marks]

(b)   A well-known study of Parole Board judges found that judges were less likely to grant

parole when they were tired or hungry . What is this an example of? How could you ensure that this issue did not unfairly affect one group of people disproportionately? [2 marks]

(c)   Your postcode storage system has a configuration error and accidentally leaks the third digit of the stored postcode, along with the initials of the people who your system has associated with that postcode . How would you determine the significance of this leakage? [4 marks]

(d)   What is  a Zero-Knowledge Proof? Explain why the Magic Cave’s zero-knowledge properties could be affected by two factors: firstly, that the verifier stands at the junction and observes which tunnel the prover takes and, secondly, that the verifier flips a coin to choose which tunnel the prover is to emerge from . Hint: remember the three conditions for a Zero-Knowledge Proof. [4 marks]

[Total marks for Question 5: 12 marks]