forked from RichBor/planeo_internship
-
Notifications
You must be signed in to change notification settings - Fork 0
/
internship.sql
159 lines (129 loc) · 3.68 KB
/
internship.sql
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Erstellungszeit: 08. Jun 2022 um 08:15
-- Server-Version: 8.0.29-0ubuntu0.20.04.3
-- PHP-Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `internship`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `bmirechner`
--
CREATE TABLE `bmirechner` (
`p_bID` int UNSIGNED NOT NULL,
`f_uID` int UNSIGNED NOT NULL,
`height` double UNSIGNED NOT NULL,
`weight` double UNSIGNED NOT NULL,
`bmi` double UNSIGNED NOT NULL,
`insertdate` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `contact`
--
CREATE TABLE `contact` (
`p_cID` int UNSIGNED NOT NULL,
`Name` varchar(50) DEFAULT NULL,
`Vorname` varchar(50) DEFAULT NULL,
`Email` varchar(50) DEFAULT NULL,
`Nachricht` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `profileimg`
--
CREATE TABLE `profileimg` (
`id` int UNSIGNED NOT NULL,
`f_UID` int UNSIGNED NOT NULL,
`status` int NOT NULL,
`path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `users`
--
CREATE TABLE `users` (
`p_uID` int UNSIGNED NOT NULL,
`Username` varchar(20) DEFAULT NULL,
`Email` varchar(50) DEFAULT NULL,
`Password` varchar(255) DEFAULT NULL,
`registriert_am` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `bmirechner`
--
ALTER TABLE `bmirechner`
ADD PRIMARY KEY (`p_bID`),
ADD KEY `f_uID` (`f_uID`);
--
-- Indizes für die Tabelle `contact`
--
ALTER TABLE `contact`
ADD PRIMARY KEY (`p_cID`),
ADD UNIQUE KEY `p_cID` (`p_cID`);
--
-- Indizes für die Tabelle `profileimg`
--
ALTER TABLE `profileimg`
ADD PRIMARY KEY (`id`),
ADD KEY `f_UID` (`f_UID`);
--
-- Indizes für die Tabelle `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`p_uID`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `bmirechner`
--
ALTER TABLE `bmirechner`
MODIFY `p_bID` int UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `contact`
--
ALTER TABLE `contact`
MODIFY `p_cID` int UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `profileimg`
--
ALTER TABLE `profileimg`
MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `users`
--
ALTER TABLE `users`
MODIFY `p_uID` int UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `bmirechner`
--
ALTER TABLE `bmirechner`
ADD CONSTRAINT `bmirechner_ibfk_1` FOREIGN KEY (`f_uID`) REFERENCES `users` (`p_uID`);
--
-- Constraints der Tabelle `profileimg`
--
ALTER TABLE `profileimg`
ADD CONSTRAINT `profileimg_ibfk_1` FOREIGN KEY (`f_UID`) REFERENCES `users` (`p_uID`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;