CREATE TABLE `bookmark` ( `id` int PRIMARY KEY, `folder_id` int, `name` varchar(255), `description` varchar(255), `url` varchar(255), FOREIGN KEY(`folder_id`) REFERENCES `folder` (`id`) ); CREATE TABLE `folder` ( `id` int PRIMARY KEY, `name` varchar(255), `description` varchar(255) ); CREATE TABLE `folder_depth` ( `parent_id` int, `child_id` int, FOREIGN KEY(`parent_id`) REFERENCES `folder` (`id`), FOREIGN KEY(`child_id`) REFERENCES `folder` (`id`) );