Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Metadata challenge question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-05-18 : 07:29:56
Iago writes "Hello,
I have a really challenge scenario, which produce a challenge question. In brief the program scenario is: A web aplication over a SQL Server database with two possible roles: User and Administrator. The Administrator can modify - through a form – the visibility of the fields in the table that users can see. In other words, imagine a table with 10 fields and the administrator only want to show to the users seven of them. Of course the system should be absolutely dynamic, in terms that the administrator should change the show/hidden fields ramdomly.
My design is gather all the relevant information of the tables, through a stored procedure which uses the “information_schema.tables”, and save this information in a table called “TablesInformation” with the follow structure:

TableName
FieldName
Visibility

This table should have a first load, and then updates after every administrator change.

My goal is create Views that using this information to show only the fields with the visibility property as true (based on TablesInformation). I don´t want to have a stored procedure that creates the view dinamically, because I think that consumes a lot of resources, if you think in real world project (the web is supposed to have at least 200 concurrent users). I asking myself if there is a more elegant solution to solve this problem, because I think that many people out there have similar problems with metadata, and I hardly find any example.

Is possible to do this?

Am I stump the guru? :o) (I hope not)

Anyway thank you in advance for your support. Cheers"

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2005-05-18 : 09:27:48
Is this in ASP.NET? Could you add a user defined property to the controls on your website that would track a Read/Write status instead of hiding the controls?

I have a project with dynamic forms. The forms load all of their necessary controls, then a stored procedure runs that sets properties of the controls. I can change captions, hide controls, disable them, or prepopulate them. However, this is done with Visual Basic. It sounds similar to what you are trying to do.

This stored proc that handles the control properties are known in my office as Default procs. Each dynamic form that we have has it's own Default proc. I don't have a table out there that defines how each control on each form is supposed to act, although it could be done that way.

Aj
Go to Top of Page
   

- Advertisement -