Padding in info given a types table Suppose I have the following schema for professions: id, type, likelihood. id is the id of the person in question, and I have info regarding the likelihood that that person will read a certain type of book.

What if I want to pad in values? So, let's say I currently have:

id     type     likelihood

1      fantasy  0.9
1      romance  0.5
2      horror   0.2


But, I have a table with all of the possible types:

type

fantasy
romance
horror
mystery
academic


And now I want to pad the table so that I have every person (id) listed with every single type. If the type wasn't in the table to begin with, place the likelihood as 0.

So, I want

id     type     likelihood

1      fantasy   0.9
1      romance   0.2
1      horror    0.0
1      mystery   0.0
1      academic  0.0


I'm having difficulties with this. I've tried using different joins but I can't seem to preserve the info I want while adding in information.

Thanks!
Suppose we have the following tables (and data):

-- test tables and test data
create table t_1 (
  type_ varchar2(64) unique
);

create table t_2 (
  id_ number
, type_ varchar2(64) references t_1(type_)
, likelihood_ number(7,2) 
);

begin
  insert into t_1 (type_) values ('fantasy') ;
  insert into t_1 (type_) values ('romance') ;
  insert into t_1 (type_) values ('horror') ;
  insert into t_1 (type_) values ('mystery') ;
  insert into t_1 (type_) values ('academic') ;
  insert into t_2 (id_, type_, likelihood_) values (1,'fantasy', 0.9) ;
  insert into t_2 (id_, type_, likelihood_) values (1,'romance', 0.5) ;
  insert into t_2 (id_, type_, likelihood_) values (2,'horror', 0.2) ;
end;
/


For getting every "userid" mapped to every single type, you could use something like:

select
 *
from 
( select distinct id_ from t_2 ) users , 
( select type_ from t_1 ) types
;

ID_  TYPE_     
1    fantasy   
1    romance   
1    horror    
1    mystery   
1    academic  
2    fantasy   
2    romance   
2    horror    
2    mystery   
2    academic 


Expanding the previous query, we can select all the columns you need (number formatting omitted for clarity):

select
  users.id_
, types.type_
, coalesce ( 
    ( select
        likelihood_
      from t_2
      where t_2.id_ = users.id_ and t_2.type_ = types.type_ 
    ) , 0
   ) likelihood
from 
( select distinct id_ from t_2 ) users , 
( select type_ from t_1 ) types
;

-- output
ID_  TYPE_     LIKELIHOOD  
1    fantasy   0.9         
1    romance   0.5         
1    horror    0           
1    mystery   0           
1    academic  0           
2    fantasy   0           
2    romance   0           
2    horror    0.2         
2    mystery   0           
2    academic  0


Tested w/ Oracle 12c and 11g. Dbfiddle here.