- Details
- Parent Category: Programming Assignments' Solutions
We Helped With This Database Programming Homework: Have A Similar One?

Category | Programming |
---|---|
Subject | MySQL | MSSQL | ORACLE |
Difficulty | College |
Status | Solved |
More Info | Sql Assignment |
Assignment Description
CS 4620/5620 Kresman Homework 6
Learning Outcomes: Build an application based on N-tier architecture
Similar to Homework 4, but the emphasis is on N-tier application framework. Unlike that homework, this application lets the user issue the query at run time. See (Resource and Notes) below on tables and query info.
Architect the application with three tiers: Client/user interface; business logic/server-side; and database.
User Interface (web) layout (‘Box’ values are input @ run time):
Your Name Box User name Box Password Box
Query 1 to run? Box
Query 2 to run? Box
Submit button
Response (web):
Authentication Success: YourName userName OR
Authentication Failure: YourName username
UsersQuery 1
UsersQuery 2
Output (of Query 1)
Output (of Query 2)
Exact copy of your form creation program
Exact copy of your form processing program
Print response web page to a pdf file and turn in the pdf file on Canvas
Notes
· Use our class Voyager a/c, php (or any other language), and (Voyager) MySQL
· Run the following two queries
o Print author name, address, book title, publisher date (NO time), publisher name
for titles between ‘R1’ and ‘T2’ (both inclusive) OR published within the last 60 days
o Print author name, age, address, title, publisher date, publisher address for all authors who have books
in 2015. (If an author has no book in 2014 the title and pub columns are NULL)
· (CS 5620) Output has metadata prior to the table output. Don’t hardcode or extract from form data
Resource
· Programs on Voyager: /home/classes/cs4620/lib/
· Homework6Data.sql (in above dir): has create/insert ready to go, for you to do interactive MySQL load.
· Googling
Grading Rubric
· Form not displayed: 25 points off
· Incorrect authentication success/failure/display of the two user queries: 20 points off
· Incorrect query output (6 points off each); Exact copy of the programs not in the output (8 points off)
Assignment Code
# auth book publ tables - similar to the class example
# SORRY for the cryptic attribute names and values!
# create three TABLES;
create table auth (AN char(2), AD char(2), AA int (2));
create table book
(BT char(2), BA char(2), BP char(2), publDate datetime not null);
create table publ (PN char(2), PD char(2));
# load the data in
insert into auth values ('A0', 'D0', 45);
insert into auth values ('A1', 'D1', 32);
insert into auth values ('A2', 'D2', 33);
insert into auth values ('A3', 'D3', 34);
insert into auth values ('A4', 'D4', 35);
insert into auth values ('A5', 'D5', 33);
insert into book values ('T1', 'A1', 'P4',
STR_TO_DATE('04/12/2015 04:03:35 AM', '%m/%d/%Y %r'));
insert into book values ('T2', 'A1', 'P2',
STR_TO_DATE('08/11/2015 04:03:35 PM', '%d/%m/%Y %r'));
insert into book values ('T3', 'A2', 'P2',
STR_TO_DATE('02/29/2016 04:03:35 PM', '%m/%d/%Y %r'));
insert into book values ('T4', 'A3', 'P2',
STR_TO_DATE('2015/10/10', '%Y/%m/%d '));
insert into book values ('T5', 'A2', 'P2',
STR_TO_DATE('2016/04/11', '%Y/%m/%d '));
insert into book values ('T6', 'A5', 'P3',
STR_TO_DATE('2015/01/01', '%Y/%m/%d '));
insert into book values ('T7', 'A2', 'P2',
STR_TO_DATE('03/13/2016', '%m/%d/%Y '));
insert into publ values ('P1', '1D');
insert into publ values ('P2', '2D');
insert into publ values ('P3', '3D');
insert into publ values ('P4', '4D');
Assignment Description
Hello world!
Hello world!
<?php
//Basic hello world massaged by html tags.
//Also shows how to print an html file in browser window
$hello = "Hello world!"; echo "<b>" . $hello . "</b> ";
$bigHello = "Hello world!"; echo "<h4>" . $bigHello . "</h4> ";
print "<xmp> ";
$printMyFileAsIs = file_get_contents('0hello.php');
echo $printMyFileAsIs;
?>