mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-06 11:03:16 +02:00
generate refactor
- add comment refering to external script - increase number of generated data - increase wages
This commit is contained in:
parent
fb828db14f
commit
0b1096d6de
@ -1,3 +1,6 @@
|
|||||||
|
-- USE alterscript.sql BEFORE RUNNING THIS SCRIPT (FIRST 7 LINES)
|
||||||
|
-- AFTER USING THIS SCRIPT RUN LAST 7 LINES FROM THE SAME FILE
|
||||||
|
|
||||||
truncate table takes_part_in cascade;--
|
truncate table takes_part_in cascade;--
|
||||||
truncate table takes_place_in cascade;--
|
truncate table takes_place_in cascade;--
|
||||||
truncate table player cascade;--
|
truncate table player cascade;--
|
||||||
@ -7,9 +10,9 @@ truncate table manager cascade;--
|
|||||||
truncate table club cascade;--
|
truncate table club cascade;--
|
||||||
truncate table competition cascade;--competition is last since it has no foreign keys (but club holds a foreign key to competition)
|
truncate table competition cascade;--competition is last since it has no foreign keys (but club holds a foreign key to competition)
|
||||||
|
|
||||||
declare loops number := 50;
|
declare loops number := 1000;
|
||||||
begin
|
begin
|
||||||
declare many_to_many number := 15;
|
declare many_to_many number := 150;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
insert into competition
|
insert into competition
|
||||||
@ -86,7 +89,7 @@ insert into player
|
|||||||
dbms_random.string('A', 6) as contract_status,
|
dbms_random.string('A', 6) as contract_status,
|
||||||
DBMS_RANDOM.value(0, 700) as injuries,
|
DBMS_RANDOM.value(0, 700) as injuries,
|
||||||
DBMS_RANDOM.value(15, 50) as age,
|
DBMS_RANDOM.value(15, 50) as age,
|
||||||
DBMS_RANDOM.value(15, 50) as wages,
|
DBMS_RANDOM.value(0, 100000000) as wages,
|
||||||
DBMS_RANDOM.value(0, 1000000000) as transfer_value,
|
DBMS_RANDOM.value(0, 1000000000) as transfer_value,
|
||||||
dbms_random.value(1,loops) as club_id
|
dbms_random.value(1,loops) as club_id
|
||||||
from dual
|
from dual
|
||||||
@ -111,3 +114,6 @@ insert into takes_place_in
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
-- USE alterscript.sql BEFORE RUNNING THIS SCRIPT (FIRST 7 LINES)
|
||||||
|
-- AFTER USING THIS SCRIPT RUN LAST 7 LINES FROM THE SAME FILE
|
||||||
Loading…
Reference in New Issue
Block a user