schemapile / README.md
cwolff's picture
Add dataset
4344bfd verified
---
pretty_name: SchemaPile
tags:
- SQL
- Schemas
dataset_info:
features:
- name: ID
dtype: string
- name: FILENAME
dtype: string
- name: URL
dtype: string
- name: LICENSE
dtype: string
- name: PERMISSIVE
dtype: bool
- name: TABLES
list:
- name: TABLE_NAME
dtype: string
- name: COLUMNS
list:
- name: NAME
dtype: string
- name: TYPE
dtype: string
- name: NULLABLE
dtype: bool
- name: UNIQUE
dtype: bool
- name: DEFAULT
dtype: string
- name: CHECKS
sequence: string
- name: IS_PRIMARY
dtype: bool
- name: IS_INDEX
dtype: bool
- name: VALUES
sequence: string
- name: PRIMARY_KEYS
sequence: string
- name: FOREIGN_KEYS
list:
- name: COLUMNS
sequence: string
- name: FOREIGN_TABLE
dtype: string
- name: REFERRED_COLUMNS
sequence: string
- name: ON_DELETE
dtype: string
- name: ON_UPDATE
dtype: string
- name: CHECKS
sequence: string
- name: INDEXES
sequence: string
splits:
- name: full
num_bytes: 142346554
num_examples: 22989
download_size: 39308883
dataset_size: 142346554
configs:
- config_name: default
data_files:
- split: full
path: data/full-*
---
# SchemaPile
### Usage
```python
from datasets import load_dataset
ds = load_dataset("trl-lab/schemapile", split="full")
print(f"Loaded dataset with {len(ds)} records.")
print(ds[0])
```
### Description
SchemaPile is a collection of database schemas extracted from various sources, normalized for consistency and ease of use in machine learning workflows. Each record contains metadata (`INFO`), licensing information, permissiveness, and a list of tables with detailed column specifications.
### Schema
- **INFO:**
- `ID`: Unique identifier (from filename prefix)
- `FILENAME`: Original filename
- Additional metadata fields
- **LICENSE:** License string (if available)
- **PERMISSIVE:** Boolean indicating permissive license
- **TABLES:** List of tables, each with:
- `TABLE_NAME`: Name of the table
- `COLUMNS`: List of columns, each with:
- `NAME`, `TYPE`, `NULLABLE`, `UNIQUE`, `DEFAULT`, `CHECKS`, `IS_PRIMARY`, `IS_INDEX`, `VALUES`
- `PRIMARY_KEYS`, `FOREIGN_KEYS`, `CHECKS`, `INDEXES`
### Citation
If you use SchemaPile in your research, please cite:
> ```bibtex
> @article{dohmen2024schemapile,
> title={Schemapile: A large collection of relational database schemas},
> author={D{"o}hmen, Till and Geacu, Radu and Hulsebos, Madelon and Schelter, Sebastian},
> journal={Proceedings of the ACM on Management of Data},
> volume={2},
> number={3},
> pages={1--25},
> year={2024},
> publisher={ACM New York, NY, USA}
> ```
**[Read the paper](https://schemapile.github.io/assets/SchemaPile.pdf)**
### Website
For more information, visit the [SchemaPile website](https://schemapile.github.io/).
### License
See individual record `LICENSE` fields for details. The `PERMISSIVE` flag indicates whether the schema is under a permissive license.