DBMS Create/Insert/Update SQL
I need the create, insert, and update SQL statement for this table:
| Customer | ||
| PK | Customer ID | Text |
| Phone Number | int | |
| name | text | |
| address ID | int | |
| text | ||
| FK | vendor ID | int |
Vendor is the name of the table the FK comes from.
In: Computer Science
Language Python
with functions and one main function
Write a program that converts a color image to grayscale. The user supplies the name of a file containing a GIF or PPM image, and the program loads the image and displays the file. At the click of the mouse, the program converts the image to grayscale. The user is then prompted for a file name to store the grayscale image in.
In: Computer Science
create a document in microsoft word or excel document which has the following:
Fictitious names and addresses of 10 folks including name, address and phone number. Recreate the bike table, which includes bike name, part number and hourly rate
Please limit your submission to no more than 2 pages.
In: Economics
draw vsepr and valence bond picture for C2H2? label the bonds. for each sigma bond name the two orbitals that overlap to form it? for each pi bond name the two orbitals that overlap to form it. why are to pi ponds perpindicular to each other. why are quadruple bonds unlikely? Please label thank you.
In: Chemistry
Description
In C#
Further enhance the registration program for Continental University.
Existing Code:
class Program {
static void Main() {
Student s = new Student();
Console.WriteLine("Welcome to the Continental University Registration System!");
Console.WriteLine("Enter data about a student");
Console.Write("First Name: ");
string firstName=Console.ReadLine();
Console.Write("Last Name: ");
string lastName=Console.ReadLine();
Console.Write("Credits Taking: ");
int credits=Convert.ToInt32(Console.ReadLine());
s.firstName=firstName;
s.lastName=lastName;
s.credits=credits;
Console.WriteLine(s);
}
}
class Student {
public string firstName;
public string lastName;
public int credits;
public override string ToString(){
return lastName+", "+firstName+" Credits Taking: "+credits;
}
}
Sample Dialog
Welcome to the Continental University Registration System!
Enter data about a student
First Name: Mary
Last Name: Smith
Gender (M/F): f
Residency (I/O): i
Credits Taking: 18
Entrance Date: 12/13/2018
Mr. Smith, Mary Credits Taking: 18 Entrance: 12/13/2018 In-state
Do you want to quit (Y/N)?: n
Enter data about a student
First Name: LERNIE
Last Name: BLAKE
Gender (M/F): X
Gender (M/F): M
Residency (I/O): X
Residency (I/O): O
Credits Taking: 12
Entrance Date: 10/01/2018
Mr. Blake, Lernie Credits Taking: 12 Entrance: 10/01/2018 Out-state
Do you want to quit (Y/N)?: Y
Thank you for using the Registration System!
In: Computer Science
A college records the module registration information of their students in a database named College.mdb,which contains three tables,STUDENT,MODULE andMODULE_REG. A student may enroll in the same module as many times as they like. However, they can only enroll each module at most once in each semester. The design of the three tables are shown below:
Table STUDENT
|
Field Name |
Data Type |
Note |
|
SID |
Short Text |
primary key |
|
FirstName |
Short Text |
|
|
LastName |
Short Text |
|
|
Contact |
Short Text |
|
|
Gender |
Short Text |
“M” or “F” |
Table MODULE_REG
|
Field Name |
Data Type |
Note |
|
StudentID |
Short Text |
|
|
ModuleCode |
Short Text |
|
|
Year |
Number |
|
|
Semester |
Number |
|
|
Score |
Number |
Table MODULE
|
Field Name |
Data Type |
Note |
|
ModuleCode |
Short Text |
primary key |
|
ModuleName |
Short Text |
Download the database file College.mdbfrom Moodle. Rename it as College_Lxx_syyyyyy.mdb(where Lxxis your class andsyyyyyyis your student number, e.g. College_L01_s170001.mdb/College_L01_s170001.accdb) and complete the following tasks.
(a) Create a primary key of the table MODULE_REG. (1 mark)
(b) Establish the relationships between the tables STUDENT,MODULE andMODULE_REG. (1 mark)
(c) Create queries to perform the following tasks:
(ii) Display the total number of students in each gender. Save the query as Q2.
Produce a list of module codes, module names, student names
(including both first name and last name), and student IDs of
enrolled students for all modules with module codes beginning with
“COM” being registered in the firstsemester of
2019. Arrange the records in
ascendingorder of module codes. Save the query as
Q4.
Note: You mustnotshow the
semester and the year in the output.
In: Computer Science
This is the homework given by the teacher. I don't have more information
Complete the below code so that your program generates a random walk on the given graph. The length of your walk should also be random.
/******************************************************************/
#include
#include
#include
typedef struct NODE_s *NODE;
typedef struct NODE_s{
char name;
NODE link[10];
}NODE_t[1];
#define nodeA 0
#define nodeB 1
#define nodeC 2
#define nodeD 3
#define nodeE 4
#define nodeF 5
int main() {
srandom(time(NULL));
//printf("%d\n", random());
NODE_t node[6];
node[nodeA]->name = 'A';
node[nodeB]->name = 'B';
node[nodeC]->name = 'C';
node[nodeD]->name = 'D';
node[nodeE]->name = 'E';
node[nodeF]->name = 'F';
int i, j;
for (i = 0; i < 6; i++) {
for (j = 0; j < 10; j++) {
node[i]->link[j] = NULL;
}
}
//a -> c,d,e,f.
node[nodeA]->link[0] = node[nodeC];
node[nodeA]->link[1] = node[nodeD];
node[nodeA]->link[2] = node[nodeE];
node[nodeA]->link[3] = node[nodeF];
//b -> c,f.
node[nodeB]->link[0] = node[nodeC];
node[nodeB]->link[1] = node[nodeF];
//c -> a,b,e.
node[nodeC]->link[0] = node[nodeA];
node[nodeC]->link[1] = node[nodeB];
node[nodeC]->link[2] = node[nodeE];
//d -> a,e,f.
node[nodeD]->link[0] = node[nodeA];
node[nodeD]->link[1] = node[nodeE];
node[nodeD]->link[2] = node[nodeF];
//e -> a,c,d.
node[nodeE]->link[0] = node[nodeA];
node[nodeE]->link[1] = node[nodeC];
node[nodeE]->link[2] = node[nodeD];
//f -> a,b,d.
node[nodeF]->link[0] = node[nodeA];
node[nodeF]->link[1] = node[nodeB];
node[nodeF]->link[2] = node[nodeD];
//Random walk.
int choice = random() % 6;
printf("%c\n", node[choice]->name);
return 0;
}
/******************************************************************/
In: Computer Science
In: Computer Science
In: Mechanical Engineering
Ice Cream Program Assignment
Write a program that uses a function to ask the user to choose an ice cream flavor from a menu (see output below.) You must validate the users input for the flavor of ice cream accounting for both upper and lower-case letters. You must give them an appropriate error message and allow them to try again. Once you have a valid flavor, your function will return the flavor back to the main() function.
Your main() function will then ask for the number of scoops. You must validate this data! Make sure that the user chooses at least 1 scoop but no more than 4. If they try another other, you must give them an error message and allow them to try again.
Your program will then calculate and display the cost of the ice cream. The cost of ice cream is $ .75 for the cone and $1.25 per scoop.
Your program will continue asking customers for the flavor and number of scoops until they choose ‘Q’ to quit.
The program will then send all of the data to a function to display the total number of cones sold, the total amount collected, and the total scoops of each type of ice cream sold.
Sample Output:
Please Choose your Favorite Flavor!
V - Vanilla
C - Chocolate
F - Fudge
Q - Quit
-----> v
How many scoops would you like? 2
Your ice cream cone cost $ 3.25 Please Choose your Favorite Flavor!
V - Vanilla
C - Chocolate
F - Fudge
Q - Quit
-----> c
How many scoops would you like? 5
That is an invalid number of scoops! You may only choose between 1 and 4
Please try again!
How many scoops would you like? 0
That is an invalid number of scoops! You may only choose between 1 and 4
Please try again!
How many scoops would you like? 3
Your ice cream cone cost $ 4.50 Please Choose your Favorite Flavor!
V - Vanilla
C - Chocolate
F - Fudge
Q - Quit
-----> s
How many scoops would you like? 1
Your ice cream cone cost $ 2.00 Please Choose your Favorite Flavor!
V - Vanilla
C - Chocolate
F - Fudge
Q - Quit
-----> q
The total number of cones sold: 3
The total scoops of vanilla sold: 2
The total scoops of chocolate sold: 3
The total scoops of fudge sold: 1
The total amount collected: $ 9.75
In: Computer Science