Free Essay

Book

In: Other Topics

Submitted By qiong
Words 1236
Pages 5
Database Tutorial Question
The following relational database table is an extract of part of an “unnormalised” Student table: StudNum | StudName | StudAddr | PhNum | CourseCode | CourseName | UnitID | UnitName | StaffID | StaffName | StaffOffice | Grade | 101 | Jenny Teo | 123a Norwich Hse | 9911345 | 20241 | BBus(Acc) | Acc24 | Finance 2a | S045 | Paul Smith | D401 | D | 101 | Jenny Teo | 123a Norwich Hse | 9911345 | 20241 | BBus(Acc) | Law01 | Intro. Law | S022 | Elaine Ng | F213 | C | 101 | Jenny Teo | 123a Norwich Hse | 9911345 | 20241 | BBus(Acc) | Mgt21 | Org. Behaviour | S099 | Ann McCall | D211 | P | 112 | Warren Wills | 64 South St. Clayton | 9894387 | 30001 | BCom | Ais20 | Acc Info Systems | S120 | Peter Duffy | D411 | HD | 121 | Neil Smith | 123a Norwich Hse | 9911345 | 30001 | BCom | Acc24 | Finance 2 | S045 | Paul Smith | D401 | D | 121 | Neil Smith | 123a Norwich Hse | 9911345 | 30001 | BCom | Mkt10 | Intro Marketing | S111 | Dan Coleman | F210 | P | 130 | Joe Chan | 10 Wells St Frankston | 9901238 | 20242 | BBus(Acc) | Acc11 | Intro Accounting | S030 | Elli Blake | F109 | P | 130 | Joe Chan | 10 Wells St Frankston | 9901238 | 20242 | BBus(Acc) | Acc24 | Finance 2a | S046 | Paul Smith | D401 | D | 130 | Joe Chan | 10 Wells St Frankston | 9901239 | 20242 | BCom(Acc) | Law01 | Intro. Law | S022 | Elaine Ng | F213 | C | 130 | Joe Chan | 10 Wells St Frankston | 9901238 | 20242 | BBus(Acc) | Mkt10 | Marketing A | S111 | Dan Coleman | F210 | P |
The following abbreviations have been used in this table:
StudNum – Student identification number StudName – Student name
StudAddr – Student address PhNum – Student contact telephone number
CourseCode – Course code of the degree CourseName – Name of the degree
UnitID – Identification code for the unit/subject UnitName – Unit/subject name
StaffID – Staff identification number of the staff member teaching the unit StaffName – Name of the staff teaching the unit
StaffOffice – Office (room) location for the teacher of the unit Grade – Final result the student received in the unit
You can assume that: a student is enrolled in a single course; that a student does not repeat a unit; a unit is taught by a single staff member (who is the chief examiner of the unit); a staff member may teach several units, and that a staff member occupies one office (room) only.
The data structure of this table can also be represented as:
STUDENT(StudNum,StudName,StudAddr,PhNum,CourseCode,CourseName,UnitID,UnitName,StaffID,StaffName,StaffOffice,Grade)

Questions: (a) Using an example taken from the Student table, briefly explain the concept of “functional dependence”. (Note: Ensure that your answer clearly indicates the “direction” of the functional dependence.)

(b) What is a primary key? Given the current structure of the Student table (shown on the previous page), why would the “StudNum” attribute not be a good primary key for this table?

(c) John Wilkes joins the faculty as a new staff member teaching a new unit called Marketing B (UnitID Mkt20). Detail any problems you might have adding John Wilkes to the table

(d) Assume that we have now partly completed a normalisation process and the data structure for the student database is now:
STUDENT-UNIT-ATTEMPT (StudNum, UnitID, Grade)
STUDENT(StudNum, StudName, StudAddr, PhNum, CourseCode, CourseName)
UNIT(UnitID, UnitName, StaffID, StaffName, StaffOffice) (Note: The underline indicates attributes that form the primary key) Why does the STUDENT-UNIT-ATTEMPT table have two attributes underlined as the primary key? What name do we give this type of primary key?

(e) Assuming the data structure shown in part (d), this data structure shows example/s of a type of “undesirable” functional dependence that could cause anomalies with respect to insertion, deletion and modification of the data in the database. What is the formal name given to this type of “undesirable” functional dependence? Using an example from this current data structure, explain this type of “undesirable” functional dependence.

(f) Assuming the data structure shown in part (d), what two (2) additional tables would you need to create in order to ensure that the database was free from anomalies with respect to insertion, deletion and modification? Use the short hand form [as shown in the question for part (d)] to list the attributes in each additional table and underline the primary key of each table. What changes would you also make to any of the three existing tables shown in part (d)? List these changed tables in short hand form.

(g) Assume students are now permitted to repeat a unit they have previously failed. What design change could you make to the database structure to enable this policy change?

