Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Table design required Expand / Collapse
Author
Message
Posted Thursday, December 08, 2011 3:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 08, 2011 10:35 PM
Points: 1, Visits: 7
Hello frnds,
I am struck in designing a table.pls help me out.
I have a fixed database schema and in my UI users can add certain fields dynamically(label,textbox). My question is what is the best approach to capture the values of newly added controls (as table design in fixed..there is no table mapping for those fields)...Let me know how to design such a table?

Thanks,
Post #1218487
Posted Thursday, December 08, 2011 5:18 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 11:19 AM
Points: 1,976, Visits: 1,503
UI shouldn't do it. It's very BAD practice. If at all required to add something in table at runtime, use XML data type or add a table to store additional columns as rows (Key - Value Pair).

If you provide more information on your requirements we would be able to help you better. Also, if you are new in Data Modelling I would recommend you to hire a professional. Database Designing issues can’t be taken lightly.


Dev

I am not one who was born in the custody of wisdom; I am one who is fond of olden times and intense in quest of the sacred knowing of SQL.
Post #1218542
Posted Thursday, December 08, 2011 5:35 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 12,320, Visits: 23,448
What you need to do is set up a design where the tables define the screen. That's going to be hard to build and hard to program. No way around it.

In general, what you do is define basic storage as a name/value pair. Then, you have to define a set table for the names that lets you list the names associated with a particular user. You also have to have a name table that lets the users define what names they want to have.

I can't give you the full design (unless we're talking part time contracting, which I'm not available until at least March). But post your ideas here and people can help out.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1218551
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse