https://github.com/alemorro/museum-db
Database suitable for managing a museum's data with various possibilities for user interactions.
https://github.com/alemorro/museum-db
dbms postgresql query relational-databases
Last synced: 18 days ago
JSON representation
Database suitable for managing a museum's data with various possibilities for user interactions.
- Host: GitHub
- URL: https://github.com/alemorro/museum-db
- Owner: AleMorro
- Created: 2024-02-05T21:04:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T17:34:01.000Z (almost 2 years ago)
- Last Synced: 2025-11-20T08:32:50.980Z (7 months ago)
- Topics: dbms, postgresql, query, relational-databases
- Homepage:
- Size: 942 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Museum-DB
Database suitable for managing a museum's data with various possibilities for user interactions. Languages: SQL Database: PostgreSQL
## Introduction
Various scripts to implement a relational Database, including the part of defining tables, populating and testing queries
## Description
The database is designed to manage a platform for a museum. Users who visit it have the ability to both comment on artworks and make stories about multiple artworks to give a personal opinion.
The various SQL scripts implement various pieces of the database:
* DDL: to define the various tables and integrity constraints
* DMLPOP: to populate various tables with fake data
* DMLUPD: to update various table rows
* SQL: to test the various features of the system by making different types of queries
Below are the various scheme describing the structure of the database.
### ER Scheme

### Relational Scheme

### Integrity Constraints
| Num | Description |
|:-----|:--------:|
| R1 | One _Annotazione_ must be created by a _Utente_ |
| R2 | One _Annotazione_ must refer to an existant _Opera_ |
| R3 | A _Domanda_ must refer to an _Annotazione_, if the _Utente_ has decided to enter it. |
| R4 | A _Storia_ must be created by a _Utente_. |
| R5 | A _Storia_ must be associated with a minimum of 2, maximum of 3 Works. |
| R6 | A _Storia_ must have an ID that identifies it. |
| R7 | A _Opera_ must have an Artist. |
| R8 | An _Artista_ must be the author of at least 1 Work. |
| R9 | A _Raccomandazione_ must reference another _Storia_ characterized by a relationship between the first and second _Storia_ (similar, equal, opposite). |
| R10 | A _Ranking_ to a _Storia_ can exist only if the _Storia_ exists. |
| R11 | A _Gruppo_ must have only 1 Supervisor. |
| R12 | _Users_ must register by providing email, name, gender, date of birth. |
## Contributing
Contribution to budget-app is welcome! If you have an idea for a new feature or bug fix, please open an issue or a pull request.