(h) Discuss three potential advantages of the database approach to business event processing compared to the file/application approach.

Solutions

(a) An attribute is functionally dependent on another if that other attribute determines a single value of the first attribute

For example, in the table ‘Student’: StudNum determines StudName, therefore StudName is functionally dependent on StudNum. That is, the student number determines what the student name is for each record in the table.

(b) A primary key is a data field or attribute that should uniquely identify each record in a table. The attribute StudNum cannot be the primary key for the table as it stands now, as it does not uniquely identify each record. There are multiple records with the same StudNum value.

(c) Adding a new member of staff to the table in its present form is problematic as the record structure of the table contain attributes relating to students and grades that are not known. This requires us to leave nulls in the table when adding the staff member.

(d) The table STUDENT-UNIT-ATTEMPT uses two attributes at the primary key. This is called a composite primary key. It is necessary to combine both of these attributes as the primary key to enable each record in the table to be uniquely identified. StudNum cannot uniquely identify each record as a single student will undertake many units.

(e) The STUDENT and UNIT tables both exhibit a design problem called transitive dependence.

In the STUDENT table, the attribute CourseName is functionally dependent on the non-key attribute CourseCode, and not the primary key attribute StudNum

In the UNIT table, the attributes StaffName and StaffOffice are functionally dependent on the non-key attribute StaffID, and not the primary key attribute UnitID.

(f) The STUDENT and UNIT tables should be split to remove the transitive decencies. Two new tables should be created:

COURSE(CourseCode, CourseName)
STAFF(StaffID, StaffName, StaffOffice)

In total there are now five tables:

STUDENT-UNIT-RESULT(StudNum, UnitID, Grade)
STUDENT(StudNum, Studname, StudAddr, PhNum, CourseCode)
COURSE(CourseCode, CourseName)
UNIT(UnitID, UnitName, StaffID)
STAFF(StaffID, StaffName, StaffOffice)

(g) To enable repeat attempts, one solution could be to add Semester and Year attributes to the STUDENT-UNIT-ATTEMPT table. The primary key should be composite of StudNum, UnitID, Sem, Year. This extended composite PK will uniquely identify multiple attempts of the same unit by a student that occur in different teaching periods

(h) Student answers should identify and explain any three of the following. Any other reasonable advantage should be accepted. * Redundancy can be reduced * Inconsistency can be avoided * Data can be shared * Data independence (from programs) * Standards can be enforced by the DBA (database administrator) due to the central control of the database * Security restrictions can be applied as data is centrally controlled by the DBA * Data Integrity can be maintained - the accuracy of the data can be maintained by having the database developers define integrity checks that will enforce the integrity of the data whenever any update operation is attempted.

Similar Documents

Premium Essay

Books

...A Great Story I read the books A Child Called It, The Lost Boy, and A Man Named Dave. The reason I choose these books is because they are true stories which keeps me interested. From the beginning it had me hooked. I had to keep reading because I wanted to know what was going to happen next. I learned some things about these books but one thing stood out to me the most and that is how the legal system was very different back then than it is now. I believe Dave Pelzer is a very strong individual to be able to survive what he went through and I think it is great that he has become the person he is today. David James (Dave) Pelzer was born December 29th 1960 in San Francisco California. He is an American Author, best known for his 1995 memoir of childhood abuse, “A Child Called It”. Dave is born 3rd out of 5 boys. Dave wrote in his book that as a child, he was continually abused, mistreated, and beaten by his mother, who thought of it as a game. His teachers stepped in and on March 1973 Dave Pelzer was placed in foster care. He joined the Air Force in 1979 and later became an author. The book “A child called it” caused a dispute in his family, one of his brothers said it was not true, however his other brother who is an author wrote a book “A Brother’s Journey” which confirms Dave’s story. Dave has written two books, “A Child called it” and “The Lost Boy”, which is about his life after he was placed in foster care....

Words: 949 - Pages: 4

Free Essay

Books

...A person who reads has had a chance to do each of them, and lots more, because when you read a book, you don’t just read it, you live it, you imagine yourself as the character of the book, you see yourself dealing with every situation that the character deals with and THAT EXACTLY is the magic of reading. Kristin Martz once said, “We lose ourselves in books. We find ourselves there too.” Now, the first question that might pop into your head is, “Why should I lose myself in a book when I can easily lose myself in my phone or computer?” The answer is that you might be able to lose yourself in your gadget but you won’t find yourself there. Books can make you imagine so much more, they can enhance your vocabulary, develop your personality and most important they can make you gizmos. Books think out of the little box which you are confined to because of your gadgets and will not only help you with your linguistic abilities but also with your communication skills. Conversations will always be interesting if you can talk well and that can only happen if you are well read. Books have a way to speak to you, in ways no one and nothing else can. They are the best remedy to boredom, to escape reality, to live a life which will be way more than interesting than your own. So, today, on the occasion of the world book day, I want to take the opportunity to urge all of you to just simply read. Go grab a book and lose...

