21 lines
376 B
MySQL
21 lines
376 B
MySQL
|
CREATE TABLE kategoriak (
|
||
|
id INT PRIMARY KEY,
|
||
|
nev INT
|
||
|
);
|
||
|
|
||
|
CREATE TABLE rendelesek (
|
||
|
id INT PRIMARY KEY,
|
||
|
mennyiseg DECIMAL,
|
||
|
afakulcs DECIMAL,
|
||
|
datum DATE
|
||
|
);
|
||
|
|
||
|
CREATE TABLE termekek (
|
||
|
id INT PRIMARY KEY,
|
||
|
nev VARCHAR(255),
|
||
|
egysegar INT,
|
||
|
etel INT,
|
||
|
kategoriaId INT,
|
||
|
rendelesek INT,
|
||
|
FOREIGN KEY(kategoriaId) REFERENCES katerologiak(id)
|
||
|
);
|