0

What is the best way to store a binary search tree in Mysql ? Should each node be a table ?

donquixote
  • 411
  • 2
  • 16

1 Answers1

1

Create a table with a circular reference.

CREATE mytable(
id int not null auto_increment,
parent_id int,
PRIMARY KEY (`id`)
);
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501