0

I am trying/lerning to make application in python that will have information about universitys and their departments.

The problem I have is that I want to use data models, (I know very little about them).

I want to have two databases. One will contain departments, while other will contain universitys and list of departments.

Thanks for help!!!


Thanks for fast answers. I found some tutorials like: http://www.youtube.com/watch?v=rRCx9e38yr8&list=PLDA31F43DE4107B05 http://blog.notdot.net/2010/10/Modeling-relationships-in-App-Engine

and I started reading them, and some thing are having more sense.

casperOne
  • 73,706
  • 19
  • 184
  • 253
depecheSoul
  • 896
  • 1
  • 12
  • 29
  • 2
    Have you seen Google's page on [data modeling](https://developers.google.com/appengine/docs/python/datastore/datamodeling)? Maybe you can learn more about data models there. – Kevin Aug 22 '12 at 15:01
  • Specifics of the model (don't get caught up in relational modeling if you planning to use the datastore) will depend heavily on what you are doing. Are you likely to have large amounts of writes to the datastore at the department level. What do you want to do with the data? That will help design an appropriate relation ship model. The two approaches that stick out are University is an ancestor of each department, or departments have a reference property to the University. Give us some more info on what you want to do and you can get some more specific examples. – Tim Hoffman Aug 23 '12 at 01:10

1 Answers1

0

In case you are referring to the structure of your database you might want to read more about E-R Diagrams and Relational Database. I can brief you with the relational database model which might be useful in your case. At minimum I think it can have three tables in the same database. One for the Department ids mapping to the universities. Another one mapping the departments with course names and unique ids to the departments which offer that course. And the third one mapping the unique student ids with the course ids. Then you can have additional tables mapping from student information to student id. And professor ids with professor info, professor ids with course ids which they would be teaching....and this can go on based on the data you want to store.

Also keep in mind in case you want to create foreign keys for the ids you should use InnoDB Engine as MyISAM doesnot allow foreign keys.

Ankit
  • 55
  • 1
  • 4
  • 1
    OP is using Google App Engine's datastore, not MySQL. The datastore is not a relational database, and nothing you said here applies. – Wooble Aug 23 '12 at 14:53