Words: 435 - Pages: 2

Free Essay

Book

...I’m not really sure how I felt about the book, it was interesting at points but I mainly read it because a friend told me I should and loaned me the book to read. There wasn’t just one part that hooked me to the book, the book was a roller coaster of event that he went there and had to deal with which made it interesting to...

Words: 306 - Pages: 2

Free Essay

Book

...After reading a couple chapters of this book I have came to the conclusion that it shows you a lot of strong points on how Thomas L Friedman thinks about the world. He explains why it all is happening and how the international system is transforming the world affairs. It also shows you all the things that he said in his book that they would come true and some of those things actually did come true. This books helps you understand about how globalization is working and why it is happening. It also shows and tells you how the world reacts to it and what the bad and good thing about globalization. In the first part of the book of the books it explains what the title ‘Lexus’ and ‘’olive tree’’ means. The Lexus stands for half the world emerging from the Cold War and people intent on building a better Lexus, modernizing economies in order to thrive globalization. The olive tree stands for the other half who are still caught up in the fight over who owns which "olive tree." The Lexus stands for the emerging of new things like 300 new Lexus being built everyday and people are moving on from the Cold War. The Olive tree represents our roots, anchors us, and identifies us. The Olive Tree also represents people fighting over who own what. That was the main thing in the beginning because it tells you what the title is all about. After that it goes into more detail about other things about globalization....

Words: 820 - Pages: 4

Premium Essay

Books

...Some may argue that modern day innovations such as e-books serve the same function as well, however one must not forget that accessibility to e-books is much lesser than accessibility to books Therefore, the book has a place in modern society. The book still has a place in modern society simply because it is more practical and convenient to access in its physical form for the masses. It does not require extra tools such as an e-book reader or a computer to for one to access its contents, thus...

Words: 1001 - Pages: 5

Free Essay

Of Books

...The contrary to the book that affirms one’s emotions and ideas is the book that challenges one’s conception of reality. A book such as Bram Stoker’s Dracula has the unique ability to really push the envelope on one’s conception of reality. Stoker undergoes writing a novel, which completely strays from what was believed to be the reality of that time. Late Victorian England was dominated by the belief that logic...

Words: 1553 - Pages: 7

Premium Essay

Books

...FAHRENHEIT 451: The temperature at which book-paper catches fire and burns PART I IT WAS A PLEASURE TO BURN IT was a special pleasure to see things eaten, to see things blackened and changed. With the brass nozzle in his fists, with this great python spitting its venomous kerosene upon the world, the blood pounded in his head, and his hands were the hands of some amazing conductor playing all the symphonies of blazing and burning to bring down the tatters and charcoal ruins of history. With his symbolic helmet numbered 451 on his stolid head, and his eyes all orange flame with the thought of what came next, he flicked the igniter and the house jumped up in a gorging fire that burned the evening sky red and yellow and black. He strode in a swarm of fireflies. He wanted above all, like the old joke, to shove a marshmallow on a stick in the furnace, while the flapping pigeon-winged books died on the porch and lawn of the house. While the books went up in sparkling whirls and blew away on a wind turned dark with burning. Montag grinned the fierce grin of all men singed and driven back by flame. He knew that when he returned to the firehouse, he might wink at himself, a minstrel man, burntcorked, in the mirror. Later, going to sleep, he would feel the fiery smile still gripped by his face muscles, in the dark. It never went away, that. smile, it never ever went away, as long as he remembered....

Words: 46160 - Pages: 185

Premium Essay

Books

..."Diary of a Wimpy Kid, Book 1" by Jeff Kinney 22. "Dune" by Frank Herbert 23. "Fahrenheit 451" by Ray Bradbury 24. "Fear and Loathing in Las Vegas: A Savage Journey to the Heart of the American Dream" by Hunter S. Thompson 25. "Gone Girl" by Gillian Flynn 26. "Goodnight Moon" by Margaret Wise Brown 27. "Great Expectations" by Charles Dickens 28. "Guns, Germs, and Steel: The Fates of Human Societies" by Jared M. Diamond 29. "Harry Potter and the Sorcerer's Stone" by J.K. Rowling 30. "In Cold Blood" by Truman Capote 31. "Interpreter of Maladies" by Jhumpa Lahiri 32. "Invisible Man" by Ralph Ellison 33. "Jimmy Corrigan: Smartest...

Words: 890 - Pages: 4

Premium Essay

Books

...The structure of the book is designed so the reader can either build knowledge cumulatively for an in-depth knowledge of managerial practices and procedures onboard a cruise ship, or they can ‘dip in' and make use of specific material and case studies for use within a more generic hospitality or tourism learning context. * Comprehensive overview of hospitality services and operations written specifically for the cruise industry* Uses contemporary examples to...

