通过 LINQ to SQL 的新表与新数据库
目前我正在开发 WPF + ASP.Net 应用程序 WPF 在桌面版中担任俱乐部经理,同时 ASP.Net用于允许用户注册为俱乐部会员 数据库计划托管在共享主机 SQL Server 2008 上 两者都将通过 LinQ to SQL 连接到 ASP.Net
现在我感到困惑且无法解决的问题是 俱乐部不仅仅是一个 虽然可能有 1 个斯诺克俱乐部,2 天后可能会建立另一个台球俱乐部 我可以知道在新俱乐部成立时如何创建新的 * 吗? 在数据库内创建新表会比创建新数据库更好吗?
应用程序 ASP.Net 和 WPF 通过 LINQ 连接是否会导致安全漏洞? 有更好的建议吗?
感谢您的回复,如有违反本站规则,敬请谅解~.~ 因为目前急于分配,需要清楚地知道我可以使用哪些技术=D
Currently i'm developing a WPF + ASP.Net Application
WPF at Desktop role as Club Manager while
ASP.Net is used to allowed user register as club member
Database plan to host at shared host SQL Server 2008
Both will connect to ASP.Net via LinQ to SQL
Now the problem i confuse and cannot solve that is
Club is not only one
while there might 1 snooker club and 2 days later may built up another pool club
May i know how can i create a new * for while new club is setting up ?
will create a new table inside the database will better than create a new database ?
will both application ASP.Net and WPF connect via LINQ will caused them a security holes ?
any better suggestion ?
Thank you for reply and sorry if this post violate site rules ~.~
because of currently rush for assignment and need to know clearly on what technology is available to me =D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的数据库设计正确,您应该只需要创建一组新记录,而不是新数据库或新表。
If your database design is correct, you should only need to create a new set of records not a new database or a new table.
我不完全确定你在说什么。但我认为你的意思是,你怎么能拥有多个“俱乐部”。
答案取决于您的要求。例如,各个俱乐部是否需要在不同的服务器上运行(可能在不同的托管设施中?)。如果是这样,您需要为每个俱乐部建立单独的数据库。
如果应用程序始终在您的服务器上运行,并且您可以完全控制它们,那么您可以使用俱乐部选择列来设计数据库,并且通常将其作为主键的一部分。甚至不需要创建一个新表。
您创建新表的唯一原因是,如果您需要从一个俱乐部到另一个俱乐部的不同数据,即使这样,也有其他方法可以解决该问题。
I'm not entirely sure what you're getting at. But I think you mean, how can you have multiple "clubs".
The answer to that depends on your requirements. For example, do idividual clubs need to run on different servers (possibly in different hosting facilities?). If so, you need seperate databases for each club.
If the application will always run on your servers, and you have complete control over them, then you can design your database with a club selection column, and typically make it part of your primary key. No need to even create a new table.
The only reason you would create a new table is if you needed different data from one club to another, and even then there are other ways to solve that problem.