Java Reference
In-Depth Information
copies table Student1 into Student2 . Your task is to split a full name into
firstname , mi , and lastname for each record in Student1 and store a new
record into Student2 .
*32.10
( Record unsubmitted exercises ) The following three tables store information on
students, assigned exercises, and exercise submission in LiveLab. LiveLab is an
automatic grading system for grading programming exercises.
create table AGSStudent (
username varchar ( 50 ) not null ,
password varchar ( 50 ) not null ,
fullname varchar ( 200 ) not null ,
instructorEmail varchar ( 100 ) not null ,
constraint pkAGSStudent primary key (username)
);
create table ExerciseAssigned (
instructorEmail varchar ( 100 ),
exerciseName varchar ( 100 ),
maxscore double default 10 ,
constraint pkCustomExercise primary key
(instructorEmail, exerciseName)
);
create table AGSLog (
username varchar ( 50 ), /* This is the student's user name */
exerciseName varchar ( 100 ), /* This is the exercise */
score double default null ,
submitted bit default 0 ,
constraint pkLog primary key (username, exerciseName)
);
The AGSStudent table stores the student information. The ExerciseAssigned
table assigns the exercises by an instructor. The AGSLog table stores the grading
results. When a student submits an exercise, a record is stored in the AGSLog table.
However, there is no record in AGSLog if a student did not submit the exercise.
Write a program that adds a new record for each student and an assigned exercise
to the student in the AGSLog table if a student has not submitted the exercise.
The record should have 0 on score and submitted . For example, if the tables
contain the following data in AGSLog before you run this program, the AGSLog
table now contains the new records after the program runs.
AGSStuden t
username
ExerciseAssigned
instructorEmail
password
fullname
instructorEmail
exerciseName
maxScore
abc
p1
John Roo
t@gmail.com
t@gmail.com
e1
10
cde
p2
Yao Mi
e2
10
c@gmail.com
t@gmail.com
wbc
p3
F3
t@gmail.com
c@gmail.com
e1
4
c@gmail.com
e4
20
 
Search WWH ::




Custom Search