create table modele(id_modele varchar2(20), libelle_modele varchar2(20));

alter table modele add constraint mod_pk primary key (id_modele);

create table vehicule (id_vehicule number(3), id_modele varchar2(20), libelle_vehicule varchar2(20));

alter table vehicule add constraint veh_fk foreign key (id_modele) references modele;

create index veh_ind_fk on vehicule (id_modele);

insert into modele
select q'#'20#'||rownum||q'#'#'
      ,'lib--'||q'#'20#'||rownum||q'#'#'
from dual
connect by level <= 23;


commit;

begin
for j in 1..284 loop
 for x in 
      (select id_modele 
        from (select 
                 id_modele 
              from modele 
              order by dbms_random.value
              )
        where rownum =1
 )
 loop
   insert into vehicule values (j, x.id_modele, 'lib--'||j);
  end loop;
end loop;
 commit;
end;
/

