Click here to Skip to main content
15,895,011 members
Home / Discussions / Database
   

Database

 
GeneralRe: Records with default values Pin
CodingLover5-Apr-11 17:53
CodingLover5-Apr-11 17:53 
AnswerRe: Records with default values Pin
jschell6-Apr-11 8:30
jschell6-Apr-11 8:30 
AnswerRe: Records with default values Pin
SilimSayo4-May-11 10:30
SilimSayo4-May-11 10:30 
QuestionRealtime Backups Pin
Lasanthapw4-Apr-11 20:14
Lasanthapw4-Apr-11 20:14 
AnswerRe: Realtime Backups Pin
Wendelius4-Apr-11 20:50
mentorWendelius4-Apr-11 20:50 
AnswerRe: Realtime Backups Pin
Mycroft Holmes4-Apr-11 22:21
professionalMycroft Holmes4-Apr-11 22:21 
GeneralRe: Realtime Backups Pin
Wendelius5-Apr-11 6:03
mentorWendelius5-Apr-11 6:03 
QuestionSchema ideas Pin
Super Lloyd4-Apr-11 17:58
Super Lloyd4-Apr-11 17:58 
In our application the user can define custom "user defined type" called "data context" to store a bunch of named datetime/string/number/list(Guid)
such as (for example)
--
Contact Information
Name
Age
Address
Birthday
--
we store that in the DB with some table like that (simplified version)

Sets -- a such item, ex: a contact information
id Guid
idDef Guid -- PK to the type definition table

SetValues -- store the values, ex: Contact.Name
id Guid
idSet Guid -- PK to a record in Sets
idDef Guid -- PK to the type definition table
Value sql_variant

In fact it's a it more complicated (deep) due to list and list with property (2 more tables to store the value of a single user type value)
The problem is it's quite cumbersome to do a search for a value for example and we were thinking to store the data instead, in a table like that

Sets
id Guid
string1 nvarchar(max)
...
string15 nvarchar(max)
datetime1 datetimeoffset(7)
..
datetime15 datetimeoffset(7)
number1 decimal(8,2)
..
number15 decimal(8,2)
list1 uniqueidentifier
..
list15 uniqueidentifier


I'm not sure I explain my problem clearly but.. what I wonder is: is there a clever schema that will allow to store the untyped hierarchical user data, yet makes it easy to join / search, etc...

A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
AnswerRe: Schema ideas Pin
Wendelius4-Apr-11 18:50
mentorWendelius4-Apr-11 18:50 
GeneralRe: Schema ideas Pin
Super Lloyd4-Apr-11 18:56
Super Lloyd4-Apr-11 18:56 
GeneralRe: Schema ideas Pin
Wendelius4-Apr-11 19:15
mentorWendelius4-Apr-11 19:15 
QuestionA question about design Relational Model Pin
Duc Huy Nguyen2-Apr-11 22:31
Duc Huy Nguyen2-Apr-11 22:31 
AnswerRe: A question about design Relational Model Pin
Wendelius2-Apr-11 22:41
mentorWendelius2-Apr-11 22:41 
AnswerRe: A question about design Relational Model Pin
Eddy Vluggen3-Apr-11 1:50
professionalEddy Vluggen3-Apr-11 1:50 
AnswerRe: A question about design Relational Model Pin
Keith Barrow3-Apr-11 2:33
professionalKeith Barrow3-Apr-11 2:33 
QuestionRe: A question about design Relational Model Pin
Eddy Vluggen3-Apr-11 20:45
professionalEddy Vluggen3-Apr-11 20:45 
AnswerRe: A question about design Relational Model Pin
Keith Barrow3-Apr-11 22:17
professionalKeith Barrow3-Apr-11 22:17 
AnswerRe: A question about design Relational Model Pin
Eddy Vluggen4-Apr-11 0:15
professionalEddy Vluggen4-Apr-11 0:15 
GeneralRe: A question about design Relational Model Pin
Keith Barrow4-Apr-11 0:29
professionalKeith Barrow4-Apr-11 0:29 
AnswerRe: A question about design Relational Model Pin
Eddy Vluggen4-Apr-11 8:27
professionalEddy Vluggen4-Apr-11 8:27 
GeneralRe: A question about design Relational Model Pin
Klaus-Werner Konrad5-Apr-11 7:43
Klaus-Werner Konrad5-Apr-11 7:43 
GeneralRe: A question about design Relational Model Pin
Eddy Vluggen5-Apr-11 8:05
professionalEddy Vluggen5-Apr-11 8:05 
GeneralRe: A question about design Relational Model Pin
Klaus-Werner Konrad5-Apr-11 8:10
Klaus-Werner Konrad5-Apr-11 8:10 
GeneralRe: A question about design Relational Model Pin
Klaus-Werner Konrad5-Apr-11 8:32
Klaus-Werner Konrad5-Apr-11 8:32 
GeneralRe: A question about design Relational Model Pin
Eddy Vluggen5-Apr-11 9:18
professionalEddy Vluggen5-Apr-11 9:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.