Database engine

Started by
10 comments, last by LorenzoGatti 14 years, 1 month ago
Me and my friends are making a Simulation Game based on football.We are not very clear about how should we use Databases with Objects.There are various ORM frameworks but I'm not really comfortable with any of them.What would be the ideal way to store large amount of stats related data Files or Databases....If Databases then can any1 suggest DB engines with python which can be most effective
Advertisement
I use MySQL primarily. It works with python. Tutorials for creating and using a SQL database are aplenty. Also, learning about the first three normal forms is imperative.
Today we have found about Zope an object Database.Now I really don't know how effective Zope is in terms of performance but it looks a good option.But the problem is, it's in development stages and right now we can't foresee if it will lead to problems.Has anyone used Zope or know about problems related to it gamedev
I second MySQL, it's great, flexable, fast and easy to use.

PureBlackSin
For Games, Articles and Custom High End Computers, come visit.Myndoko
SQLAlchemy is probably what you need. Pair that with MySQL or PostgreSQL if you need a proper DB and good performance. SQLite will suffice if it's just for a small and simple game that doesn't need to scale.

To tell you more than that would require you to ask a much more specific question.
Yes you are right.The problem is that the whole coding will be OOP.If we use relational DB then I really dunno how effective that method can be.There's a shelve module in python which can be used to do this relational and object interaction....so far I'm still learning it and seeing if I can effectively use queries with multiple parameters complex queries....Since the game is sports based and I have myself never really done files programming, I am more inclined towards having a Database.It's like some team breaks their losing streak after 4-5 games..then such results I easily see how I will implement it using a query...today one of my friends came across Zope an object databases non-relational....this looks good option on paper...but I really have no idea wat hassles it can introduce....another thing is the o/p in Zope is given in format which suits python so processing will be simpler..Yet to try SQLAlchemy
Quote:Original post by gamutree
Yes you are right.The problem is that the whole coding will be OOP.If we use relational DB then I really dunno how effective that method can be.

Not very effective, if you're not careful.

Object-relational impedance mismatch

Quote:There's a shelve module in python which can be used to do this relational and object interaction...

Shelve is a good module for what it is, but there's absolutely nothing relational about it.

Generally speaking the only real problem with OOP and databases comes in where you try to use inheritance-based polymorphism. Luckily in practice I rarely come across code where I need to persist those different objects to the database. And where I do, it can often be solved by moving to composition instead of inheritance, for example.
@Kylotan

Thanks for your reply and the link. The thing about shelve I meant was that using it I can talk to Database.

I had used NHibernate for a web related project and I found it pretty useful in terms of development.Maybe I was exposed way too early before realizing native SQL powers.One of mates told me about Zope an Object based database and that looks an interesting option.I wonder how so far there's not a dedicatad Database system for games.
@Kylotan

Thanks for your reply and the link. The thing about shelve I meant was that using it I can talk to Database.

I had used NHibernate for a web related project and I found it pretty useful in terms of development.Maybe I was exposed way too early before realizing native SQL powers.One of mates told me about Zope an Object based database and that looks an interesting option.I wonder how so far there's not a dedicatad Database system for games.
Games in general don't need their own database system. There's nothing specific to game storage that isn't important for other apps. It's always just a tradeoff between performance and ease of access. SQLite is fine if you just want local storage that needs to be queryable with SQL, and if you need even more speed than that, then you'll probably go with a binary serialised format.

This topic is closed to new replies.

Advertisement