Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Java example with MySQL

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java example with MySQL

    had a problem with this, so I write to you

    Create a MySQL database library , with tables Knjige, Clanovi i Izdavanja.
    Table Knjige should contain data Id, Naslov, Opis, Autor, Izdavač, GodinaIzdavanja.
    Table Clanovi has columns Id, Ime, Prezime, MaticniBroj, DatumUclanjenja, Adresa, MestoStanovanja. .
    Table Izdavanja column contains Id, DatumIVremeIzdavanja, IdKnjige, IdClana, BrojDana.
    Create the appropriate class - Knjiga, Clan i Izdavanje - having the ability to manipulate certain tables within the database .
    All three classes must contain attributes that will keep the status of individual buildings . Attributes must match the type and name of the column in the tables .
    Make parameter constructor for each class . Do Override method toString ( ) to print the object state in plain text format .
    In all classes write methods for manipulating tables within the database :
    Method Getall to the database to read all the data, and returns a collection of objects of class in which it is located. This method should be static .
    Method GetByID from the database to read the data on the basis of the given ID. There is one argument of type int, and returns an object of the appropriate class . This method is also a class ( static ) .
    Method insert entered attribute values ​​of the new object in the database , update updates the data , and delete data deleted information from the database . These methods are called instances of the class , and not static . They have no input arguments and return no value .
    All exceptions should be processed within a class method using try / catch blocks
    Note : To successfully done the task , it is necessary to do a minimum of SQL script and at least one class . Submit an archive that contains NetBeans project and SQL script

    Here are all files, New WinRAR archive.rar
    Last edited by tomislav91; February 27th, 2014 at 06:04 PM.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Java example with MySQL

    Welcome! Please read this topic to learn how to post code correctly and other useful info for new members.

    We won't do it for you. Make an effort and come back when you have something you need help with.

    Thread closed.

Similar Threads

  1. Mysql with a java server
    By wood1master7 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 10th, 2013, 10:27 PM
  2. Java and mysql
    By bwisa in forum JDBC & Databases
    Replies: 2
    Last Post: November 7th, 2013, 05:15 AM
  3. JDBC JAVA MYSQL
    By kevthanewversi in forum JDBC & Databases
    Replies: 6
    Last Post: October 24th, 2013, 04:28 AM
  4. Java MySQL issues. Please HELP!
    By pinky4free in forum JDBC & Databases
    Replies: 1
    Last Post: December 22nd, 2012, 06:56 PM
  5. mysql in java applets
    By micro kid in forum JDBC & Databases
    Replies: 7
    Last Post: June 11th, 2012, 06:40 AM