php登录与数据库设计,php – 与数据库模式和设计相关

我认为@Uours位于正确的页面上,但我建议采用稍微不同的方法,允许您定义一次属性,然后在各种页面上使用它们.就像是:

page_types

page_type_id (PK)

page_type_name (e.g. College, College & University, University, Hospital, Company, ...)

page_attributes

page_attribute_id (PK)

page_attribute_name (e.g. Name, Address, City, Country, Email, ...)

page_attribute_input_type (e.g. text, checkbox, date, email, password, radio, textarea, select, ...)

page_attribute_input_options (e.g. list of values, size=, maxlength=, pattern=, ...)

page_type_attributes

page_id (PK, FK)

page_attribute_id (PK, FK)

page_attribute_sequence (PK)

page_type_attribute_label (defaults to page_attribute_name but can be overriden in case the same attribute is used more than once on a page)

users

user_id (PK)

user_name

...

user_pages

user_page_id (PK)

user_id (FK)

user_page_type_id (FK)

user_page_name (What the user calls this page)

user_page_attributes

user_page_attribute_id (PK)

user_id (FK)

user_page_id (FK)

page_attribute_id (FK)

user_page_attribute_value

祝好运.希望这可以帮助.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值