使用 SQL Server 进行非关系型数据库设计?
我目前正在开发一个电子商务网站,我将在该项目中使用 C#、实体框架和 SQL Server 2008。
数据库结构并不复杂,就像Wordpress数据库一样。我发现了像 Google BigTable、MongoDB 这样的非关系型数据库……但仍然没有完全理解这项技术的优势。
我知道 SQL Server 不能仅仅通过删除表之间的所有关系来成为 NoSQL DMS,但我仍然担心这个问题:
如果我们删除 SQL Server 中的所有关系并使用实体框架,它会更快还是更慢或有什么缺点?
感谢您的阅读,并对我的英语不好表示歉意。任何帮助将不胜感激。
I'm currently working on developing an e-commerce website and I'm going to use C#, Entity Framework with SQL Server 2008 for this project.
The database structure is not complex, just likes Wordpress Database. I found out about non-relational database like Google BigTable, MongoDB,...but still not completely understand the advantages of this technology.
I know that SQL Server cannot be NoSQL DMS just by removing all of the relationships between tables but I still concern on this question:
If we remove all the relationships in SQL Server and working with Entity Framework, is it faster or slower or any disadavantages?
Thanks for reading and sorry for my bad English. Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜你所说的“关系”是指外键?删除外键与数据库“非关系”无关。
使用外键和其他约束的主要原因是为了数据完整性。通常约束是实现完整性规则的最有效方法。优化器还可以使用它们来提高某些查询的性能。我给您的建议是使用您需要的完整性约束来设计数据库,然后优化数据库。
By "relationships" I guess you mean Foreign Keys? Removing foreign keys has nothing to do with a database being "non-relational".
The principal reason for using foreign keys and other constraints is for data integrity. Usually constraints are the most efficient way to implement integrity rules. They can also be used by the optimiser to improve the performance of some queries. My advice to you is to design the database with the integrity constraints you need and optimise the database afterwards.