Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ddd ms march 2012 final


Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

Ddd ms march 2012 final

  1. 1. DATABASE DESIGN & DEVELOPMENT 11th MARCH 2012 MARKING SCHEMEThis Marking Scheme has been prepared as a guide only to markers. This is not a set ofmodel answers, nor is the Marking Scheme exclusive, for there will frequently bealternative responses which will provide a valid answer. Unless a question specifies thatan answer be produced in a particular form, then an answer that is correct, factually or inpractical terms, must be given the available marks.If there is doubt as to the correctness of an answer the relevant NCC Education materialsand associated module textbook should be the first authority. Throughout the questions, please credit any valid alternative point. Notice to Markers Where markers award half marks in any part of a question they should ensure that the total mark recorded for a task is rounded up to a whole mark. © NCC Education Ltd 2012
  2. 2. ANSW WER ANY FOUR QUE ESTIONSQuestio 1 on ytree Comma) Holly munity Cent is a sma commun centre based in E tre all nity East Londonn. It wa ants to deveelop a bookking system for the ev m vents it put on and h supplie ts has ed the fo ollowing inf formation: Each Event is classified by an Eve Type su h ent uch as ‘Binngo’, ’Yout Group’ o th or ‘Ches Evening Event T ss g’. Types hav one or more type of mate ve es erials and/o or equippment that are suited to them aand a partic cular type o equipme might b of ent be suitable for man different event types. ny Event itself is allocate to a par An E ed rticular room. Any roo might h om have one o or more events in it. e omers mak bookings for Even A custo Custo ke nts. omer might make mo than on t ore ne book king at a tim me. i. Draw the En D ntity-Relatio onship diagram for the above sce enario. Answer: ADatabase Design & De evelopment Pa 1 of 9 age © NCC Educ cation Ltd 201 12
  3. 3. Notes on above: 10 marks for solution that matches above. Partial answers should be credited as below: ½ mark should be given for every entity identified. ½ mark should be given for every relationship successfully specified in terms of degree (Optionality is not specified here.) Additional marks given for a reasonable solution. Variation should be allowed so long as normalisation is not violated. (10 marks) ii. Using sensible assumptions identify all the primary and foreign keys for this diagram. Add other appropriate attributes. Every entity should have a primary key (1/2 mark each up to 3 ½ marks) All FKs (many ends of relationships) should be successfully identified (1/2 mark each up to 3 ½ marks). Up to 3 additional marks should be given for good choice of attributes. This should correspond to the candidate’s specific solution. (10 marks)b) Explain the difference between data and meta-data using the above scenario as an example. Data are the facts stored in a database system that represent aspects of the user-model of their systems. (1 mark for this or another valid answer) Meta-data is data that is about other data. (1 mark). A further 3 marks for an examples of both data and meta-data drawn from the scenario. (5 marks) Total: 25 MarksDatabase Design & Development Page 2 of 9 © NCC Education Ltd 2012
  4. 4. Question 2In a Rental System for a Tool Hire Company, the following tables have been createdusing SQL DDL commands.1. CREATE TABLE Loan ( LoanNo char (4) not null, CustomerNo char (4) not null, LoanDate date, DueDate date, ExcessTotal decimal, PRIMARY KEY (LoanNo), FOREIGN KEY (CustomerNo) REFERENCES Borrower(CustomerNo));2. CREATE TABLE Customer ( CustomerNo char (4) not null, CustmerName char(10), Address char(50), PRIMARY KEY (CustomerNo) );3. CREATE TABLE LoanTool ( ToolNo char (4) not null, LoanNo char(4) not null, PRIMARY KEY (ToolNo, LoanNo), FOREIGN KEY (LoanNo) REFERENCES Loan (LoanNo), FOREIGN KEY (ToolNo) REFERENCES Tool (ToolNo));4. CREATE TABLE Tool ToolNo char (4) not null, ToolName char(30) not null, PRIMARY KEY (ToolNo));a) Give the correct command sequence to use in order to avoid violation of integrity constraints. 4 marks for right sequence. Marks can also be given for partially correct answers CREATE TABLE Item before CREATE TABLE LoanTool CREATE TABLE Customer before CREATE TABLE Loan CREATE TABLE Loan before CREATE TABLE LoanTool (4 marks)Database Design & Development Page 3 of 9 © NCC Education Ltd 2012
  5. 5. b) A user tried to execute the following commands in the order shown to insert values into the created tables. Find those commands that would result in the return of an error message. Explain why. 1) INSERT INTO Tool values (‘1010’, ‘Chain Saw’); 2) INSERT INTO Tool values (‘1005’); 3) INSERT INTO Tool values (1005, ‘Power Drill’); 4) INSERT INTO Item values (‘1005’, ‘Sander’); 5) INSERT INTO Customer values (‘B23’, ‘HASNET’, ‘1 New Street, LONDON’); 6) INSERT INTO Customer values (‘B33’, ‘SONGARA’, ‘2 Old Street, BIRMINGHAM’); 7) INSERT INTO Customer values (‘B33’, ‘SINGH’, ’56 Cairo Rd, LONDON’); 8) INSERT INTO LoanTool values (‘1010’, ‘2345’, ’03-FEB-2004’); 9) INSERT INTO LoanTool values (‘1005’, ‘2344’); 10) INSERT INTO Loan values (‘2345’, ‘B23’, ’01-Jan-2011’,’23-Jan-2011,0); 11) INSERT INTO Loan values (‘2344’, ’01-Jan-2011’,’23-Jan-2011,0); 12) INSERT INTO Loan values (‘2346’, ‘D32’’01-Jan-2011’,’23-Jan-2011,0); 2 marks for each error identification only with a correct explanation up to a maximum of 6 errors and therefore 12 marks in total 1) OK 2) ERROR NOT NULL VALUE IS NULL 3) ERROR ITEM NUMBER CHAR NEEDS TO BE IN QUOTES 4) TABLE ITEM DOES NOT EXIST 5) OK 6) OK 7) ERROR DUPLICATE PK 8) ERROR TOO MANY VALUES 9) OK 10) MISSING CLOSING QUOTE FOR ’23-Jan-2011 11) ERROR NOT NULL VALUE IS NULL 12) ERROR NO SUCH CUSTOMER (12 marks)c) Write an SQL SELECT statement that will retrieve all the tools that have been rented by the customer ‘SONGARA’ SELECT T.ToolName, LT.LoanNo, C.CustomerName FROM Tool T, LoanTool LT, Customer C, Loan L WHERE T.ToolNo = LT.ToolNo AND LT.LoanNo = L.LoanNo AND L.CustomerNo = C.CustomerNo AND C.CustomerName = ‘SONGARA’; Partial answers can be credited with some marks. (4 marks)Database Design & Development Page 4 of 9 © NCC Education Ltd 2012
  6. 6. d) This question concerns distributed databases. Discuss how the implementation of a distributed database can be advantageous when a company is expanding. The company might be expanding both in terms of structure and area and a distributed database can be used to emulate a new organisation structure (2 marks). Companies that are expanding will usually be experiencing growth. A distributed database can be useful when database are expanding because it allows easier growth where this is spread across different regions, departments or functions. (up to 3 marks for this or similar answer) Other points can be credited. (5 marks) Total: 25 MarksQuestion 3a) Discuss how an Object Orientated (OO) Database Management System has advantages over a Relational Database Management System when dealing with complex data. A number of points could be made. 1 point for listing plus extra points for elaboration up to the maximum. OO is capable of supporting complex objects rather than simple tables. So they might have internal structure rather than just being structured around rows and columns. This is more suited to objects that are not easily reducible to a table model such as complex graphical objects. OO supports extensible data types – the user must be able to define and build new data types from pre-defined types. OO uses classes rather than entities. Classes support behaviour (methods) as well as data (attributes). This is important for complex data which might very well have behaviour associated with it. For example engineering prototypes. OO has a better fit between programming objects and data objects OO capable of supporting complex relationships Marking should be flexible. Fewer points but well discussed should be rewarded. (16 marks)Database Design & Development Page 5 of 9 © NCC Education Ltd 2012
  7. 7. b) The Object Model of the ODMG Standard defines a common data model that specifies a number of constructs. Identify the constructs defined by the ODMG Object Model. Objects and literals. Types Properties Operations 1 mark for each (4 marks)c) This question relates to complex data types. Why would a web-application such as a complex e-commerce site (for example Amazon) require the use of complex data types? The answer should define each of the following for 1 mark each Such sites use complex data types in the promotion of their products (1 mark). For example images of items (1 mark),film clips (1 mark), sound files (1 mark) and even geographic information such as location maps (1 mark). It is easier to maintain a site when these sorts of items are stored in a database rather than as files (1 mark). Additional marks should be given for relevant examples. (5 marks) Total: 25 MarksQuestion 4a) Describe FOUR (4) database administration functions. There are a number of key activities that can be mentioned. 1 mark should be given for the key activities mentioned in the answer plus additional 1 mark for detailing that category. • The students should have selected four from those shown below: • Physical design • Data standards and documentation • Monitoring data usage and tuning database • Data archiving • Data backup and recovery (8 marks)Database Design & Development Page 6 of 9 © NCC Education Ltd 2012
  8. 8. b) Identify and describe SIX (6) potential threats to a database system. ½ mark for naming threat. ½ mark for description /explanation. Up to 6 marks These could be drawn from a wide range of threats. • Theft and fraud • Breach of confidentiality • Privacy • Virus • Hacking • Social engineering • Disgruntled employees etc. (6 marks)c) List SIX (6) ways in which the data administrator contributes to the managing of database security? 1 mark each for identifying and defining any of the following: • Implementing suitable authorisation policies, operations and procedures • Use of views to limit access • Taking regular backups • • Instigating and maintaining a disaster recovery policy • Use of encryption • Vetting and managing of personnel • Keeping equipment in secure environment Other points should be credited. (6 marks)d) Give a definition and explain the use of a data warehouse. There is no one set definition. A data-warehouse is a large amalgamation of data from various operational systems that is integrated, time-varied, non-volatile and subject-oriented. It is used to support management decision making Any definition should include some of these core aspects (5 marks) Total: 25 MarksDatabase Design & Development Page 7 of 9 © NCC Education Ltd 2012
  9. 9. Question 5 Vehicle Code Number: A11 Vehicle Name: Audi People Carrier Vehicle Type Code: PC Vehicle Type Name: People Carrier Supplier Suppliers Name Supplier’s Price Preferred Number Vehicle Ref No Supplier 099 East Motors AU11 £300 Y 0100 Norwich Car Hire A11 £350 N 0101 Stalham Cars AUDI-PC-11 £375 N 098 Wick Motors A7 £399 N 078 Whiskey Bravo AU7-11 £399 N Cars The above form is for a car hire agent who keeps track of rental rates from different companies and tries to get their customers the best deal. The form shows the different rental rates for a vehicle. Preferred Supplier Y/N indicates whether this is the preferred supplier of the vehicle to the car hire agent.a) Using a method you are familiar with normalise the form to 3rd normal form with an explanation of the stages you went through. Below is the suggested solution. UNF Lev 1NF 2NF 3NF Vehicle 1 Vehicle Number Vehicle Number Vehicle Number Number 1 Vehicle Name Vehicle Name Vehicle Name Vehicle Name 1 Vehicle Type Vehicle Type Vehicle Type Vehicle Type 1 Code Code Code* Code 2 Vehicle Type Vehicle Type Vehicle Type 2 Name Name Vehicle Type Name 2 Code Supplier 2 Vehicle Type Number 2 Name Supplier Vehicle Number* Vehicle Number* Name Supplier Supplier Vehicle Number* S/V Reference Number Number* Supplier Product Price Supplier Name S/V Reference Number* Main Indicator S/V Reference Vehicle Price S/V Reference Vehicle Price Main Indicator Vehicle Price Main Indicator Main Indicator Supplier Number Supplier Supplier Name Number Supplier Name Up to 10 marks should be given for the solution. Partial solutions should be credited so that, for example, if the Vehicle Type Code is not recognised as a foreign key. The intermediary stages do not necessarily have to be shown.Database Design & Development Page 8 of 9 © NCC Education Ltd 2012
  10. 10. A further 5 marks should be given for an explanation that goes through what operations have been taken during each stage of normalisation: • 1NF : Remove repeating groups • 2NF : Remove partial key dependencies • 3NF : Remove non-key dependencies. (15 marks)b) Draw the Entity-Relationship diagram that represents the normalised tables. Product Product Type Supplier Supplier Product 1 Mark for each entity plus 1 for correct solution (5 marks)c) This question relates to Databases and the World Wide Web What is application publishing and what are the issues that need to be addressed when it is used for e-commerce? Application publishing – it allows transaction (1 mark) and is the closed type of web-enabled database application to standard transaction processing (1 mark). Important that state is maintained between database and user until transaction complete. (1 marks). Security will also be a concern for this sort of publishing (1 mark). +1 mark for overall correct answer. (5 marks) Total: 25 MarksDatabase Design & Development Page 9 of 9 © NCC Education Ltd 2012