2014 N5 SQA Paper Q21 a i & ii – Database

  • Nicky Pasternak
    Participant

    Working with this paper just now. Looking at the table. Official marking scheme gives exhibitor code as the foreign key. Would Stand Number or Company Name not both be acceptable also? Anyone involved in the marking of this for SQA? Any thoughts?
    Thanks
    Nicky Pasternak

    LGibson
    Participant

    The correct answer is whatever field that was the primary key in the previous answer and has been added from table one to the second table. As exhibitor code was the correct Primary key suggestion then it should be added to table two as the foreign key. However if candidates suggested a different field as the first tables primary key then if they carried this error into table two then it is assumed that it would be the correct “foreign” key response.

    Apologies for saying table 1 / table 2 but i don’t have the paper in front of me but can remember the marking scheme from memory.

    Long story short, it can only be Stand number or Company name if these were suggested as the primary key in the first table and the candidate has it written as a field for both tables.

    Nicky Pasternak
    Participant

    Many thanks for that. The official published marking scheme doesn’t mention primary keys in the answer to 21ai. It seems to suggest that the three marks there are for putting the field names in. The question mentions “attributes” but no recognition is given for these in the marking scheme.

    It is not clear what the attributes are in any case. The term “attributes” is not in the course content. Is it “field types”, “Primary key/foreign key”? Pupils are not asked to state what the primary key is in each table and are not being allocated any marks for it.

    Marking scheme also suggests that if they pick the “wrong”? primary field in part (i) then they can get the mark for part (ii)

    My understanding is that they would get full marks for part ii if they have Stand number or Company Name in both tables in part i?

    Your comments are much appreciated.

    Moira Feldman
    Participant

    You are correct, attributes are not mentioned at Nat 5 level but suddenly appear at Nat 6 level. Attributes are the fields, entity is the table. Another example of not having joined up thinking in the progression from one level to the other. In any of the notes that I have prepared for my N6s I use the terms entity and attributes but bracket table and fields behind them.

    LGibson
    Participant

    Based on your response i decided to actually look at the marking scheme to be more specific!: (my previous answer was written based on what i remembered from the marking so my apologies for causing confusion)

    21i is quite precise :”1 mark for each table, must be 100% correct for each mark.” . the question does ask them to list the fields / attributes so its specific enough for pupils to know they have to list the fields. The wording attributes I can only assume might be relevant to cover other database applications that schools may have used? I would worry too much about that though seeing as fields are in the question.

    Exhibitor table:
    exhibitor code
    company name
    area
    stand number

    Product table:
    exhibitor code
    product ref
    item name
    price

    21ii states: If the wrong field is used as the Primary/Foreign key in both of the above tables and is then used as the answer for part (ii), award 1 marks candidate has stated a field that appears in both tables.

    so 21 part ii is only worth 1 mark so you award that if the candidate has mentioned a field which they have put in both tables. which makes sense as they understand how a foreign key works even if they haven’t listed the fields correctly in part a.

    They could only get full marks if they have exhibitor code as the foreign key. if they have anything else then they must have gotten one or both of the tables wrong in part “a” which would cause them to lose either 1 or 2 marks in that section.

    christine_schofield
    Participant

    I have attached a glossary used in the old higher Info Systems for Databases. Entity/attribute is the terminology used at the design stage (Conceptual/Logical stage). Entity and attributes are used when you create the ER diagram and data dictionary. An entity becomes a table and an attribute becomes a field when building the database with the software (it doesn’t matter which software is used to create it). Hope this helps.

    Nicky Pasternak
    Participant

    Thanks again for the comments.

    A couple of observations:

    Using the term “attributes” at N5 level is confusing for pupils.(and me! – Databases were not my specialist subject) It is an unnecessary barrier for them and is NOT in the course content.

    The official marking scheme states:

    21a ii: If the wrong field is used as the Primary/Foreign key in both of the above tables and is then used as the answer for part (ii), award 1 marks candidate has stated a field that appears in both tables.

    The primary/foreign key is not mentioned in the marking scheme for 22 a i.

    It only says

    Exhibitor table:
    exhibitor code
    company name
    area
    stand number

    Product table:
    exhibitor code
    product ref
    item name
    price

    Is it assumed that exhibitor code is the primary/foreign key because it is mentioned in both tables?

    My point is that if I used “stand number” or “company name” instead of the “exhibitor code” in both tables, was this given full marks for both parts i and ii of the question?

    The marking scheme seems to suggest that it would get the mark for part ii but not for part i.

    Lynda, you seem to be suggesting that pupils were given no marks for ai unless they used exhibitor code in both tables. Was this indeed the case?

    If so, why were they not given the marks if they used “Stand number” or Company name”?

    Confused.Com

    LGibson
    Participant

    Hi, yes its assumed that Exhibitor code is the primary key because based on the information provided it would be the only field that would uniquely identify the exhibits, just as Product reference would uniquely identify the products. (therefor these would be the primary keys).

    In order to link a table the primary key from one table should be added to another table (which makes it foreign to that table) and in this case Exhibitor code should be added to the product table. As one exhibit can have many products.

    Stand number and company name as fields can not uniquely identity the exhibits and so cannot be used as primary keys or any other key. The question asks to list the fields to avoid data duplication and so the only correct answer is the one they provided in part 1. no other combination would do this effectively.

    so if you had suggested alternative fields in part one then you wouldn’t get the 2 marks for part 1. full marks for that section is the fields given in the mi and nothing else. so any discrepancy from the marking scheme in this part would mean not obtaining full marks.

    The second part however doesn’t penalise the student if they have suggested either stand number or company name if they have put it in both tables, it shows understanding that the pupils realise a common field needs to be present in both tables to act as a link. so this would be why they could achieve a single mark in part two even if they didnt seperate the fields correctly in part 1.

    If the pupils had one table right in part 1 they would get 1 mark, if they had both tables right, they would get two marks.
    For part 2 they need to state the field name of whatever they had present in both tables in part 1 (even if they got part 1 wrong) or if they mentioned Exhibitor code they would get the mark.

    if stand number was what they though was the foreign key, they could only get a mark for this if they had it present in both their tables in part 1, but then that would also mean that they didnt get full marks in part 1 as the marking scheme doesnt have stand number in both tables.

    I hope this helps. Sorry if its a bit long winded but im trying to be thorough. You’re right in that the paper doesnt ask the pupils to identify the primary keys but it does ask them to list the fields to avoid data duplication which is why there is only that one answer.

    Nicky Pasternak
    Participant

    Thanks again, Lynda

    You say

    “Hi, yes its assumed that Exhibitor code is the primary key because based on the information provided it would be the only field that would uniquely identify the exhibits, just as Product reference would uniquely identify the products. (therefor these would be the primary keys).”

    but both the Stand and the Company Name are unique identifiers too.

    tracy_m
    Participant

    Hi,

    Here are my thoughts…

    Neither Stand or Company Name are reliable primary keys as they may change over time and therefore you woluld not select them as a primary key when you had Exhibitor Code and Product Code that would not change.

    You could also assume that on this occassion stand is 22 but at another exhibition that may change hence stand is not reliable as a primary key.

    Tracy

    LGibson
    Participant

    Yes I see what you mean, it would have been a better question if they had made the contents of these two fields different to make one key stand out as being unique.

    I had jumped to the conclusion that most “codes” are used as unique identifiers and a company might have more than one product on offer or might be using more than one stand. But this isn’t made clear in this specific question.

    I would still agree that the best way to divide the tables is the one suggested in the marking scheme, but based on the data provided in the question they might be able to justify adding stand number or company name to the product table. Although in Marking situations its a case of don’t deviate from the marking scheme so at least everything is consistent!

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.