Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Soccer league program

 
Yinka Ige
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic