编程代考 INFO20003 Database Systems

INFO20003 Database Systems
Dr Farhana Q&A
INFO20003 Database Systems

Copyright By PowCoder代写 加微信 powcoder

Personal advice
• A note on quizzes –Distils the common mistakes
–OK if you make a mistake now, but learn from it
–Don’t despair if you make mistakes now (this is the best time – low
–You can even get 0 in all quizzes and H1 in the end if this helps you improve your understanding
–Leads to deep learning (very quick refresh prior to the exam) • A note on tutorials
–You will gain more if you read the tutorial material prior to attending the tutorial
–Even a super rough sketch can help you a lot and drive the discussion to interesting questions
–If you do that, tutors can actually help you much more and you will gain much more
INFO20003 Database Systems

Assignment 1: Examples for marks deduction
Examples for marks deduction:
• Entity / Attribute incorrect or missing
• Relationship cardinality incorrect (e.g., one – many)
• Poor naming of object (e.g., T1, T2)
• Wrong data type (e.g., varchar for placing ‘age’)
• Incorrect primary or foreign key
• Not Null is wrong
• Relationship labels missing
• Unresolved M-M exists, or associative entity is incorrect
• Business rules can’t be supported (e.g., how long was a member of the RS?)
NOTE: These are EXAMPLES, not a contract set in stone
INFO20003 Database Systems

Quiz 2 review
INFO20003 Database Systems

Quiz 2 pg 2/4
INFO20003 Database Systems

Quiz 2 pg 3/4
INFO20003 Database Systems

Quiz 2 pg 4/4
INFO20003 Database Systems

Relational algebra solution
• Find all pairs of sailors in which the older sailor has a lower rating
INFO20003 Database Systems

Relational algebra solution
• Find all pairs of sailors in which the older sailor has a lower rating
𝜌(𝑆1 1 → 𝑠𝑖𝑑1, 2 → 𝑠𝑛𝑎𝑚𝑒1, 3 → 𝑟𝑎𝑡𝑖𝑛𝑔1,4 → 𝑎𝑔𝑒1 , 𝑆𝑎𝑖𝑙𝑜𝑟𝑠) 𝜌(𝑆2 1 → 𝑠𝑖𝑑2, 2 → 𝑠𝑛𝑎𝑚𝑒2, 3 → 𝑟𝑎𝑡𝑖𝑛𝑔2,4 → 𝑎𝑔𝑒2 , 𝑆𝑎𝑖𝑙𝑜𝑟𝑠)
INFO20003 Database Systems

Relational algebra solution
• Find all pairs of sailors in which the older sailor has a lower rating 𝜌(𝑆1 1 → 𝑠𝑖𝑑1, 2 → 𝑠𝑛𝑎𝑚𝑒1, 3 → 𝑟𝑎𝑡𝑖𝑛𝑔1,4 → 𝑎𝑔𝑒1 , 𝑆𝑎𝑖𝑙𝑜𝑟𝑠)
𝜌(𝑆2 1 → 𝑠𝑖𝑑2, 2 → 𝑠𝑛𝑎𝑚𝑒2, 3 → 𝑟𝑎𝑡𝑖𝑛𝑔2,4 → 𝑎𝑔𝑒2 , 𝑆𝑎𝑖𝑙𝑜𝑟𝑠)
𝜋!”#$%&,!”#$%( 𝑆1 #)%&*#)%( +#,-“)&.+#,-“)( 𝑆2
INFO20003 Database Systems

Relational algebra: Practice
1. Find(thenameof)allsailorswhoseratingisabove9
2. Findallsailorswhoreservedaboatpriorto November 1, 1996
3. Find(thenamesof)allboatsthathavebeenreserved at least once
4. Findallpairsofsailorswiththesamerating
INFO20003 Database Systems

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com