Take the 2-minute tour ×

I have design question. I have entity such as "Person". Person has properties such as: FirstName, LastName, Gender, BirthDate, .... End user when create a person in application may be need to define another property that is not defined in database table schema (or class person). for example: end user nead to define "property1" that its a string property. or nead define "proerty2" that its a image, or need define "property3" that its complex type.

please separate your design solution in tow level: 1-database table design
2-class design

thechnology: .NET Framework, SQL Server, WCF (All entity must be serializ over wire, special complec data in extended properties)
thank u.

share|improve this question
We don't do "send the code", or "send the design", come to that. –  anon Mar 11 '10 at 9:23
ok. write here your solution plz!!! –  mmtemporary Mar 11 '10 at 9:42
I think what Neils trying to say is that you have to think for yourself and do you own work, we're here to help - but not do your work for you. –  Adrian K Mar 12 '10 at 3:22
add comment

1 Answer

Here's a starter for you, although more information would be helpful, such as what platform you're working in.

You could try a value/key pair approach, although you'll need to extend this futher so that you can assign different values to different entity instances.

In your database you might have a table with:

  • Unique row id
  • Entity id
  • property key
  • property value

If you're going to reuse this for other entity types you'll need an additional column to keep those types seperated.

If you're working in .Net you can design interfaces that decribe certain properties you want to work with at the API level.

You might access the properties in the database via a class which serves as a "property utility", this would be used internally by the entity, or the factory that creates them.

share|improve this answer
its very general. how can store complex data and serialize it over wire? –  mmtemporary Mar 12 '10 at 17:53
If you have a complex data type you could serialize it to xml and store that or send it as you see fit. I've done that before but only within a completly .net based system. Try looking here: google.co.nz/… –  Adrian K Mar 14 '10 at 20:40
add comment

Your Answer


