|
1 | | -# 📁 Data Management and Storage |
2 | | - |
3 | | -## Taproom Information System |
| 1 | +# 🍺 Malta Brew, Taproom Information System |
4 | 2 |
|
5 | 3 | <img src="images\c7b24502-d400-4153-9ce7-eb6fc51b8de1.png" alt="Logo" width="200"/> |
6 | 4 |
|
7 | | -## Index |
| 5 | +## 📑 Index |
| 6 | + |
| 7 | +- [Resume] |
| 8 | +- [1. Company Overview](#1-company-overview) |
| 9 | +- [2. Objectives](#2-objectives) |
| 10 | +- [3. Target Audience](#3-target-audience) |
| 11 | +- [4. Why an Information System (IS) Matters](#4-why-an-information-system-is-matters) |
| 12 | +- [5. Mission & Core Values](#5-mission--core-values) |
| 13 | +- [6. Team Structure & User Roles](#6-team-structure--user-roles) |
| 14 | +- [7. Functional Requirements](#7-functional-requirements) |
| 15 | +- [8. Entities and Atributes](docs/entities-atributes.md) |
| 16 | +- [9. Entities Relational Diagram](images/er-diagram.png) |
| 17 | +- [10. Relational Database](docs/relational-database.md) |
| 18 | +- [11. Data Seeding](docs/data-seeding.md) |
| 19 | +- [12. SQL Simple Queries](queries/simple-queries.md) |
| 20 | +- [13. SQL Advanced Queries](queries/advanced-querias.md) |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## 1. Company Overview |
| 25 | + |
| 26 | +**Company Name:** *Malta Brew, Taproom* |
| 27 | + |
| 28 | +**CAE & Industry (Portugal):** |
| 29 | + |
| 30 | +- **CAE:** 47250 — Retail trade of beverages in specialized establishments |
| 31 | +- **Core Activities:** |
| 32 | + - Selling Portuguese craft beers and complementary products |
| 33 | + - Organizing thematic events |
| 34 | + - Offering immersive experiences centered around beer culture |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## 2. Objectives |
| 39 | + |
| 40 | +Malta Brew, Taproom aims to evolve beyond a taproom into a vibrant cultural hub. |
| 41 | + |
| 42 | +- Become a **national reference** for Portuguese craft beer |
| 43 | +- Leverage **Instagram** and **TikTok** to broaden reach and engagement |
| 44 | +- Implement a **cashless system** for enhanced security and streamlined operations |
| 45 | +- Host **thematic events** that foster customer loyalty |
| 46 | +- Invest in **technological innovation** to elevate service and management efficiency |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 3. Target Audience |
| 51 | + |
| 52 | +The establishment welcomes individuals aged **18 and above**, of any nationality, who appreciate gastronomic and cultural experiences tied to craft beer. |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +## 4. Why an Information System (IS) Matters |
| 57 | + |
| 58 | +An integrated Information System is essential for achieving operational excellence and strategic growth: |
| 59 | + |
| 60 | +- **Cost Efficiency:** Automate self-service processes to reduce operating costs |
| 61 | +- **Scalability:** Support **multilingual interfaces** for seamless international expansion |
| 62 | +- **Financial Security:** Minimize fraud and human error with a cashless system |
| 63 | +- **Inventory Management:** Monitor stock in real time and predict consumption trends |
| 64 | +- **Logistical Streamlining:** Seamlessly integrate supplier operations via APIs |
| 65 | +- **Preventive Maintenance:** Track equipment usage time to ensure longevity and performance |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## 5. Mission & Core Values |
| 70 | + |
| 71 | +### Mission |
| 72 | + |
| 73 | +Deliver exceptional, discovery-rich experiences centered on Portuguese craft beer—anchored in innovation, quality, and technological integration. |
| 74 | + |
| 75 | +### Values |
| 76 | + |
| 77 | +- **Innovation:** Continual evolution through systems like self-service and cashless operations |
| 78 | +- **Experience & Sharing:** Cultivating a sociable environment through events and production engagement |
| 79 | +- **Welcoming & Inclusive:** Multilingual services embracing cultural diversity |
| 80 | +- **Transparency & Safety:** Trustworthy operations via clear financial flows and secure systems |
| 81 | +- **Operational Sustainability:** Enhanced stock control and efficient resource use |
| 82 | +- **Passion for Portuguese Craft Beer:** Supporting local producers and showcasing national styles |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +## 6. Team Structure & User Roles |
| 87 | + |
| 88 | +### Organizational Structure |
| 89 | + |
| 90 | +- **Management / Co-Founders:** Business leadership |
| 91 | +- **Employees:** Frontline service and operations |
| 92 | + |
| 93 | +### User Roles & Access Levels |
| 94 | + |
| 95 | +| Role | Access Level | Capabilities | |
| 96 | +|------------|----------------------|----------------------------------------------------------------| |
| 97 | +| Client | External, Front-end | Interact with products and event features within the app | |
| 98 | +| Supplier | External, Portal | Manage orders and supply products | |
| 99 | +| Accountant | Internal, Back-office| Access to employee records, supplier data, payments, and orders| |
| 100 | +| Lawyer | External | Restricted legal document access (e.g., contracts) | |
| 101 | +| Management | Internal, Full | Control across clients, events, products, and operations | |
| 102 | +| Employees | Internal, Limited | Access to clients, events, and products (day-to-day tasks) | |
| 103 | + |
| 104 | +## 7. Functional Requirements |
| 105 | + |
| 106 | +### 👤 For the Customer |
| 107 | + |
| 108 | +- FR01: Visit and use the taproom space. |
| 109 | +- FR02: Consult the menu/portfolio via app or kiosk. |
| 110 | +- FR03: Purchase products (beers, snacks) via app/kiosk. |
| 111 | +- FR04: Make reservations and register for events. |
| 112 | +- FR05: Make digital and cashless payments. |
| 113 | +- FR06: Receive personalized campaigns (e.g., birthday offers). |
| 114 | +- FR07: Submit reviews and feedback. |
| 115 | +- FR08: Share experiences on social media. |
| 116 | + |
| 117 | +### 🚚 For the Supplier |
| 118 | + |
| 119 | +- FR09: Supply products and stockroom materials. |
| 120 | +- FR10: Access the supplier portal. |
| 121 | +- FR11: View and confirm orders and deliveries. |
| 122 | +- FR12: Issue invoices and receipts. |
| 123 | + |
| 124 | +### 👨🍳 For the Employee |
| 125 | + |
| 126 | +- FR13: Ensure safety and support for customers. |
| 127 | +- FR14: Restock supplies and maintain cleanliness according to HACCP. |
| 128 | +- FR15: Answer customer questions about equipment and processes. |
| 129 | +- FR16: Wear company-provided uniforms. |
| 130 | + |
| 131 | +### 🧑💼 For Management |
| 132 | + |
| 133 | +- FR17: Control stock and prevent product shortages. |
| 134 | +- FR18: Manage suppliers, payments, and costs. |
| 135 | +- FR19: Promote the brand/product (marketing/partnerships). |
| 136 | +- FR20: Ensure system updates and proper functioning. |
| 137 | +- FR21: Ensure compliance with hygiene and safety rules. |
| 138 | + |
| 139 | +### 🧾 For the Accountant |
| 140 | + |
| 141 | +- FR22: Issue employee payment receipts. |
| 142 | +- FR23: File tax declarations (e.g., corporate tax). |
| 143 | +- FR24: Manage document flow (supplier invoices). |
| 144 | +- FR25: Ensure compliance with tax legislation. |
| 145 | + |
| 146 | +### ⚖️ For the Lawyer |
| 147 | + |
| 148 | +- FR26: Draft employee contracts. |
| 149 | +- FR27: Access restricted legal documents. |
| 150 | + |
| 151 | +### 🖥️ For the System |
| 152 | + |
| 153 | +- FR28: Enable automatic translation of menus. |
| 154 | +- FR29: Offer different access levels according to profile (permissions). |
| 155 | +- FR30: Integrate with supplier systems/APIs. |
| 156 | +- FR31: Store reviews and consumption metrics. |
| 157 | +- FR32: Support data backup and recovery. |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +## 3. Non-Functional Requirements |
| 162 | + |
| 163 | +- NFR01: **Security** – Sensitive data encryption, permission management, payment security. |
| 164 | +- NFR02: **Usability** – Intuitive interface, multilingual, accessible via app and kiosk. |
| 165 | +- NFR03: **Performance** – Low response time for critical operations (payments, stock, records). |
| 166 | +- NFR04: **Reliability** – Regular backups, audit logs, fault tolerance. |
| 167 | +- NFR05: **Scalability** – System prepared for growth in customer and event volume. |
| 168 | +- NFR06: **Legal Compliance** – GDPR compliance and sector regulations. |
| 169 | + |
| 170 | +--- |
| 171 | + |
| 172 | +## 4. Technical Constraints |
| 173 | + |
| 174 | +- TC01: Central database in **SQLite**. |
| 175 | +- TC02: Native integration with cashless terminals (own or via API). |
| 176 | +- TC03: Compatibility with mobile devices and self-service kiosks. |
| 177 | +- TC04: Automatic export of reports in **PDF/CSV**. |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +## 5. Reports & Audit |
| 182 | + |
| 183 | +- RA01: Complete listings by period: sales, customers, products. |
| 184 | +- RA02: Real-time stock reports. |
| 185 | +- RA03: Detailed history of payments and orders. |
| 186 | +- RA04: Dashboards with metrics (consumption, frequency, popular products). |
| 187 | + |
| 188 | +--- |
| 189 | + |
| 190 | +## 6. Special Rules & Notes |
| 191 | + |
| 192 | +- SR01: Integrate general stock: consumption automatically reduces stock. |
| 193 | +- SR02: Independent modules with communication between areas (customers, suppliers, products, events). |
| 194 | +- SR03: Easy maintenance and future updates. |
| 195 | + |
| 196 | +### System Entities - Malta Brew Taproom |
| 197 | + |
| 198 | +This document describes the main entities of the system and their respective attributes, based on the relational model in SQLite. |
| 199 | + |
| 200 | +--- |
| 201 | + |
| 202 | +#### 📌 Customer |
| 203 | + |
| 204 | +```sql |
| 205 | +Clients ( |
| 206 | + id_client VARCHAR, |
| 207 | + name VARCHAR, |
| 208 | + tax_id INTEGER, |
| 209 | + email VARCHAR, |
| 210 | + phone_number VARCHAR, |
| 211 | + date_of_birth DATE, |
| 212 | + newsletter BOOLEAN, |
| 213 | + authorization BOOLEAN, |
| 214 | + acquisition_channel VARCHAR, |
| 215 | + modified_at TIMESTAMP, |
| 216 | + created_at TIMESTAMP |
| 217 | +); |
| 218 | +``` |
| 219 | + |
| 220 | +#### 🍺 Product |
| 221 | + |
| 222 | +```sql |
| 223 | +Products ( |
| 224 | + id_product VARCHAR, |
| 225 | + name VARCHAR, |
| 226 | + description TEXT, |
| 227 | + product_type VARCHAR, |
| 228 | + sale_price DECIMAL, |
| 229 | + current_stock FLOAT, |
| 230 | + minimum_stock FLOAT, |
| 231 | + modified_at TIMESTAMP, |
| 232 | + created_at TIMESTAMP |
| 233 | +); |
| 234 | +``` |
| 235 | + |
| 236 | +#### 👨🔧 Employee |
| 237 | + |
| 238 | +```sql |
| 239 | +Employees ( |
| 240 | + id_employee VARCHAR, |
| 241 | + name VARCHAR, |
| 242 | + identification_doc VARCHAR, |
| 243 | + tax_id INTEGER, |
| 244 | + email VARCHAR, |
| 245 | + phone_number VARCHAR, |
| 246 | + role VARCHAR, |
| 247 | + date_of_birth DATE, |
| 248 | + address TEXT, |
| 249 | + iban VARCHAR, |
| 250 | + modified_at TIMESTAMP, |
| 251 | + created_at TIMESTAMP |
| 252 | +); |
| 253 | +``` |
| 254 | + |
| 255 | +#### 🏭 Supplier |
| 256 | + |
| 257 | +```sql |
| 258 | +Suppliers ( |
| 259 | + id_supplier VARCHAR, |
| 260 | + company_name VARCHAR, |
| 261 | + tax_id INTEGER, |
| 262 | + email VARCHAR, |
| 263 | + phone_number VARCHAR, |
| 264 | + contact_person VARCHAR, |
| 265 | + address TEXT, |
| 266 | + country VARCHAR, |
| 267 | + modified_at TIMESTAMP, |
| 268 | + created_at TIMESTAMP |
| 269 | +); |
| 270 | +``` |
| 271 | + |
| 272 | +#### ⭐ Review |
| 273 | + |
| 274 | +```sql |
| 275 | +Reviews ( |
| 276 | + id_review VARCHAR, |
| 277 | + rating INTEGER, |
| 278 | + comment TEXT, |
| 279 | + visibility BOOLEAN, |
| 280 | + review_at TIMESTAMP |
| 281 | +); |
| 282 | +``` |
| 283 | + |
| 284 | +#### 🎉 Events |
| 285 | + |
| 286 | +```sql |
| 287 | +Events ( |
| 288 | + id_event VARCHAR, |
| 289 | + name VARCHAR, |
| 290 | + description TEXT, |
| 291 | + event_type VARCHAR, |
| 292 | + event_date DATE, |
| 293 | + event_time TIME, |
| 294 | + location VARCHAR, |
| 295 | + capacity INTEGER, |
| 296 | + private_event INTEGER, |
| 297 | + price DECIMAL, |
| 298 | + modified_at TIMESTAMP, |
| 299 | + created_at TIMESTAMP |
| 300 | +); |
| 301 | +``` |
| 302 | + |
| 303 | +#### 🎉 Event Participation |
| 304 | + |
| 305 | +```sql |
| 306 | +Event_participation ( |
| 307 | + id_client VARCHAR, |
| 308 | + id_client VARCHAR, |
| 309 | + registration_date DATETIME |
| 310 | +); |
| 311 | +``` |
| 312 | + |
| 313 | +#### 💳 Payments |
| 314 | + |
| 315 | +```sql |
| 316 | +Payments ( |
| 317 | + id_payment VARCHAR, |
| 318 | + id_client VARCHAR, |
| 319 | + id_employee VARCHAR, |
| 320 | + amount DECIMAL, |
| 321 | + currency VARCHAR, |
| 322 | + payment_method VARCHAR, |
| 323 | + payment_status VARCHAR, |
| 324 | + payment_date TIMESTAMP |
| 325 | +); |
| 326 | +``` |
| 327 | + |
| 328 | +#### 💳 Payment_Items |
| 329 | + |
| 330 | +```sql |
| 331 | +Payment_items ( |
| 332 | + id_payment VARCHAR, |
| 333 | + id_product VARCHAR, |
| 334 | + quantity INTEGER, |
| 335 | + unit_price DECIMAL |
| 336 | +); |
| 337 | +``` |
| 338 | + |
| 339 | +#### 📦 Order |
| 340 | + |
| 341 | +```sql |
| 342 | +Orders ( |
| 343 | + id_order VARCHAR, |
| 344 | + id_supplier VARCHAR, |
| 345 | + id_employee VARCHAR |
| 346 | + amount DECIMAL, |
| 347 | + currency VARCHAR, |
| 348 | + payment_method VARCHAR, |
| 349 | + payment_status VARCHAR, |
| 350 | + order_status VARCHAR |
| 351 | + order_date TIMESTAMP, |
| 352 | + modified_at TIMESTAMP |
| 353 | +); |
| 354 | +``` |
| 355 | + |
| 356 | +#### 📦 Order Items |
8 | 357 |
|
9 | | -- [Introduction](docs/introduction.md) |
10 | | -- [Functional Requirements](docs\functional_requirements.md) |
11 | | -- [Entities and Atributes](docs/entities-atributes.md) |
12 | | -- [Entities Relational Diagram](images/er-diagram.png) |
13 | | -- [Relational Database](docs/relational-database.md) |
14 | | -- [Data Seeding](docs/data-seeding.md) |
15 | | -- [SQL Simple Queries](queries/simple-queries.md) |
16 | | -- [SQL Advanced Queries](queries/advanced-querias.md) |
| 358 | +```sql |
| 359 | +Order_items ( |
| 360 | + id_order VARCHAR, |
| 361 | + id_product VARCHAR, |
| 362 | + quantity INTEGER, |
| 363 | + unit_value DECIMAL |
| 364 | +); |
| 365 | +``` |
0 commit comments