July 2, 2010 at 10:39 am
Guru Help Needed!
I have many tables in one database which contain some of the same basic information. I am going to create a metadata table (data dictionary) that says for example, if field is for customer name the field should be called Customer and should be a nvarchar (40) datatype, etc. so all like fields are of the same data type, length, and called the same thing.
Now my question, after I create my metadata table is there any way I could use this table so if someone needed to create a new table that they could just map their CustomerName to Customer and the field name, type, etc get mapped to the new table (or something along those lines)? I know they could open the data dictionary table and copy as they create a new table, but it would be nice if there was a simpler way.
Any ideas?
Thanks in advance!
July 2, 2010 at 11:08 am
The problem is how do they know what fields are out there? What if they need more fields? Do they need to add them to your master table first? Is that easy?
If all the information is in there, then you can easily read that to build a table script. Just like SQL can read syscolumns and other tables to build a table script.
However you might be making things more complicated. What about just documenting the fields and then having a short review from people to be sure that you aren't mis-naming something.
July 2, 2010 at 1:48 pm
I guess now that I have cleaned up a boat load of tables and their views, stored procs, etc, I was hoping there was an easy way to assist in creating new tables. You're right though, I'm probably just making it more complicated than it has to be. Thanks for your input!
July 2, 2010 at 1:55 pm
It's a hard problem. Master Data Services are supposed to solve a small part of this in 2008 R2, but really just for data.
For the tables, I can't think of how I'd want to this to work, much less making it work. The mapping of names to descriptions makes sense, but I'm not sure how I'd go from the descriptions back to making a new table.
If you figure something out, let me know.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply