MySQL 工作台扩展属性?
我已经使用 SQL Server 一段时间了,我使用扩展属性来标记数据库、表和列。大多数时候,一个项目可以有多个扩展属性。
例如,列可以具有属性 DisplayName 和 Version,供浏览数据库的 Web 客户端使用。
由于我无法控制的原因,我必须将 SQL Server 数据库迁移到 MySQL。
问题是,MySQL Workbench 中似乎不存在扩展属性的概念。 有同等的吗?如果没有,你们如何弥补这个功能的不足?
非常感谢!
I've been working for a while with SQL Server and I use Extended Properties to tag databases, tables and columns. Most of the time an item can have more than one Extended Properties.
For example, a column could have a property DisplayName and Version that are used by a web client that walk the database.
For reasons beyond my control, I must migrate my SQL server database to MySQL.
The thing is that the concept of Extented Properties doesn't seem to exist with MySQL Workbench.
Is there an equivalent? If not, what do you guys do to compensate the lack of this feature?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
祝你好运...(如果是为了钱,请尝试说服你的老板使用 PostgreSQL。)
更严重的是:无论你使用哪个数据库,都在某个地方有一个系统目录。添加属性和标签只不过是该目录中的几个条目。
如果您使用 PostgreSQL,这些表将位于 pg_catalog 模式中。就 MySQL 而言,这些表位于 information_schema 中:
http://dev.mysql.com/doc/refman/5.6/en/information-schema.html
要添加额外的属性、标签等,您可以随时添加表(在您自己的 shema/数据库中)和根据需要插入元数据。语法不会是奇特的 SQL 结构,但它可以完成工作。
Good luck with that... (If it's about the money, try to convince your boss to use PostgreSQL instead.)
More seriously: whichever database you're using has a system catalog somewhere. Adding properties and tags are nothing more than a few entries to that catalog.
If you were using PostgreSQL, these tables would be in the pg_catalog schema. In so far as MySQL is concerned, the tables are in the information_schema:
http://dev.mysql.com/doc/refman/5.6/en/information-schema.html
To add extra properties, tags, etc. you can always add tables (in your own shema/database) and insert that meta data as needed. The syntax won't be fancy SQL constructs, but it'll get the job done.