Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[END] Encoding of complex data types that actually can be identified uniquely #15

Open
heidivanparys opened this issue Jun 22, 2021 · 1 comment

Comments

@heidivanparys
Copy link
Collaborator

Data types such as SimpleCitation, LegislationCitation and RelatedParty are special data types in the sense that somewhere, outside INSPIRE, instances with a unique identifier corresponding to those data type instances exists, their management is simply outside the scope of INSPIRE.

Example: if we refer to the Noise Directive from within an INSPIRE data model, data type LegislationCitation will be used, but in the system behind EUR-Lex, directives are definitely seen as having identity (it has ELI identifier https://eur-lex.europa.eu/eli/dir/2002/49/oj and would thus be modelled as a UML class. The same goes for national legislation.

Depending on whether the attribute using this data type is voidable or not, the encoding seems to be different.

image

So you could end up in a situation that SimpleCitation is flattened into columns in AbcVoidables when it is voidable and is encoded as a separate table when it is not voidable.

I would suggest creating separate tables for RelatedParty and LegislationCitation, and have a column in AbcVoidables referring to that.

CREATE TABLE "abc_voidables" (
  "competentauthority" INTEGER,
  "legalbasis" INTEGER
  -- ...
);
CREATE TABLE "relatedparty" (
  "contact" TEXT,
  "individualname" TEXT,
  "organisationname" TEXT,
  "positionname" TEXT,
  "role" TEXT
  -- ...
);
CREATE TABLE "legislationcitation" (
  "level" TEXT,
  "link" TEXT
  -- ...
);

instead of

CREATE TABLE "AbcVoidables" (
  "competentAuthority_contact" TEXT,
  "competentAuthority_indivName" TEXT,
  "competentAuthority_orgName" TEXT,
  "competentAuthority_posName" TEXT,
  "competentAuthority_role" TEXT,
  "legalBasis_link" TEXT,
  "legalBasis_level" TEXT,
    -- ...
);
@thorsten-reitz
Copy link
Contributor

Results of the discussion on 30.06.2021:

  • general recommendation vs. guidelines for use cases (e.g. expected cardinality, "flattening" vs normalisation)
  • Goal: Identify a list of data types that fulfils criteria to be normaised to their own table (external identifier, would be a class of teir own, ....)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants