[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Database connectivity in MathProg
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Database connectivity in MathProg |
Date: |
Mon, 11 Feb 2008 01:59:47 +0300 |
> 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.
I think the latter case should be implemented, i.e. writing to the output
table should include DELETE and INSERT
> In a SQL table with key columns for any key combination of keys there can
> be only one record in the table.
AFAIK, this is not necessary.
> 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, ...]
Since tables are not deleted, information about key columns will be
kept. Let, for example, there is a table created as:
CREATE TABLE FOO
( I INT,
J CHAR(8),
P INT,
Q CHAR(20),
PRIMARY KEY(I, J)
);
Then the output table in MathProg might look like:
table mytab{i in S1, j in S2: i != j} OUT "..." "FOO":
i+1 ~ I, j ~ J, a[i,j+1]+123 ~ P, b[i-1,j] ~ Q;
which assumes deleting all existing records from table FOO and then
inserting new records:
INSERT INTO FOO(I, J, P, Q) VALUES(...)
- [Help-glpk] Database connectivity in MathProg, Ted Poe, 2008/02/01
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/04
- Re: [Help-glpk] Database connectivity in MathProg, xypron, 2008/02/08
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/09
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/09
- Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/09
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/09
- Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/10
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/10
- Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/10
- Re: [Help-glpk] Database connectivity in MathProg,
Andrew Makhorin <=
- Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/11
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/12
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/10
- Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/11
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/16
- Fwd: Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/17
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/17
- Re: [Help-glpk] Database connectivity in MathProg, glpk xypron, 2008/02/17
- Re: [Help-glpk] Database connectivity in MathProg, Andrew Makhorin, 2008/02/10
- RE: [Help-glpk] Database connectivity in MathProg, Meketon, Marc, 2008/02/10