• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet and sql

 
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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”
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what's your question?
 
sello skhalo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MySQL has very extensive online documentation that describes all the necessary steps and decisions to be made.
 
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic