Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A database stores the information of all items sold in an electronics store. Data type Item (items sold in the electronics store) Attribute Model Brand

image text in transcribedimage text in transcribed

A database stores the information of all items sold in an electronics store. Data type Item (items sold in the electronics store) Attribute Model Brand Price Stock SupplierID varchar(30) varchar(30) Integer Integer varchar(10) SupplierOfitem (Suppliers of different items, an item can have more than one supplier) Attribute Data type SupplierID varchar(10) Model varchar(30) SupplierPrice integer Complete the following JSP that list out the items with stocks less than the specified stock level together with the information of the suppliers. The specific stock level is given as a parameter named stockLevel. Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc: mysql://localhost:3306/javadb"; Connection con = DriverManager.getConnection(uri, "dbuser", "secret"); content="text/html; Electronics store // Add code here %> The following example shows the content when the request URL is: http://localhost:8080/web/index.jsp?stockLevel=500 Item: Model: M123 Brand:Brand A Price:150 Stock:320 Suppliers: Supplier ID Supplier Price Si 45 S2 55 Model: M223 Brand:Brand B Price: 1500 Stock:12 Suppliers: Supplier ID Supplier Price Si 600 S2 540 The table illustrated that only two products have stocks less than 500. A database stores the information of all items sold in an electronics store. Data type Item (items sold in the electronics store) Attribute Model Brand Price Stock SupplierID varchar(30) varchar(30) Integer Integer varchar(10) SupplierOfitem (Suppliers of different items, an item can have more than one supplier) Attribute Data type SupplierID varchar(10) Model varchar(30) SupplierPrice integer Complete the following JSP that list out the items with stocks less than the specified stock level together with the information of the suppliers. The specific stock level is given as a parameter named stockLevel. Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc: mysql://localhost:3306/javadb"; Connection con = DriverManager.getConnection(uri, "dbuser", "secret"); content="text/html; Electronics store // Add code here %> The following example shows the content when the request URL is: http://localhost:8080/web/index.jsp?stockLevel=500 Item: Model: M123 Brand:Brand A Price:150 Stock:320 Suppliers: Supplier ID Supplier Price Si 45 S2 55 Model: M223 Brand:Brand B Price: 1500 Stock:12 Suppliers: Supplier ID Supplier Price Si 600 S2 540 The table illustrated that only two products have stocks less than 500

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago

Question

Evaluate the impact of unions on nurses and physicians.

Answered: 1 week ago

Question

Describe the impact of strikes on patient care.

Answered: 1 week ago

Question

Evaluate long-term care insurance.

Answered: 1 week ago