Words: 4650 - Pages: 19

Premium Essay

Books or E- Books ?

...There is no doubt that E-book reading devices are certainly more expensive compared to normal books and not all people could afford one. On the other hand, most normal books are not expensive, cheap and affordable depending on their size and contents. My point of view is that E-books are better than normal books because E-books are portable and easy to carry around, we can read it easily at night before...

Words: 339 - Pages: 2

Premium Essay

Book

...Educational Psychology: Developing Learners This is a protected document. Please enter your ANGEL username and password. Username: Password: Login Need assistance logging in? Click here! If you experience any technical difficulty or have any technical questions, please contact technical support during the following hours: M-F, 6am-12am MST or Sat-Sun, 7am-12am MST by phone at (800) 800-9776 ext. 7200 or submit a ticket online by visiting http://help.gcu.edu. Doc ID: 1009-0001-158C-0000158D Jeanne Ellis Ormrod Professor Emerita, University of Northern Colorado University of New Hampshire ISBN 0-558-65860-1 Boston ● Columbus ● Indianapolis ● New York ● San Francisco ● Upper Saddle River Amsterdam ● Cape Town ● Dubai ● London ● Madrid ● Milan ● Munich ● Paris ● Montreal ● Toronto Delhi ● Mexico City ● Sao Paula ● Sydney ● Hong Kong ● Seoul ● Singapore ● Taipei ● Tokyo Educational Psychology: Developing Learners, Seventh Edition, by Jeanne Ellis Ormrod. Published by Allyn & Bacon. Copyright © 2011 by Pearson Education, Inc. Editor-in-Chief: Paul A. Smith Development Editor: Christina Robb Editorial Assistant: Matthew Buchholz Vice President, Director of Marketing: Quinn Perkson Marketing Manager: Jared Brueckner Production Editor: Annette Joseph Editorial Production Service: Marty Tenney, Modern Graphics, Inc. Manufacturing Buyer: Megan Cochran Electronic Composition: Modern Graphics, Inc. Interior Design: Denise Hoffman, Glenview Studios......

Words: 101358 - Pages: 406

Free Essay

Book

...THE PLAYER Good game design is player-centric. That means that above all else, the player and her desires are truly considered. Rather than demanding that she do something via the rules, the gameplay itself should inherently motivate the player in the direction the designer wants her to go. Telling players they must travel around the board or advance to the next level is one thing. If they don’t have a reason and a desire to do it, then it becomes torture. In creating a game, designers take a step back and think from the player’s viewpoint: What’s this game about? How do I play? How do I win? Why do I want to play? What things do I need to do? MEANINGFUL DECISIONS Distilled down to its essence, game design is about creating opportunities for players to make meaningful decisions that affect the outcome of the game. Consider a game like a boxing match. So many decisions lead up to the ultimate victory. How long will I train? Will I block or will I swing? What is my opponent going to do? Where is his weakness? Jab left or right? Even those few, brief questions don’t come close to the myriad decisions a fighter must make as he progresses through a match. Games invite players into similar mental spaces. Games like Tetris and Chess keep our minds busy by forcing us to consider which one of several possible moves we want to take next. In taking these paths, we know that we may be prolonging or completely screwing up our entire game. The Sims games and those in...

Words: 111961 - Pages: 448

Premium Essay

Book

...This was one of my favorite novels we read and discussed in class and I think there is no justifiable way to ban this book. 3....

Words: 833 - Pages: 4

Free Essay

Books

...CARIBBEAN EXAMINATIONS COUNCIL Caribbean Advanced Proficiency Examination CAPE ® BIOLOGY SYLLABUS Effective for examinations from May/June 2008 CXC A10/U2/07 Published by the Caribbean Examinations Council All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form, or by any means electronic, photocopying, recording or otherwise without prior permission of the author or publisher. Correspondence related to the syllabus should be addressed to: The Pro-Registrar Caribbean Examinations Council Caenwood Centre 37 Arnold Road, Kingston 5, Jamaica, W.I. Telephone: (876) 630-5200 Facsimile Number: (876) 967-4972 E-mail address: cxcwzo@cxc.org Website: www.cxc.org Copyright © 2007, by Caribbean Examinations Council The Garrison, St Michael BB14038, Barbados CXC A10/U2/07 ii Contents RATIONALE.....................................................................................................................................................1 AIMS ..................................................................................................................................................................1 SKILLS AND ABILITIES TO BE ASSESSED ...............................................................................................2 PRE-REQUISITES OF THE SYLLABUS......

Words: 11239 - Pages: 45

Free Essay

Book

...So this book made me think differently about what you should do in your future. You don´t necessarily need to have business career and be big boss to be happy. There is chance that you might have dreamed about something...

Words: 373 - Pages: 2