@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix edu: <https://knobit.org/def/> .
@prefix knobit: <https://knobit.org/id/knobit/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix register: <https://knobit.org/id/register/> .
@prefix schema: <https://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

knobit:K-816 a edu:Knobit ;
    rdfs:label "Recognises one decimal scale for every currency"@en ;
    dcterms:identifier "K-816" ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:source "Review checklist 05-ddl, row 16; ISO 4217"@en ;
    owl:sameAs <https://bitbucket.org/reffa/ontology/id/knobit/data-modelling/08-ddl/16> ;
    skos:altLabel "One scale for every currency (generated DDL)"@en ;
    skos:definition "`DECIMAL(n,2)` on an amount column in a table that is not single-currency. ISO 4217's minor-unit table is not a constant 2: JPY has 0, KWD and BHD have 3. Two decimals silently round a dinar instruction and store two meaningless zeros on a yen one."@en ;
    skos:prefLabel "Recognises one decimal scale for every currency"@en ;
    edu:actionVerb "Recognises"@en ;
    edu:appliesKnowledge knobit:K-853 ;
    edu:assessmentCriterion "Flags the deficient case and passes the acceptable one. Deficient: `fact_payment.instructed_amount DECIMAL(14,2)` with `account_currency_code` ranging over ISO 4217; a KWD payment of 12.345 is stored as 12.35 and the original instruction can no longer be reproduced Acceptable: Scale set to the widest minor unit in scope (`DECIMAL(16,3)`), the per-currency minor-unit digits held in the currency reference table, and a DQ rule that an amount's minor units match its currency. Or the single-currency scope stated in the column `comment`, so the next reviewer knows `2` was a decision"@en ;
    edu:assessmentMethod "skill-tests task: Generated DDL review, Postgres and Snowflake (DDL review skills)"@en ;
    edu:conformsToProfile <https://oppekava.edu.ee/a/Knobitite_kirjeldamise_ja_seostamise_reeglid#LCG-KNOBIT-0.1> ;
    edu:contextFunction <https://knobit.org/def/contextFunction/resultEvaluation> ;
    edu:creationMethod <https://knobit.org/def/creationMethod/aiGeneratedHumanEdited> ;
    edu:dependsOnKnobit knobit:K-617 ;
    edu:expectedResult "The column and the scale its currencies need"@en ;
    edu:graphRelevance <https://knobit.org/def/graphRelevance/learnerState>,
        <https://knobit.org/def/graphRelevance/taskSelection> ;
    edu:knobitType <https://knobit.org/def/knobitType/skill> ;
    edu:targetObject "amount column in a multi-currency table"@en ;
    schema:creativeWorkStatus "accepted" ;
    schema:isPartOf register:data-modelling .

edu:Knobit rdfs:label "Knobit"@en,
        "Knobit"@et .

knobit:K-617 rdfs:label "Recognises a physical domain differing from the logical domain"@en .

knobit:K-853 rdfs:label "Explains currency minor units"@en .

