Linux 社交网络数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3677139/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Social Network Database
提问by Wadey
I'm building the database for my Social Networking Site project. My database has to hold information of many user accounts. Each user has a profile and the profile contains various information. The account owner should be able to set the privacy of each profile information (either private or public). I'm wondering how I should keep track of those privacy option for each profile detail. Is it a good design to have a table called Privacy whose columns are the details and the values are privacy options? Anyone could give me an idea on this? Thanks
我正在为我的社交网站项目构建数据库。我的数据库必须保存许多用户帐户的信息。每个用户都有一个配置文件,配置文件包含各种信息。帐户所有者应该能够设置每个配置文件信息的隐私(私人或公共)。我想知道我应该如何跟踪每个个人资料详细信息的隐私选项。有一个名为 Privacy 的表,其列是详细信息,值是隐私选项,这是一个很好的设计吗?任何人都可以给我一个想法吗?谢谢
回答by pascal
User(ID, Name)
ProfileInfo(ID, Name, CanSetPrivate)
Profile(User_ID, Profile_ID, Value, IsPrivate)