SaaS多租户应用程序:如何实现数据导入/导出/备份?
应用程序如何在基于 SaaS 的多租户应用程序(特别是单一数据库设计)中提供数据导入/导出(或备份)?
导入:
简单起见,我认为基本导入很有用,即 CSV 到规范(或者提供数据库中 CSV 列和字段之间映射的方法。
导出:
在单一数据库设计中,我看到过 XML 导出和 HTML(基本站点生成)导出数据?我认为 XML 是更好的选择吗?您如何引用 XML 中的各种内容并提供相关文档?关系或让用户弄清楚这一点?
供应商是否提供可以导入/恢复的导出/备份
?
How are applications providing import / export (or backups) of data in SaaS based multi-tenancy applications, particularly single database designs?
Imports:
Keeping things simple I think basic imports are useful, ie CSV to a spec (or a way of providing a mapping between CSV columns and fields in the database.
Exports:
In single database designs I have seen XML exports and HTML (basic sitse generated) exports of data? I would assume that XML is a better option? How does one cater for relational data? Would you reference various things within XML and provide documentation of the relationships or let users figurethis out?
Are vendors providing an export/backup that can be imported back in/restored?
Your comments appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道它是如何完成的,但这些是可能的情况:
案例 1 在备份/恢复(或导入/导出)方面很简单,案例 2 类似。我大胆猜测这两种是最常用的方法。
第三种选择使导出/导入变得困难,但并非不可能。基本思想是一个表保存所有公司的数据,但通过外键区分公司。导出和导入需要使用相同类型的 ETL 工具,因为这些操作需要按公司 ID。导出过程将公司作为参数并仅运行该公司的任务。转储将采用插入语句的形式(如使用 MySQL 或 PostgreSQL 获得的语句)或 XML(如由 DDLUtils)。
在某些情况下,单模式设置会派上用场,但我不认为多租户是其中之一。
I don't know how it's done, but these are the possible scenarios:
Case 1 is trivial in terms of backup/restore (or import/export), case 2 is similar. I would venture a guess that these 2 are the most used approaches.
The third option makes export/import difficult, but not impossible. The basic idea is that a table holds data from all companies, but distinguishes the company by a foreign key. Export and import would require the same kind of ETL tool to be used because these actions require filtering by company ID. The export procedure takes a company as a parameter and runs the task for that company only. The dump would take the form of insert statements (like the one you can get with MySQL or PostgreSQL) or XML (like the one created by DDLUtils).
There are situations where the single-schema setup comes in handy, but I don't think multi-tenancy is one of them.