1 / 3

PRG 421 Week 5 Individual Assignment Coding a Program Containing JDBC//tutorfortune.com

PRG 421 Week 5 Individual Assignment Coding a Program Containing JDBC//tutorfortune.com<br><br>Click on below link to buy<br>https://tutorfortune.com/products/prg-421-week-5-individual-assignment-coding-a-program-containing-jdbc<br><br>Resource:<br>u2022t"Starter Code to Access Tables via JDBC" text file<br>For this assignment, you will create Javau2122 code that accesses a relational database, requests data, and then analyzes and displays a portion of that data.<br>Imagine a MySQL relational database schema named COMPANY_DB containing two tables, employee_table and payroll_table, such that the records in each of the tables is as follows:<br>u2022temployee_table:<br>Emp idtFName tLNnametAddrtCitytStatetZip<br>100tJacktSmitht123 NorthtTopekat KSt66603<br>101tJoetApplet4 StreettDenvertCOt80202<br>111tNancytGoodt45 SWtHartfordtCTt06103<br>121tTomtWhatevert89 NEtDovertDEt19901<br>122tJimtThompsont789 W 95tAlbanytNYt12207<br>123tTommytBoysont154 BolttBostontMAt02201<br>125tJohntJonest47 WesttLincolntNEt68502<br>u2022tpayroll_table:<br>Emp idtPayscht401ktSpouse<br>100tBiWktyestyes<br>101tBiWktyestyes<br>111tMonthlytnotno<br>121tWklytpendingtyes<br>122tWklytyestno<br>123tMonthlytpendingtno<br>125tMonthlytnotyes<br> <br>The credentials you will need to access the database which holds both of the tables are as follows:<br>u2022tHost string = localhost:3306<br>u2022tUsername = student<br>u2022tPassword = prg421<br>Copy and paste the linked Javau2122 "starter" code into the NetBeans editor and save as a JAVA file.<br>Add Javau2122 statements to the file to accomplish the following:<br>u2022tEstablish a connection to the database<br>u2022tQuery the database, joining the two tables on the Emp_id field<br>u2022tDisplay your name and today's date on the console along with the following returned database results:<br>otemployee identification number<br>otfirst and last name<br>otstate<br>otpayroll schedule<br>ot401k plan<br>u2022tClose the database connection<br>Identify and correct any compile-time errors that exist in the starter code.<br>Note: Because you will not be connecting to an actual database, some compiler errors will remain.<br>After you finish, rename your JAVA file with a .txt extension using the following naming convention:<br>u2022tPRG421_Week5CodingAssignment_LastnameFirstname.txt.<br>Submit your TXT file to the Assignment Files tab.<br><br>Click on below link to buy<br>https://tutorfortune.com/products/prg-421-week-5-individual-assignment-coding-a-program-containing-jdbc<br>

xafi
Download Presentation

PRG 421 Week 5 Individual Assignment Coding a Program Containing JDBC//tutorfortune.com

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PRG 421 Week 5 Individual Assignment Coding a Program Containing JDBC//tutorfortune.com Click on below link to buy https://tutorfortune.com/products/prg-421-week-5-individual-assignment-coding-a-program- containing-jdbc R e s o u r c e : " S t a r t e r C o d e t o A c c e s s T a b l e s v i a J D B C " t e x t fi l e  F o r t h i s a s s i g n me n t , y o u w i l l   c r e a t e   J a v a ™ c o d e t h a t a c c e s s e s a r e l a t i o n a l d a t a b a s e , r e q u e s t s d a t a , a n d t h e n a n a l y z e s a n d d i s p l a y s a p o r t i o n o f t h a t d a t a . I ma g i n e   a My S Q L r e l a t i o n a l d a t a b a s e s c h e ma n a me d C O MP A N Y _ D B c o n t a i n i n g t w o t a b l e s , e mp l o y e e _ t a b l e a n d p a y r o l l _ t a b l e , s u c h t h a t t h e r e c o r d s i n e a c h o f t h e t a b l e s i s a s f o l l o w s : e mp l o y e e _ t a b l e :  Em p id FName LNname Addr City State Zip 123 North 100 Jack Smith Topeka KS 66603 101 Joe Apple 4 Street Denver CO 80202 111 Nancy Good 45 SW Hartford CT 06103 121 Tom Whatever 89 NE Dover DE 19901 789 W 95 122 Jim Thompson Albany NY 12207

  2. 154 Bolt 123 Tommy Boyson Boston MA 02201 47 West 125 John Jones Lincoln NE 68502 p a y r o l l _ t a b l e :  Emp id Paysch 401k Spouse 100 BiWk yes yes 101 BiWk yes yes Monthl y 111 no no 121 Wkly pending yes 122 Wkly yes no Monthl y 123 pending no Monthl y 125 no yes   T h e c r e d e n t i a l s y o u w i l l n e e d t o a c c e s s t h e d a t a b a s e w h i c h h o l d s b o t h o f t h e t a b l e s a r e a s f o l l o w s : H o s t s t r i n g =   l o c a l h o s t : 3 3 0 6 U s e r n a me =   s t u d e n t  

  3. P a s s w o r d =   p r g 4 2 1  C o p y   a n d   p a s t e   t h e l i n k e d J a v a ™ " s t a r t e r " c o d e i n t o t h e N e t B e a n s e d i t o r a n d s a v e a s a J A V A fi l e . A d d   J a v a ™ s t a t e me n t s t o t h e fi l e t o a c c o mp l i s h t h e f o l l o w i n g : E s t a b l i s h a c o n n e c t i o n t o t h e d a t a b a s e Q u e r y t h e d a t a b a s e , j o i n i n g t h e t w o t a b l e s o n t h e E mp _ i d fi e l d D i s p l a y y o u r n a me a n d t o d a y ' s d a t e o n t h e c o n s o l e a l o n g w i t h t h e f o l l o w i n g r e t u r n e d d a t a b a s e r e s u l t s : e mp l o y e e i d e n t i fi c a t i o n n u mb e r fi r s t a n d l a s t n a me s t a t e p a y r o l l s c h e d u l e 4 0 1 k p l a n C l o s e t h e d a t a b a s e c o n n e c t i o n    o o o o o  I d e n t i f y   a n d   c o r r e c t   a n y c o mp i l e - t i me e r r o r s t h a t e x i s t i n t h e s t a r t e r c o d e . N o t e :   B e c a u s e y o u w i l l n o t b e c o n n e c t i n g t o a n a c t u a l d a t a b a s e , s o me c o mp i l e r e r r o r s w i l l r e ma i n . A f t e r y o u fi n i s h ,   r e n a me   y o u r J A V A fi l e w i t h a . t x t e x t e n s i o n u s i n g t h e f o l l o w i n g n a mi n g c o n v e n t i o n : P R G 4 2 1 _ We e k 5 C o d i n g A s s i g n me n t _ L a s t n a me F i r s t n a me . t x t .  S u b mi t   y o u r T X T fi l e t o t h e A s s i g n me n t F i l e s t a b . Click on below link to buy https://tutorfortune.com/products/prg-421-week-5-individual-assignment-coding-a-program- containing-jdbc

More Related