aspose file tools*
The moose likes JDBC and the fly likes Soccer league program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Soccer league program" Watch "Soccer league program" New topic
Author

Soccer league program

Yinka Ige
Greenhorn

Joined: Mar 30, 2013
Posts: 4
Hi guys, I'm new to java jdbc but I can write basic programs with it. I need help writing a soccer league program that can create a league with any number of teams, populate the league table with scores of matches played between the teams. But I'm clueless as to how to start. So I'll appreciate any help I can get from you guys. Thanks in advance.
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1024
    
    5

Forget JDBC. Your first task should be to design a data model which describes your objects and their relationships. Refine this model before you start and then create your tables, constraints etc based upon this model. At this point, you will then have a database to use with JDBC.
Yinka Ige
Greenhorn

Joined: Mar 30, 2013
Posts: 4
Thanks a lot James, that was pretty insightful. I am starting to look at it from a different angle. I appreciate your help a lot but if it would not be too much to ask, can you use a simple example to illustrate your point?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38910
    
  23
And welcome to the Ranch
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1024
    
    5

OK, simple example for your soccer league.

A Player will have a name, an age, a position and the team they play for.

A Team will have a name, a manager and a league it plays in.

So, you may have a Player table with columns name, age, position and team_id. You may also have a Team table with columns name, manager name and league_id.

This is a very basic example just to show you the way you should be thinking before your database is created.
Yinka Ige
Greenhorn

Joined: Mar 30, 2013
Posts: 4
That was an eye-opener. I'm so grateful James, I'm on it already. When I finish the program I hope to inbox you a copy. Thanks again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Soccer league program