Project1 install mysql dbms and dblanguage connector

Assignment Help Data Structure & Algorithms
Reference no: EM13370575

Project:

1. install MySQL DBMS (and DB/language connector) software on your machine,

2. create World database using MySQL (using command files - NOT a Setup PROGRAM)

3. write a Java or C# or ... program to access the DB.

Batch processing is used:

• queries (data retrieval & update requests) are in a transaction file
• output sent to a log file.

Steps:

A. Download & install MySQL on your machine.

B. Download & install appropriate connector for MySQL which allows Java or C# to interact with a MySQL database.

C. SETUP [NOT A PROGRAM]: Use MySQL and the script files provided (which need a slight alteration) to create the WorldDB consisting of Country and CountryLanguage tables (though NOT the City table).

D. UserApp PROGRAM with 1 (or more) additional class (in separate file)

1. program does batch processing (using "INPUT STREAM Processing Algorithm" [that is, loop til EOF { read 1 transaction, then deal with it completely } ].

2. Trans file & Log file handling are done in main program or a separate UI class

3. 4 local methods (in UserApp), SelectHandler, InsertHandler, DeleteHandler, UpdateHandler - each takes the transaction line (when it' called upon by Main) and builds (somehow) the appropriate sqlString.

4. 2 methods in a SEPARATE CLASS, DBAccess (in a physically separate file), do actual SQL DB interaction:

a. RetrieveData for handling SELECTs
b. ChangeData for handling INSERTs & DELETEs & UPDATEs

For each transaction:

1. Echo original transaction request (from transaction file)

2. For INSERTs & DELETEs (but not SELECTs or UPDATEs),

show actual SQL statement which your program BUILT, which it sent to the DBS for processing

3. Show results from executing the "query" - i.e.,

a. a "table" for a SELECT
b. a reassurance message for changes: OK, INSERT done
OK, DELETE done
OK, UPDATE done
4. Write out a blank line.

Each transaction on a new line - 1st column is transCode: S, I, D, U (always caps).

S(elect) transactions (RETRIEVE data from DB)

- transaction data is an actual SQL statement to be used "as is".
    [This is not a common/proper programming approach, but time is short so...].

- Allow for 0 or 1 or Many ROWS to be returned to the program from the DB.

- rdr.FieldCount gives the number of COLUMNS there'll be for a result set

- "table" printed to TheLog file does NOT NEED TO:

- be in a box (e.g., like a typical interactive result in the command window)

- have column headings (but if it does,
    DON'T use what's in my demo program &
    DON'T hardcode the header labels (as my demo program does)

- be perfectly aligned since this SINGLE GENERIC METHOD doesn't know 
    what data type rdr[0] or rdr[1] or the other columns are.

U(pdate) transactions (CHANGE data in DB)
- transaction data is an actual SQL statement to be used "as is"

D(elete) transactions (CHANGE data in DB)
- transaction data is NOT an SQL statement
- your program has to construct it from the "parameters" supplied
- Basic format for a simple DELETE SQL statement:
    DELETE FROM Country WHERE Name = 'Disneyland'
  Transaction data (i.e., the parameters) would look like:
     D Country|Name|'Disneyland'

I(nsert) transactions (CHANGE data in DB)
   - transaction data is NOT an SQL statement
           - your program has to construct it from the "parameters" supplied using various string-handling methods (e.g., Split, +, etc.)
- 2 basic formats for simple SQL INSERT statements:

1) all-columns INSERT (so column names NOT specified in SQL statement):

INSERT INTO CountryLanguage VALUES ('USA','C#','F',0.01)
Transaction data (parameters) looks like:
I CountryLanguage|'USA','C#','F',0.01

2) some-columns INSERT (so column names MUST BE specified in SQL stmt):

INSERT INTO Country(Code, Name) VALUES ('HEX','Hexland')

Transaction data (parameters) looks like:

I Country|(Code, Name)|'HEX','Hexland'

Reference no: EM13370575

Questions Cloud

Question 1 the heliconius butterflies are a classic example : question 1 the heliconius butterflies are a classic example of muumlllerian mimicry. which of the following defines a
1 you have decided to invest in a portfolio that includes : 1. you have decided to invest in a portfolio that includes all companies in the dow jones industrials index. a list of
Readings regarding whether artefacts have politics and : readings regarding whether artefacts have politics and whether the machines can make history. read these two papers and
1obtaining the new script download and save the attached : 1.obtaining the new script download and save the attached comment cgi mailer script form-mail.pl to your servers
Project1 install mysql dbms and dblanguage connector : project1. install mysql dbms and dblanguage connector software on your machine2. create world database using mysql
Thread problem the eaters must give their dishes to the : thread problem the eaters must give their dishes to the dishwasher by putting them on a conveyor belt that has a
A screening test for a newly discovered disease is being : a screening test for a newly discovered disease is being evaluated. in order to determine the effectiveness of the new
Case - cost strcture and pricing sting ray poolvac inc : case - cost strcture and pricing sting ray poolvac inc. manufactures and sells a single product called the sting
Healthcare planning and marketing courseinformation to be : healthcare planning and marketing courseinformation to be research is on one of the top hospital in austintexas.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Analyze a basic set of requirements for a problem

Analyze a basic set of requirements for a problem - compose C language programs and compile a program using Microsoft Visual Studio 2012

  Design time randomized monte carlo algorithm

You have to design an O(n) time randomized Monte Carlo algorithm which computes an (1 + o)- approximate ham-sandwich cut with probability 1 - n-c for any given constant c > 0.

  Question about software importance

Determine what makes software so important and list a number of ways that software has an impact on our life.

  Discussion on data mining techniques

The tax authorities working for many governments are often confronted with challenge of detecting tax evasion and fraud. Suppose you work at income tax department.

  Learning for numeric prediction

Write down the output (class) values and number of instances that appear in each of the leaf nodes A, B and C of the tree - Learning for Numeric Prediction

  Designing a visual c-sharp program

Design a Visual C-Sharp program for an Ice Cream Shop. The program will store information about ice cream cones and customers.

  Compare the array-based and link-based implementations

Compare the array-based and link-based implementations of the ADT bag operation

  Interchange contents of working registers

Make a stack at 1000h and use the stack to interchange the contents of all of working registers. Exchange AX with DX, BX with CX, and DI with SI.

  Creating an hierarchy chart

Regal Brakes Corporation requires to automate its payroll calculation system. To compute payroll, first the gross pay is calculated, which is equal to the item of the number of hours and hourly rates.

  Edge connectivity of undirected graph-running maximum-flow

Illustrate how edge connectivity of undirected graph G = (V, E) can be determined by running maximum-flow algorithm on at most |V| flow networks, each having O(V) vertices and O(E) edges.

  Show the final shortest-path tree

draw a table showing the intermediate distance values of all vertices at each iteration of the algorithm; (ii) show the final shortest-path tree.

  Program to create huffman codes

Write a C++ program to create Huffman codes. Program input is a file called freq.txt (make up your own file for testing) that contains data on the characters in some cleartext file in the form of each character's non-zero frequency of occurrence i..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd