[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Database connectivity in MathProg

From: glpk xypron
Subject: Re: [Help-glpk] Database connectivity in MathProg
Date: Sun, 10 Feb 2008 21:26:49 +0100

Hello Andrew!

>>> The output table to be written to a database has the following syntax:
>>>    table t { ... } OUT "..." : expr ~ A, expr ~ B, ... ;
>>> where { ... } is a domain, expr, ... are arbitrary expressions, and
>>> A, B, ... are column names.
>> I would rather stick to:
>>     table t OUT "..." : { ... } -> [k ~ K], expr ~ A, expr ~ B, ... ;
>> The domain, expr, ... may have multiple indices. These indices are >needed
>> as columns for the SQL table to be written. When creating the SQL table
>> they should become key columns.
>> { ... } can be a set:   s{k, ...}
>A dummy index is a particular case of expression, so the syntax of the
>output table I suppose is sufficient.
>As to key columns, I think the complete structure of a database,
>including output tables, should be specified separately and out of
>MathProg. On writing the output table attributes of its column should
>not be destroyed, in which case it is sufficient to specify only column
>names '~ A', '~ B', ... .

You proposed to execute DROP, CREATE, INSERT in the case of table OUT. After 
DROP the table no longer exists in the data base. Hence the structure must be 
given by MathProg.

Otherwise the table should not be DROPped. Instead only existing records should 
be deleted.

In a SQL table with key columns for any key combination of keys there can be 
only one record in the table. Hence it is necessary to fill the keys.

In Your syntax
table t { ... } OUT "..." : expr ~ A, expr ~ B, ... ;
{ ... } defines the keys for which the expr shall be written. It is unclear to 
me where You specify to which columns the keys are written.

This is what is defined in the AMPL syntax as
{ ... } -> [k ~ K, ...]

Best regards 

GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]