Re: Representing Student Activity Score

From: Alan <alan_at_erols.com>
Date: Thu, 22 Jul 2004 12:39:12 -0400
Message-ID: <2ma8thFkrgrmU1_at_uni-berlin.de>


"Neo" <neo55592_at_hotmail.com> wrote in message news:4b45d3ad.0407220800.63e323a9_at_posting.google.com...
> > > Could you show how to explicity represent the following info in RM:
> > > john take test.
> > > john get 95.
> > > (john get 95) for (john take test).
> >
> > How about:
> > (john, 95)
>
> The original represented john get 95 for taking test. '(john, 95)'
> doen't represent similar. What is the relationship between john and 95
> and where is it explicted represented. How would the processing
> program know if 'john want 95' vs 'john get 95', etc. The original
> info is represented explicitly and in a normalzed manner in XDb2/TM,
> see www.xdb2.com/Example/StudentActivityScore.asp

Sure it does:

CREATE TABLE test_scores
(
person VARCHAR2(50),
score NUMBER(3)
)
;

INSERT INTO test_scores VALUES ('John', 50) ;

INSERT INTO test_scores VALUES ('Mary', 75) ;

SELECT * FROM test_scores
WHERE person = 'John'
;

PERSON SCORE John 50

Or, if you want a sentence as a result;

SELECT person||' scored '||score||' in the exam.' FROM =test_scores;

John scored 50 in the exam.
Mary scored 75 in the exam.

Explicit, normalized, and easy to put data in and get data out. Received on Thu Jul 22 2004 - 18:39:12 CEST

Original text of this message