代做COMP2400/6240 - Relational Databases调试SPSS

COMP2400/6240 - Relational Databases

Due date: 23:59, 11 October, 2022

Instructions:

This assignment must be done individually (no group work) .

•  This assignment will count for 15% of the final grade.  Marks are assigned for the process of finding a solution, not only for the result.  Hence, include all essential ideas and steps that are necessary to derive a solution.

• You must submit a single PDF file named as “u1234567.pdf” (replace u1234567 with your UID). Make sure you only upload a PDF file, not a Word or text file.

• You should try your best to type the solutions. The scanned images of handwritten texts and equations can be unreadable for marking.  As for the EER diagram, you are highly recommended to export a JPEG file from TerraER and include it in the PDF file.

•  Late submission is not granted under any circumstance.  You will be marked on whatever you have submitted at the time of the deadline.  Please take careful note of deadlines and adhere to them.  Of course, if you find yourself in a situation beyond your control that you believe significantly affects an assessment, you should send an Email to Yu Lin  with the title Special Consideration for Assignment 2 (Database Theory)” along with the supporting documents.

•  Plagiarism will attract academic penalties in accordance with the ANU guidelines. A student in this course is expected to be able to explain and defend any submitted assessment item.   The  course convener can conduct or initiate an additional interview about any submitted assessment item for any student.   If there is a significant discrepancy between the two forms of assessment,  it will be automatically treated as a case of suspected academic misconduct.

Question 1 3 Marks

Band-Aid is a booking agency that represents local Canberra bands by booking their shows nationally.  The employees of Band-Aid are classified into two non-overlapping categories, agents and administrators.  An agent represents one or more bands and can be contacted via their personal office phone or work email. Each administrator belongs to a department which offers administrative support to all agents of the agency. Note that the internal relationship between agents and administrators isn’t something Band-Aid cares to track. Administrative departments include accounts, contracts, and promotions. Each Band-Aid employee can be uniquely identified by their employee number.

Each band has a name, can be uniquely identified by their Australian Business Number (ABN), and may have a number of band members.  Band-Aid also stores the name, phone, and email of the best point of contact for the band. Each band is represented by a particular agent and Band-Aid likes to record the date that representation began.  If a band has just joined the agency (or they aren’t very popular!)  then the agency may never have booked a show for the band.

Band-Aid maintains a list of venues.   Each record includes the venue’s name, a distinct address, phone number, and the venue capacity.   Band-Aid likes to keep a comprehensive list of venues, including new venues or venues where they’re yet to book a show.

The primary purpose of Band-Aid is to book shows.  Each show is hosted by a particular venue.  One or more of the bands Band-Aid represents would perform at the show.  When Band-Aid books a show, they record the date and ticket price, and once the show is finalised, the number of tickets sold.  Each show is assigned a unique show ID.

Your task is to design an Enhanced Entity Relationship (EER) diagram that captures the above require- ments.  It should include entities, relationships, attributes, and constraints where appropriate.  You may make more assumptions, if necessary, but any assumptions should be noted.  If there are any requirements that cannot be captured in an EER-diagram, then they should also be identified.

Question 2 5 Marks

Consider the relation schema R = {A, B, C, D, E, F, G} and the following set Σ of FDs:

•  C → BG

•  AE → F

•  CF → EA

A DF

2.1 What are the candidate keys of R? Justify your answer (i.e., include the main steps used for finding the candidate keys).           (1 Mark)

2.2  Find a minimal cover of Σ and include the main steps used for finding a minimal cover.     (2 Marks)

2.3  Demonstrate why R, given Σ, does not satisfy 3NF, and then identify a 3NF decomposition for R. You need to include the main steps used for identifying the 3NF decomposition.                  (2 Marks)

Question 3 3 Marks

Consider the relation schema Booking={Airline, Date, Destination, FlightNo, PassengerName,  Origin, PassportNo, Seat, Terminal} and the following set Σ of FDs:

•  Airline → Terminal

•  FlightNo → Airline, Origin, Destination

•  PassportNo → PassengerName

•  FlightNo, PassportNo, Date → Seat

•  FlightNo, Date, Seat → PassportNo

Which, for brevity, we can alias the attributes and restate as Booking={A, D, E, F, N, O, P, S, T} and Σ:

•  A → T

•  F → AOE

•  P → N

•  FPD → S

FDS P

3.1 Is the above relation schema Booking in BCNF? If not, identify a BCNF decomposition for Booking and check if your BCNF decomposition is dependency-preserving. You need to include the main steps used for identifying the BCNF decomposition.                                                                        (2 Marks)

3.2  Consider another set Σ 1  of FDs on Bookings:

•  Airline → Terminal

•  FlightNo → Airline, Origin, Destination

•  PassportNo → PassengerName

•  FlightNo, PassportNo, Date → Terminal, Seat

•  FlightNo, Date, Seat → PassportNo, PassengerName

Which can be similarly aliased as:

•  A → T

•  F → AOE

P N

FPD TS

FDS PN

Are Σ and Σ 1  equivalent? Justify your answer.                                                                         (1 Mark)

Question 4 4 Marks

The following table contains the relational algebra operators covered in our course.  You should only use these operators to answer the following questions.

σφ R

πA1,...,An R

ρR(A1,...,An ) R

ρR R

ρ (A1,...,An ) R

R1 R2

R1 R2

R1 R2

R1 × R2

R1 ▷◁φ R2

R1 ▷◁ R2

φ 1 ^ φ2

φ 1 v φ2

Selection by condition φ

Projection onto the set of attributes {A1..., An }

Renaming the relation name to R and attribute names to A1,..., An

Renaming the relation name to R

Renaming the attribute names to A1,..., An

Union of two relations R1 and R2

Intersection of two relations R1 and R2

Difference of two relations R1 and R2

Cartesian product of two relations R1 and R2

Join of two relations R1 and R2 with the join condition φ

Natural join of two relations R1 and R2

condition φ 1 AND condition φ2

condition φ 1 OR condition φ2

Consider a relational database schema S with the following relation schemas:

•  Movie(title, production year, genre) with the primary key {title, production year}

•  Person(id, first name, last name, year born) with the primary key {id}

•  Director(id,  title,  production year) with the primary key  {title,  production year} and with the foreign keys [title, production year] ⊆ Movie[title, production year] and [id] ⊆ Person[id]

•  Writer(id, title, production year, credits) with primary key {id, title, production year} and with the foreign keys [title, production year] ⊆ Movie[title, production year] and [id] ⊆ Person[id]

4.1  Answer the following questions using relational algebra queries only using the operators in the above table.                                                                                                                                             (2 Marks)

[a] List the ids, first and last names of directors who have never written any movie(s).          (1 Mark)

[b] A person has worked on a movie if this person is a director, a writer, or both a director and writer, of this movie. List the ids of persons who have worked on at least two distinct movies.  (1 Mark)

4.2  Optimise the following relational algebra query.  Your marks will depend on how well you optimise the query in your solution.  Additionally, draw the query trees of the query before and after your optimisation.                                      (2 Marks)




热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图