gave another tip for storing the matrix using an adjacent table,
coupled with many to many.
that's just how it is implemented in classes django,
class Answer (models.Model):
id_a = models.AutoField ('ID', primary_key = true)
answer = models.TextField ()
class Simptoms (models.Model):
Will there be more than one matrix? Or are you using "Name" to indicate
matrix membership, as opposed to column names and row names? If
so, a foreign key on a matrix table will be more storage efficient, since
matrix names will only need to be stored once.
Also, doesn't a select to do a lookup
create table Rows
(
Id int primary key,
Name text(255) not null
)
create table Cols
(
Id int primary key,
Name text(255) not null
)
create table Data
(
RowId int not null foreign key references Rows(Id),
ColId int not null foreign key references Cols(Id),
Data
)
On 8 апр,
You need one matrix table, having a row for each matrix.
You need one matrix_row table, having a row for each row of any matrix, mostly
containing a foreign key on the matrix table, showing of which matrix the row is
part, plus it's row number in that table.
And you need one matrix_row_values
I have now 2.21 at night, I live in Siberia.
city of Tyumen. so I will read the answers in 6 hours 8 only in the
morning when I wake up.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
No, no.
I need to store the matrix and dual array is ideal for this would come
up.
The problem is that the matrix will grow in size, thousands of entries
only on i, and where that same number of j.
create table is not an option.
only if the matrix transform and drive the table. and my question
If there is no Django model field for this, then one option would be
to create your own model field (http://docs.djangoproject.com/en/dev/
howto/custom-model-fields/). Of course, it would not be compatible
with most SQL Database types.
Of course, it may be easier to just rethink your data model.
Hi, I need help.
I know that in PostgreSQL, there is a type of data as arrays, and
double.
But I was unpleasantly surprised why there is no such models in
django.
The question is how do I get out of this situation?
I need to keep a two-dimensional matrix, and two-dimensional array
would be ideal
8 matches
Mail list logo