Compare commits
4 Commits
8eb7c6f49f
...
1c3b693ded
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c3b693ded | ||
|
|
b31aa32747 | ||
|
|
1c34368da6 | ||
|
|
765689b66e |
@ -18,15 +18,17 @@ 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="70%" width="70%">
|
<img alt="Types" src="docs/diagrams/types.svg" height="50%" width="50%">
|
||||||
</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: `scan_atom` for the three input tables, `semijoin` to keep only authors of bestsellers, and `natural_join` to attach each
|
It uses all three operators:
|
||||||
book's price.
|
- `scan_atom` for the three input tables,
|
||||||
|
- `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).
|
||||||
@ -102,9 +104,11 @@ fn main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
How it works:
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<picture>
|
<picture>
|
||||||
<img alt="Types" src="docs/diagrams/architecture.svg" height="70%" width="70%">
|
<img alt="Types" src="docs/diagrams/workflow.svg" height="90%" width="90%%">
|
||||||
</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