• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet and sql

 
sello skhalo
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a database named
MyCustomers, with the following
tables using
MySQL. Use the appropriate data types
and note that the underlined fields
denotes a field to be either a primary key or a foreign key Customers(CustomerID, Name,
Address, City) Orders(OrderID, CustomerID, Amount,
Date) Insert at least 5 records in each of the
tables appropriately. Include the
output for your database design and
the records for your tables.


Write a Java program to establish
a connection to the MyCustomers
database using the JDBC driver to
retrieve the entire Customers and
Orders
table. Use the Swing component TextArea to display the data and your
interface must use either menu items
or command buttons to trigger the
actions for retrieving the data.

Write a servlet program that searches
for a customer in the database you
designed in Question above. If the
customer is not in the database, add
the customer details to the database
and display the message “Customer is added to the database”. If the
customer is in the database, display
the
message “Already Existing Customer”
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what's your question?
 
sello skhalo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
those are the questions,need to come up with the codings
will you please help me with them

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, you can get lots of help here.

Please post your code and point out the problems you are having with it. Please be sure to UseCodeTags when you post code.
 
Nam Ha Minh
Ranch Hand
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and don't try (and hope) to get someone doing exercises for you.
 
sello skhalo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well am clues and dont knw where to start
how to start but as for the coding i can try them
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first step is to create a DB - that has nothing to do with Java, or any kind of coding. It involves installing MySQL, and familiarizing yourself with it as much as you need in order to create DB.

The next step is to create a Java program using JDBC and Swing. If you aren't familier with them (which you should be through the course you took for which this is apparently a problem set), ask your teacher for some introductory material, or links to same.

The last step is to write a servlet that also accesses the DB through JDBC. If you haven't done that before, download a servlet container such as Tomcat, and familiarize yourself with it. Again, introductory material should be available through your teacher, or he should be able to point you to it.
 
sello skhalo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ohk ive already installed the SQL
can anyone instruct me on how to create the database...
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MySQL has very extensive online documentation that describes all the necessary steps and decisions to be made.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic