File: dbschema.txt

package info (click to toggle)
libgnatcoll-db 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,592 kB
  • sloc: ansic: 128,019; ada: 28,171; sql: 15,778; python: 2,266; makefile: 621; sh: 45
file content (20 lines) | stat: -rw-r--r-- 1,321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# for Emacs: -*- mode: org; mode: flyspell; fill-column: 79 -*-

| TABLE | customers     | customer        |   | The customer for the library |
| id    | AUTOINCREMENT | PK              |   | Auto-generated id            |
| first | TEXT          | NOT NULL        |   | Customer's first name        |
| last  | TEXT          | NOT NULL, INDEX |   | Customer's last name         |

| ABSTRACT TABLE | media               | media |   | The contents of the library |
| id             | AUTOINCREMENT       | PK    |   | Auto-generated id           |
| title          | TEXT                |       |   | The title of the media      |
| author         | TEXT                |       |   | The author                  |
| published      | DATE                |       |   | Publication date            |

| TABLE (media) | books                        | book |     | The books in the library |
| pages         | INTEGER                      |      | 100 |                          |
| borrowed_by   | FK customers(borrowed_books) | NULL |     | Who borrowed the media   |

| TABLE (media) | dvds                        | dvd  |   | The dvds in the library |
| region        | INTEGER                     |      | 1 |                         |
| borrowed_by   | FK customers(borrowed_dvds) | NULL |   | Who borrowed the media  |