Skip to content

Football Schema for SQLite seems to miss any Foreign Keys? #12

@MarcusRiemer

Description

@MarcusRiemer

I ran the following commands to obtain a SQLite database for the Bundesliga:

gem install sportdb
# I couldn't run sportdb new de without the following extra dependencies
gem install sportdb-langs sportdb-service
sportdb new de

I then uploaded the resulting SQLite file to my research project, which has a database visualisation component. The resulting visual schema doesn't look like it detected any foreign keys (image behind link).

I then briefly checked the leagues table and it doesn't seem to specify any foreign key.

CREATE TABLE "leagues" (
	"id"	integer NOT NULL PRIMARY KEY AUTOINCREMENT,
	"key"	varchar NOT NULL,
	"title"	varchar NOT NULL,
	"country_id"	integer,
	"club"	boolean NOT NULL DEFAULT 0,
	"created_at"	datetime(6) NOT NULL,
	"updated_at"	datetime(6) NOT NULL
);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions