Should I add relation id on parent or child table for one to one relation Lets say I have 2 tables product and product_detail they both share one 2 one relation and product_detail can be null so should I add relation id in parent table like this?

CREATE TABLE `product` (
   product_id INT(11) PRIMARY KEY auto_increment,
   ...
   product_detail_id INT(11) DEFAULT NULL,

   FOREIGN KEY (product_detail_id) REFERENCES product_detail(product_detail_id)
);

CREATE TABLE `product_detail` (
   product_detail_id INT(11) PRIMARY KEY auto_increment,
   ...
);


Or should I add it in child table like this

CREATE TABLE `product` (
   product_id INT(11) PRIMARY KEY auto_increment,
   ...
);

CREATE TABLE `product_detail` (
   product_detail_id INT(11) PRIMARY KEY auto_increment,
   ...
   product_id INT(11) NOT NULL,

   FOREIGN KEY (product_id ) REFERENCES product(product_id)
);
When the table is splitted vertically with 1:1 relation where slave sub-table record is optional, the common structure is

CREATE TABLE main ( ... ,
                    slave_id INT NULL,
                    UNIQUE INDEX uidx_slave_id (slave_id),
                    FOREIGN KEY (slave_id) REFERENCES slave (id),
                    ... );

CREATE TABLE slave ( id INT NOT NULL PRIMARY KEY, 
                     ... );


This structure gives more simple query when you need main records which have no slave record. In all another cases (when you need data from both tables) this and backward structures are close to equivalent.