comments on design wanted

P

patriknym

These are two snippets from an actual document. There are _many_
constructs like these. To me they seem excessively complicated.
Anyone care to comment? Would you have done it differently?
How? Why?

Thanks a lot,
/Patrik Nyman

<language>
<identifiers>
<identifier>
<properties>
<property>internal</property>
</properties>
<value>12</value>
</identifier>
<identifier>
<properties>
<property>iso639-1</property>
</properties>
<value>sv</value>
</identifier>
</identifiers>
<descriptions>
<description xml:lang="sv">Svenska</description>
<description xml:lang="en">Swedish</description>
</descriptions>
</language>

[...]

<affiliations>
<affiliation>
<organisation>
<properties>
<property>controlled</property>
<property>open</property>
</properties>
<identifiers>
<identifier>
<properties>
<property>internal</property>
</properties>
<value>2523</value>
</identifier>
</identifiers>
<organisationNames>
<organisationName xml:lang="en">
Department for Infectious Diseases,
Karolinska Hospital
</organisationName>
<organisationName xml:lang="sv">
Department for Infectious Diseases,
Karolinska Hospital
</organisationName>
</organisationNames>
</organisation>
</affiliation>
</affiliations>
 
J

Joe Kesselman

These are two snippets from an actual document. There are _many_
constructs like these. To me they seem excessively complicated.
> Anyone care to comment? Would you have done it differently?

Without knowing the design requirements, both current and future, all we
can say is "It Depends."

Some of the levels of the data hierarchy may be redundant -- or may not,
depending on what kinds of flexibility you think you're going to need in
the future.

If some of values will always be single instances of simple values
rather than having sub-structure, you might want to consider using
attributes rather than elements... especially if they function as
modifiers rather than as independent values -- but that doesn't actually
change the complexity of the data model very much.

Conversely, some of these values might actually want to be broken down
further, or otherwise refactored; I'm thinking in specific of
<organisationName xml:lang="en">
Department for Infectious Diseases,
Karolinska Hospital

where the whitespace may be an issue and where the organizations might
want to be factored out into a separate table and referenced by ID...


Bascially, you haven't asked a useful question. Whether this is too much
structure or not enough, and whether it's the right structure, depends
on what you intend to do with the data now and in the future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top