HI, yesterday  i send a message which asks of using an existing
database with Django.

Thanks to the guy who has answered me, but i have to explain a little
bit more my problem.

I 'm in charge of developping an astronomic images and metadata
database for scientists in mysql, composed by 9 tables with many
relations between them (one to one, many to many, one to many) and
among them there is image table which contains specific image field
implemented by mysql "the polygon class".
it permit to describe an astronomical image as a sky surface with 4
points in spherical coordinates, i mean a bounding box around a part
of the sky.It permit, for example, to know how many astronomic images
of the database contains "M31 galaxy" object.

Astronomic images are in the FITS format : there is headers containing
metadata and an other part for pixels data.

Here is for example the image table of the database

CREATE TABLE image (
 idimage INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
 Channel_idChannel INTEGER UNSIGNED NOT NULL,
 CalibrationKit_idCalibrationKit INTEGER UNSIGNED NOT NULL,
 Run_idRun INTEGER UNSIGNED NOT NULL,
 Instrument_idInstrument INTEGER UNSIGNED NOT NULL,
 SkyFootPrint MULTIPOLYGON NULL,
 AstromAccuracy DOUBLE PRECISION NULL,
 EQUINOX DOUBLE PRECISION NULL,
 Name VARCHAR(20) NULL,
 OBJECT VARCHAR(80) NULL,
 DATE_OBS  DATETIME NULL,
 EXPTIME  DOUBLE PRECISION NULL,
 AIRMASS DOUBLE PRECISION NULL,
 PHOT_C DOUBLE PRECISION NULL,
 Quality1 DOUBLE PRECISION NULL,
 QUALITY2 DOUBLE PRECISION NULL,
 IngestionFlags BIT(8) NULL,
 IngestionDate DATETIME NULL,
 ProcessingFlags BIT(8) NULL,
 LastProcessingDate BIT(8) NULL,
 ProcessingTimeZone CHAR(3) NULL,
 ReferenceChip INTEGER UNSIGNED NULL,
 PathURL VARCHAR(255) NULL,
 UTC_OBS TIME NULL,
 PRIMARY KEY(idimage),
 INDEX image_FKIndex1(Instrument_idInstrument),
 INDEX image_FKIndex2(Run_idRun),
 INDEX image_FKIndex3(CalibrationKit_idCalibrationKit),
 INDEX image_FKIndex4(Channel_idChannel)
)
TYPE=InnoDB;

I create the database structure myself and the database is feeded
using python scripts by scanning the headers of the images (containing
metadata and others astronomical informations) and fill the database.
But i need django to admin this database and to permit some users to
consult it, display images, do queries ..........

So many questions are present in my mind when i discovered what could
be done with django...

First and before the feeding of the database, after creating my
database in the mysql prompt by inserting SQL code could django
analyse my clean database and create class for each table?
with the right field type?
what happens if the field type does not exists in django ? (the case
of POLYGON TYPE)
is that mean that i can abandon or there is another way to go through
this...

How could i make django understand the relation between tables of my
database, primary and foreign keys as shown in my image table?

Coule it be done after the feed of the database or could i integrate
my python scripts into my django application structure?

i hope my explanations and questions will be understood...

Thanks

Greg
Astrophysic Institute of Paris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to