Compare commits
9 Commits
1c3b693ded
...
8eb7c6f49f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8eb7c6f49f | ||
|
|
8ddfce6d38 | ||
|
|
b29141c47c | ||
|
|
0b89e64773 | ||
|
|
228a88d999 | ||
|
|
6819e3f8b3 | ||
|
|
b1d38eff49 | ||
|
|
6212f13ee6 | ||
|
|
003ab36bd5 |
@ -18,17 +18,15 @@ The operators are: atom scan, semijoin, and natural join.
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<picture>
|
<picture>
|
||||||
<img alt="Types" src="docs/diagrams/types.svg" height="50%" width="50%">
|
<img alt="Types" src="docs/diagrams/types.svg" height="70%" width="70%">
|
||||||
</picture>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
The rule below returns the authors of every bestseller along with the book's price.
|
The rule below returns the authors of every bestseller along with the book's price.
|
||||||
It uses all three operators:
|
It uses all three operators: `scan_atom` for the three input tables, `semijoin` to keep only authors of bestsellers, and `natural_join` to attach each
|
||||||
- `scan_atom` for the three input tables,
|
book's price.
|
||||||
- `semijoin` to keep only authors of bestsellers,
|
|
||||||
- and `natural_join` to attach each book's price.
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Q(name, book, dollars) :- author(name, book), bestseller(book), price(book, dollars).
|
Q(name, book, dollars) :- author(name, book), bestseller(book), price(book, dollars).
|
||||||
@ -104,11 +102,9 @@ fn main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
How it works:
|
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<picture>
|
<picture>
|
||||||
<img alt="Types" src="docs/diagrams/workflow.svg" height="90%" width="90%%">
|
<img alt="Types" src="docs/diagrams/architecture.svg" height="70%" width="70%">
|
||||||
</picture>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Loading…
x
Reference in New Issue
Block a user