开发者

What would be a good datamodel to describe a datamodel?

I'm considering a "simple" project, where I can create a datamodel based on an existing database and store this datamodel inside another database. Consider it a meta-datamodel. Basically, I would have a "Database" table, listing the databases and linked to this the "Table" table listing the tables per database. Then a "Fields" table listing all fields per ta开发者_JAVA技巧ble. And then I need to fit in the keys, constraints and other stuff...

Before starting to re-invent the wheel, has anyone else done this before, already?

(And I'm only interested in a meta-datamodel, not some tool to manage them!)


Sounds like you want the ISO Information Schema catalogue. This is the standard method of describing the schema as supported by SQL Server, Oracle and other DBMSs.

http://msdn.microsoft.com/en-us/library/ms186778.aspx


Interestingly the canonical definition of a RDBMS mandated that all the metadata was stored within the database itself. So, by definition, a RDBMS ought to already have this and SQL server provides a whole slew of System views to allow you to query all this, so you could use those as a basis for your meta-model.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