Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

sql - Design Pattern to add columns in database table dynamically -


the user wants add new fields in ui dynamically. new field should stored in database , should allowed perform crud on it.

now can specifying xml wanted better way these new columns searchable. idea of firing alter statement , adding new column seems wrong.

can me design pattern on database server side of how solve problem?

this can approached using key value system. create table primary key column(s) of table want annotate, column name of attribute, , column value. when user wants add attribute (say height) record of person 123 add row new table values (123, 'height', '140.5').

in general cast values text storage if know attributes numeric can choose different type value column. can (not recommended) use several different value columns depending on type of data.

this technique has advantage don't need modify database structure add new attributes , attributes stored records have them. disadvantage querying not straightforward if columns in main data table.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -