我应该只使用 1 个数据库吗?
您好,我正在构建一个窗口应用程序零售商 pos,但想知道设计数据库的最佳方法是什么。我应该只使用 1 个数据库来存储所有客户数据吗? 意思是说,如果我有 100 个来自不同企业的客户使用我的应用程序,他们的所有数据都将存储在 1 个数据库中。 例如,我将在用户表中存储 1 个公司列,以指示客户或交易属于哪家公司。 我目前的做法是为每个企业创建新的数据库并将其安装到本地计算机中。 (必须手动安装sqlserver + sqlexpress)。
你觉得我这样设计是不是更容易一些?我可以将数据库在线连接到sql server。我会有延迟吗?会有多糟糕?我听说 Window Azure 能够很好地处理这个问题。就我而言,我认为每个业务的速度和数据大小并不是真正的问题。
你能给建议吗?
Hi i am building a window apps retailer pos but was wondering what is the best method to design the database. Should i just use 1 database to store all my clients data?
Meaning to say if i have 100 clients from different businesses using my App, all of their data will be stored in 1 database.
e.g. i will store 1 company column in the user table to indicate which company does the customer or transaction belongs to.
My current practice is i create new database for each business and put it installed into their local machine. (Got to manually install sqlserver + sqlexpress).
Do u think it is more easier for me to design in this way? and i can just put the database online to sql server. Will i be getting any latency ? how bad will it be? I heard Window Azure able to handle this well. In my case i think the speed and data size per business is not really a concern.
Could you advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您绝对应该考虑 Azure 中用于存储数据的其他替代方案,特别是 Azure 存储表和 Blob。
通过将所有 Azure 存储选项与 SQL Azure 结合使用,您可以根据应用程序的需求和所需的成本结构选择不同的数据层。从长远来看,在 SQL Azure 中运行所有内容将花费更多成本,但它是将联合数据绑定在一起以进行关系报告的好地方,而您可以使用 PartitionKey 将每个租户的数据存储在 Azure 表中,从而将每个客户端的数据分开来自其他人。
You should definitely look at other alternatives within Azure for storing data, specifically Azure Storage Tables and Blobs.
Utilizing all of the Azure Storage Options with SQL Azure will allow you to choose different data tiers depending on your application's needs and your desired cost structure. Running everything inside of SQL Azure will cost you more in the long run, but it makes a good place to tie together federated data for relational reporting, whereas you can store each tenant's data inside of Azure Tables, using PartitionKeys which keep each client's data separated from the others.