数据库代写 | CS157B:   Spring 2021 HW2

本次数据库代写的主要内容是完成一些SQL查询语句的编写

CS157B:   Spring 2021

HW #2:      Embedded Static & Dynamic SQL (70 Points)

Due Date:  Mar 11, 2021

 

Description:

 

Write an embedded static & dynamic SQL program to perform a “SELECT * FROM table_name” from any database.  Use sample2.sqc and HW#1 as your starting point.

 

Project Specification:

 

“hw2 database_name table_name”

 

Database_name – any valid database name within Db2 (e.g. SAMPLE)

 

Table_name – any valid table_name within the Database_name (e.g. employee, dept, sales, inventory, …)

 

You will submit a hw2.sqc file and a readme.hw2 file.

 

A few helpful commands:

 

db2 “connect to sample”

 

To show which tables are in the sample database:

db2 “list tables”

or

db2 “list tables for schema db2inst1”

 

To show the schema for a specific table like sales:

db2 “describe table sales”

or

db2 “describe table db2inst1.sales”

 

If you run you program (after PREP & compile steps) like:

./hw2 sample sales

 

Your output should look just like as you execute the db2 “select * from sales” command from the container window after you connect to sample.  This is an easy way to verify your program.  If you notice the output, strings are left justified, and numbers are right justified.  You can use the static SQL to connect and query the catalog shown in sample2.sqc.  However in order for you to complete this assignment, you will need to build dynamic SQL statement based on the table name which you accept from the command line.


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


blank

本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: itcsdx@outlook.com  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank

发表评论