Comments (4)
Yes, the w3c spec support composite foreign keys. Generally, I think, it is best to not regard "foreign key" as some sort of column type, but follow the "constraint" paradigm: i.e. "foreign keys" is a list of constraints on the values of a row, rather than a core property of the individual columns. Thus it shouldn't interfere with writing at all, but will come into play only when calling a dataset's validate
method.
from clldutils.
So if we want to add more support for handling of foreign keys, we may want to introduce Constraint
objects, pretty much like SQLAlchemy does it.
from clldutils.
How are you currently handling foreign keys to languages.csv
etc.? I could not find an example and have therefore no idea what they should look like
from clldutils.
Ah, now I see. I shall adapt the script I sent you. I had – once again – misunderstood what needs to go there, but after adding an explicit LanguageTable I see how that is implemented and now I understand how Foreign Keys should be specified in the metadata json, and that they are actually separate from the columns.
Their semantics (constraints, 1:n, uniqueness, …) is an entirely different issue, and I'm fine with it not being specified at the moment.
from clldutils.
Related Issues (20)
- Replace pkg_resources with entrypoints and/or importlib.metadata HOT 1
- Support for OAI-PMH clients
- tabulate doesn't really provide proper TSV for format `tsv`
- Package SIL Charis fonts with clldutils
- markup.add_text function to insert text in markdown docs
- Add "markdown" option for text serialization of Source objects
- Fix linearization of *thesis types in Source.text
- Regression in clldutils.source.Source.text
- Allow passing formatter_class to register_subcommands
- API.app_wrapper must not assume the args.repos attribute to be a simple path
- Support for formatted tables in cli commands
- log_or_raise calls deprecated function by default
- Regex for finding SFM markers too narrow HOT 1
- Subcommand registration fails if no docstring is provided HOT 1
- Malformed table name in ISO's download
- Render edition in linearization of a Source according to the unified style sheet
- Remove redundant address when linearizing Sources
- Adapt clldutils.iso_639_3 to new file layout in download tables HOT 1
- Add function to clilib to set random.seed HOT 1
- clldutils.text._tokens must close brackets first!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clldutils.