lonebyrd 0 Report post Posted April 21, 2007 In a game I'm working on, I would like to have a database of actors/actresses. I'm not sure exactly how to do this. I'm pretty sure with the hosting here, I can only have 99 databases. I'm a little lost as to how to make it. Can all the actors/actresses be put on one database with the specific things I want to include (i.e. how well the do in each genre)? I'm new to Mysql and just need some help as to where to start. Share this post Link to post Share on other sites
faulty.lee 0 Report post Posted April 21, 2007 In actual fact, 99 databases is more than enough. You only need mostly 1 database per application, not per requirement of that application. What you need more is probably the number of tables. Current limit of the number of tables per database for MySQL, which according to some forum i searched, it is in the order of billion. I bet you won't need that much table anytime in the future.For your case, i think to store those actors/actresses, you probably only need 1 table. Maybe a few more you have you a lot of things to keep, and some of which is duplicate, so you can split them into multiple table.To have a good start, I'll recommend MySql Cookbook by O'Reilly. It's a good book to get you starting, cause it target more about application than theory. Of cause you'll need some theory book to learn if you don't have the basics.Let me know if you can't find the book, I have a digital copy with me, and if you're not against piracy. If you can find one, buy it, it's worth it.Good Luck Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted April 21, 2007 In a game I'm working on, I would like to have a database of actors/actresses. I'm not sure exactly how to do this. I'm pretty sure with the hosting here, I can only have 99 databases. I'm a little lost as to how to make it. Can all the actors/actresses be put on one database with the specific things I want to include (i.e. how well the do in each genre)? I'm new to Mysql and just need some help as to where to start.Yes, all your actors/actresses can be pUt on only one database, also, in this database you can put other tables to store your categories, genres, etc.Bet regards, Share this post Link to post Share on other sites
yordan 10 Report post Posted April 21, 2007 More probably, you need a single database for everything.And for each game, or for each set of games, you need a single table.Eache player has a record in that table. The rows in that table will probably be the player unique ID, the player name, the player level reached, and the code for the game situation (an internal code, like 18AK16 meaning "reached level 18 wich one Abakus, one Keyboard ans 16 lives remaining). Share this post Link to post Share on other sites
vhortex 1 Report post Posted April 22, 2007 In a game I'm working on, I would like to have a database of actors/actresses. I'm not sure exactly how to do this. I'm pretty sure with the hosting here, I can only have 99 databases. I'm a little lost as to how to make it. Can all the actors/actresses be put on one database with the specific things I want to include (i.e. how well the do in each genre)? I'm new to Mysql and just need some help as to where to start.It will fit in one database.All the stats that you need can be put in one database table.Then one database table for the players.. You must plan accordingly ahead the data that you need to store, how long will you store them and how you will get the inputs and what dat must be stored from user inputs.First thing you must know is proper layouting of database columns since this will be the core of your program.------Then also decide how you link each data together. Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted April 27, 2007 It will fit in one database.All the stats that you need can be put in one database table.Then one database table for the players.. You must plan accordingly ahead the data that you need to store, how long will you store them and how you will get the inputs and what dat must be stored from user inputs.First thing you must know is proper layouting of database columns since this will be the core of your program.------Then also decide how you link each data together.That's correct, you must do it prior to any other task, even you do it you will tune it up on the road, i suggest to start with a logical and a physical model of your database and then start to code your application.Best regards, Share this post Link to post Share on other sites
ethergeek 0 Report post Posted April 27, 2007 (edited) Just an FYI point...if you use the default MySQL table type (MyISAM) you won't have support for foreign keys and won't be able to enforce referential integrity constraints, so make sure to set your table type to InnoDB. This can be a b1tch (I can't believe it censors that!) if you go through the hassle of normalizing your schema only to realize that your hard work had no effect on the query processor and you have no guarantee of the data being normalized, as the DBMS won't enforce RI constraints. Edited April 27, 2007 by ethergeek (see edit history) Share this post Link to post Share on other sites
lonebyrd 0 Report post Posted April 28, 2007 I was actually looking into getting a MySQL book, and was looking at the Cookbook by O'Reilly. I believe I've got some other programming books that are also O'Reilly. I'm glad to hear that someone is giving the thumbs up for that book. Now I think that will be the one I get. Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted April 29, 2007 I was actually looking into getting a MySQL book, and was looking at the Cookbook by O'Reilly. I believe I've got some other programming books that are also O'Reilly. I'm glad to hear that someone is giving the thumbs up for that book. Now I think that will be the one I get.You can download free books for MySql from the Tutorials Downloads website, also you can find there a lot of different books related to databases, php, multimedia, os's, compilers, etc.I'm not pretty sure but i think that i view the Cookbook there.Best regards, Share this post Link to post Share on other sites
lonebyrd 0 Report post Posted April 29, 2007 I looked into that site you mentioned, and you are correct. They did have the MySQL Cookbook there. Of course it's just my luck that it was a dead link. Some sort of error like 'Page not found'. But there does look like there could be some other stuff there I would like... If the pages work. Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted April 30, 2007 (edited) I looked into that site you mentioned, and you are correct. They did have the MySQL Cookbook there. Of course it's just my luck that it was a dead link. Some sort of error like 'Page not found'. But there does look like there could be some other stuff there I would like... If the pages work.My apologies, but, after all you are lucky. After a little research i found it as a torrent file, this is a 1.6GB torrent which includes a complete collection of O'Reilly Books. Right now i'm downloading only a few of them and if the download completes well i can share it later . Best regards,  Edit Well, only to say that the download completes correctly so if you want i can send you the book by mail, if someone else also wants this book please let me know to send it back. Edited May 3, 2007 by TavoxPeru (see edit history) Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted May 3, 2007 I looked into that site you mentioned, and you are correct. They did have the MySQL Cookbook there. Of course it's just my luck that it was a dead link. Some sort of error like 'Page not found'. But there does look like there could be some other stuff there I would like... If the pages work.Searching the MySql website i found a complete example of a database similar to the one you need, it's name is sakila and you can download it from here. Also, you can download more databases, examples and tutorials related to these examples by visiting the MySql Documentation page.Best regards, Share this post Link to post Share on other sites
unimatrix 0 Report post Posted May 3, 2007 While MySQL is the favorite, don't underestimate PostgreSQL. I like PostgreSQL for developing applications, but if I use ready made solutions, most of the time they are deployed on MySQL. I'd take a couple searches through Hotscripts.com and see what people have created and see if anything they have (purhaps for free) might work well for your purposes. It would save you a lot of time and effort of having to code from scratch. Anymore I find myself modifying what others have produced instead of starting for scratch. Given how many thousands of apps have been coded in php/MySQL these days... Share this post Link to post Share on other sites
lonebyrd 0 Report post Posted May 4, 2007 TavoxPeru, thanks for the link to the database. I will be looking into it more. And I agree with you unimatrix, about altering already existing scripts. I have done it a few times with PHP. It helps me in two ways. 1 by giving me a quick solution, and 2 helping me learn more about the PHP as I'm trying to alter it. I have been to hotscripts for other things, but I didn't think of looking up databases. Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted May 4, 2007 TavoxPeru, thanks for the link to the database. I will be looking into it more. And I agree with you unimatrix, about altering already existing scripts. I have done it a few times with PHP. It helps me in two ways. 1 by giving me a quick solution, and 2 helping me learn more about the PHP as I'm trying to alter it. I have been to hotscripts for other things, but I didn't think of looking up databases.You are welcome, and i agree too, i think that it is a good method for learning new things but sometimes there are more problems than solutions following this aproach.Best regards, Share this post Link to post Share on other sites