Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
GeneralPushing binary through MSNM Pin
12-Jun-02 11:27
suss12-Jun-02 11:27 
GeneralRe: Pushing binary through MSNM Pin
Rocky Moore12-Jun-02 19:52
Rocky Moore12-Jun-02 19:52 
GeneralRe: Pushing binary through MSNM Pin
13-Jun-02 4:29
suss13-Jun-02 4:29 
GeneralRe: Pushing binary through MSNM Pin
SimonS13-Jun-02 4:39
SimonS13-Jun-02 4:39 
GeneralRe: Pushing binary through MSNM Pin
Rocky Moore13-Jun-02 16:59
Rocky Moore13-Jun-02 16:59 
GeneralClosing an application Pin
12-Jun-02 9:40
suss12-Jun-02 9:40 
GeneralClosing an application Pin
12-Jun-02 9:40
suss12-Jun-02 9:40 
QuestionCan Microsoft beat Apple? Pin
gicio12-Jun-02 5:55
gicio12-Jun-02 5:55 
I have a fundamental question about
the way .NET handles the object orientated way of
persistence. I am coming from JAVA and WebObjects (Apple)
World and I am looking for a convenient way of working
with objects without seeing any SQL statements only
objects. I have used that approach for years on the
WebObjects Platform (Enterprise Object Framework) and in
Java recently (Container Managed Persistence). I am
looking for something like that in the Microsoft world.

As far as I understand Microsoft does not distinguish
between the Object Model and the Relational Model. The
main difference is that the Object model allows n : m
relationships and the Relational does not allow them. Here
a small example to visualize the problem:

Example:
There is a Patient object with following Attributes

String patientGUID;
String name;
Int age;
Hashtable diseases; (or some other Container like
Collection or Array)


And there is a Disease Object

String diseaseGUID;
String name;


In the object Model there is relation between Patient and
Disease where the patient has his diseases but on the
other site one disease can belong to 1..* patients. (n :
m)

That n : m relationship can not exist within a relational
database without a link table that contains the
connections between the tables: Patient and Disease.

Now, I would like to connect the object Model containing
TWO Entities (Patient, Disease) with the relational
database (containing THREE tables). Then I want to work
with my objects; e.g. create new diseases connect them to
existing patients by putting the diseases into the array
or create new Patients and connect them with already
existing diseases or just change a Patients name. When I
am finished I just want to say SAVECHANGES and the
database is updated accordingly including all link table
entries.

So all I have to care about are my objects and the
relations between them, some invisible layer does all the
dirty work like building SQL, converting the data types
and caching. So if I fetch a Patient with a specified GUID
I do not have to care about fetching his diseases. They
are fetched automatically. If there are too many Diseases
I do not care some kind of algorithm handles that problem
in such a way that if I have to search all of them for
something they are simply there. They are loaded on demand
(lazy evaluation)

Supposing that the disease has a further connection with
some DiseaseType Object/Table and that table has an
attribute/column "Description" I can access it by typing
the following code:

TextField1.Text = currentDisease.type().description()

Please note that to retrieve the description value I did
only fetch the Patient. The diseases and its types were
fetched automatically.

Is something like that possible or am I excepting too much
of the .NET?



Pawel
AnswerRe: Can Microsoft beat Apple? Pin
Eric Gunnerson (msft)12-Jun-02 8:10
Eric Gunnerson (msft)12-Jun-02 8:10 
AnswerRe: Can Microsoft beat Apple? Pin
James T. Johnson12-Jun-02 9:51
James T. Johnson12-Jun-02 9:51 
AnswerRe: Can Microsoft beat Apple? Pin
Andy Smith12-Jun-02 19:12
Andy Smith12-Jun-02 19:12 
GeneralRe: Can Microsoft beat Apple? Pin
gicio12-Jun-02 21:49
gicio12-Jun-02 21:49 
GeneralRe: Can Microsoft beat Apple? Pin
Andy Smith13-Jun-02 10:34
Andy Smith13-Jun-02 10:34 
GeneralRe: Can Microsoft beat Apple? Pin
gicio27-Jun-02 3:32
gicio27-Jun-02 3:32 
Question.TTF files? Pin
Rickard Andersson2012-Jun-02 5:46
Rickard Andersson2012-Jun-02 5:46 
GeneralProblem when closing DB in Destructor Pin
LaMagra12-Jun-02 5:12
LaMagra12-Jun-02 5:12 
GeneralRe: Problem when closing DB in Destructor Pin
Rickard Andersson2012-Jun-02 5:44
Rickard Andersson2012-Jun-02 5:44 
GeneralTrim() doesn't work!! Pin
Rickard Andersson2012-Jun-02 0:14
Rickard Andersson2012-Jun-02 0:14 
GeneralRe: Trim() doesn't work!! Pin
David Wengier12-Jun-02 0:46
David Wengier12-Jun-02 0:46 
GeneralRe: Trim() doesn't work!! Pin
Rickard Andersson2012-Jun-02 1:38
Rickard Andersson2012-Jun-02 1:38 
GeneralRe: Trim() doesn't work!! Pin
Nish Nishant12-Jun-02 0:48
sitebuilderNish Nishant12-Jun-02 0:48 
GeneralRe: Trim() doesn't work!! Pin
Rickard Andersson2012-Jun-02 1:40
Rickard Andersson2012-Jun-02 1:40 
GeneralRe: Trim() doesn't work!! Pin
AndyG12-Jun-02 4:05
AndyG12-Jun-02 4:05 
GeneralRe: Trim() DOES work!! Pin
leppie12-Jun-02 22:03
leppie12-Jun-02 22:03 
GeneralControl ID's Pin
vikramlinux11-Jun-02 19:22
vikramlinux11-Jun-02 19:22 

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.