From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001
From: Sven Eisenhauer <sven@sven-eisenhauer.net>
Date: Fri, 10 Nov 2023 15:11:48 +0100
Subject: add new repo

---
 Bachelor/Datenbanken 2/Praktikum4/p1.sql | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Bachelor/Datenbanken 2/Praktikum4/p1.sql

(limited to 'Bachelor/Datenbanken 2/Praktikum4/p1.sql')

diff --git a/Bachelor/Datenbanken 2/Praktikum4/p1.sql b/Bachelor/Datenbanken 2/Praktikum4/p1.sql
new file mode 100644
index 0000000..2d6b2a1
--- /dev/null
+++ b/Bachelor/Datenbanken 2/Praktikum4/p1.sql	
@@ -0,0 +1,30 @@
+drop table position;
+drop table produkt;
+drop table rechnung;
+
+create table produkt
+( pnr   integer,
+  pbez  varchar2(20),
+  preis number(8,2),
+  constraint is_PKprod primary key(pnr)
+);
+
+create table rechnung
+( rnr    integer,
+  datum  date,
+  pges   number(8,2),
+  primary key(rnr)
+);
+
+create table position
+( rnr   integer,
+  pnr   integer,
+  menge integer,
+  primary key(rnr,pnr),
+  foreign key(rnr) references rechnung(rnr),
+  foreign key(pnr) references produkt(pnr)
+);
+
+
+
+
-- 
cgit v1.3

