-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.html
68 lines (59 loc) · 4.96 KB
/
database.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<title>Menukaarten-docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="assets/css/stylesheet.css" media="screen,print">
<link rel="stylesheet" href="assets/css/print.css" media="print">
<link rel="stylesheet" type="text/css" href="assets/css/shCore.css" media="screen,print">
<link rel="stylesheet" type="text/css" href="assets/css/shThemeDefault.css" media="screen,print">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/SyntaxHighlighter.js"></script>
<script type="text/javascript" src="assets/js/build_menu.js"></script>
</head>
<body>
<div id="header-wrapper">
<div id="header">
<h1>Documentation SexyFramework</h1>
<span>Created by Vincent Bremer & Douwe de Haan</span>
</div>
</div>
<div id="container">
<div id="menu-wrapper">
<div id="menu">
<h1>Table of contents</h1>
<ul></ul>
</div>
</div>
<div id="content-wrapper">
<div id="content">
<!-- START CONTENT -->
<h1>Database design</h1>
<p>During all the phases of the project the database changed a lot. The least amount of tables was 5, the largest amount 9. One had foreign keys, the others did not. In this section the differences and choices that were made are found.</p>
<h3>Version 0.1</h3>
<img src="assets/images/menuk1.png" />
<p>What mattered in the first version was that there was at least something to show, because there was not a lot of time left. Therefore a structure was made up that did not allow any levels. A customer would make a menucard, after which the categories could be made. These categories were linked with a menucard. Then the customer was able to make subcategories and link them to categories. After all the previous steps were completed, the system allowed the customer to make products and link them to a subcategory. This was a very closed and limited system, but it worked.</p>
<h3>Version 0.2</h3>
<img src="assets/images/menuk2.png" />
<p>In this version there was a switch of framework. Kohana was deleted and the SexyFramework was born. At first there was not much time to take a closer look at the database design, but in the end a try was made to make the system more flexible. An extra table, named categories2, was created to support this type of system. Therefore the table subcategories became obsolete and was deleted. The pivot table linking the products to the subcategories was altered so products were linked to categories. In this way, products could be linked to a category, while that category has subcategories, which is much more flexible.</p>
<h3>Version 0.3 and 0.4</h3>
<img src="assets/images/menuk3.png" />
<p>This design is for two versions of the application. In version 3 there was a little bit of change in the database design, but in the fourth version it stayed the same. Therefore these versions are described together.<br />
After some brainstorming the establishments and organisations tables were made. This would allow the administrator of the application to connect users to an establishment and establishments to an organisation. The key value build of the establishment settings allowed the user to have multiple options, like opening hours and contact information all in the same table. This design was very flexible, because there was no guideline to what information could be stored in this database. With the user settings table users were able to override the information that they inherited from their establishment. These settings could be anything, for example backend language.</p>
<h3>Version 0.5</h3>
<img src="assets/images/menuk5.png" />
<p>Back to what is really needed was the reason why this database is significantly different than the previous version. This version is build without looking to the previous designs and made with a list of functionalities that needed to be build. Because of the fact that pictures were needed for different parts of the application, a table was created to store and find pictures.<br />
The order and state fields were added to products, categories and the pivot table that links those two. <br />
At last all the tables got created_at and updated_at fields, so there would be more information on each row.
</p>
<h3>Version 0.6</h3>
<img src="assets/images/menuk6.png" />
<p>The last version of the database during the project is version 0.6. The photo table is removed, because photos and images now get stored in folders in suck way, that the image module always can locate the files, just by checking where the request comes from.<br />
The tables for locations were added again, so the information about locations could be stored again. The tables were created to split all the information, so there would not be one large table and the data could be saved seperated.</p>
<!-- END CONTENT -->
</div>
</div>
</div>
<script type="text/javascript" src="assets/js/SyntaxHighlighter_settings.js"></script>
</body>
</html>