小弟我想用php+mysql设计一个 家谱树网站,遇到的难题

WBOY
Release: 2016-06-13 12:26:22
Original
922 people have browsed it

我想用php+mysql设计一个 家谱树网站,遇到的难题
问题
1:家谱数据表该如何设计,是家族成员user表(uid name sex fatherid)和relationship(uid motherid fatherid)关系表分开,还是合在一张表?
2.怎样取出家谱表中的 uid对应的 父亲  母亲 兄弟 子女节点来??
------解决思路----------------------
个人表:保存如姓名、出生年月、主要事迹等只有关个人的记录,建立一个唯一ID为Key
关系表:用个人ID建立一个与其它个人的关系表,主要用于记录个人之间的有关数据
以上供参考

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!