views:

53

answers:

2

I've started to develop my own mini project in restaurant reservation to improve my Java skills.

At the moment, I create a table consists of

  • number of tables in the restaurant (column)

  • and time interval during the day
    (row).

So for example, if someone booked a table at 11:00 on Table 4, that cell will become reserved and mark as booked. And i should be able to separate the table of each day to be their own table so that i can select to view the today table or tomorrow table.

I created 3 MySQL table; 'customer', 'seat', and 'booking' table. Detail of each table in the fixture below.

The Problem is i have the idea on what i want to do, but i have no idea on how to bind the data from each table to the table in Netbeans. (I'm using NetBeans).

I'm asking for your idea on how to implement this!

Please see the images below.

alt text

alt text

A: 

You can use EJB 3 for that. Netbeans provide stubs generation from the tables you create.

+2  A: 

If you are trying to improve your skills, I would recommend to take a look to basic JDBC, for it is the base of database usage on Java. Once you have mastered that, you can go for EJB, hibernate & everything...

So now, you should read about JDBC, PreparedStatement, Connections, and if you are aiming web, Connection Pooling... (this would be a start to JDBC)

Good luck

SoulWanderer
so the only way i can implement the idea is to use the 'EJB' thing?
CHEMlSTRY
SoulWanderer