Instructions
The Prince William County Humane Center wants a database for storing information on their pets.
NOTE: Provide all your work as a single SQL file, with comments embedded. There must not be any errors in the SQL file
pet.sql
create table pet_info(petID number(4) primary key,petname
varchar(20),type_of_pet varchar(20),breed varchar(20),gender
varchar(10));
desc pet_info;
insert into pet_info values(101,'viral','cat','Russian
Blule','male');
insert into pet_info values(102,'Jenny','cat','Maine
Coon','female');
insert into pet_info values(103,'Jourge','cat','Russian
Blule','male');
insert into pet_info values(104,'Jackson','dogs','English
Mastiff','male');
insert into pet_info
values(105,'Jimmy','dogs','Boxer','female');
Select * from pet_info;
create table pet_appoint(appointid number(4) primary key,petID
number(4),datein date,dateout date);
desc pet_appoint;
insert into pet_appoint
values(201,102,'10-jan-2019','11-jan-2019');
insert into pet_appoint
values(202,101,'10-jan-2019','11-jan-2019');
insert into pet_appoint
values(203,103,'10-jan-2019','11-jan-2019');
Select * from pet_appoint;
Select distinct type_of_pet from pet_info;
Select distinct breed from pet_info where type_of_pet='dogs';
Select breed from pet_info where type_of_pet='cat' group by breed having count(*)=1;
output:
if you still have any Problem regarding this question please comment and if you like my code please appreciate me by thumbs up thank you.........
Instructions All documents and SQL code must be zipped into a single file and uploaded to...
write an SQL statement to list all the people in the Owner table, along with their pets' names if any. That is, for each pet an owner has, there will be a record containing the owner and the pet's name. For any owner contained in the Owner table, the output should always contain the owner's record even if no pets are associated with this owner. Hint: outer join/s may be needed. -- DROP TABLE PetAndOwner, Pet, PetType, Owner; CREATE TABLE...
Put all of your SQL code in a file named grades.sql and submit it below. Download the starter code, which contains import_grades.sql and the grades.csv file. Using he import_grades, sql file, create your database and table. - 0 eded. 1 T Une Modify the LOAD DATA INFILE to correct the path to load the grades.csv file, and add/remove LOCAL he only modification you may make to the import_grades.sql or the grades.csv files. The data represents grades for assignments in a...
ules for submission: 1. All problems must be solved using SQL code. The SQL code and the output of your query should be cut and pasted into your MS Word file. a. Output Tables must be screenshot from DBMS b. Do not create a MS Word (or other application) table and paste the results into it. c. With the exception of Problems 4, 5 and 6, all output should be the result of a single step. Do not paste outputs...
Write a C++ program for the instructions below. Please read the instructions carefully and make sure they are followed correctly. please put comment with code! and please do not just copy other solutions. Instructions 1. Read instructions carefully! 2. Use C++ syntax only, C syntax will not be accepted. 3. Always use braces to define blocks. 4. Indent all lines within a block. Each block requires one more tab. 5. Organize your code well with proper formatting and a single...
The goal of this homework is to write a small database system for an Animal Shelter. This is a no-kill shelter like the one just west of the Addition Airport. You will accept animal “donations” to the shelter, but mostly only dogs and cats. (But yes, there may be the occasional hamster or other nondog, non-cat animal donation.) At present, all we need to do is write the skeleton of a database that will track all the animals in the...
Must be written in JAVA Code Write a program that will read in a file of student academic credit data and create a list of students on academic warning. The list of students on warning will be written to a file. Each line of the input file will contain the student name (a single String with no spaces), the number of semester hours earned (an integer), the total quality points earned (a double). The following shows part of a typical...
In Java(using BlueJ) Purpose Purpose is to practice using file input and output, and array list of objects. Also, this lab specification tells you only what to do, you now have more responsibility to design how to do it. Problem description You are given a text file called 'Students.txt' that contains information on many students. Your program reads the file, creating many Student objects, all of which will be stored into an array list of Student objects, in the Students...
In Java(using BlueJ) Purpose Purpose is to practice using file input and output, and array list of objects. Also, this lab specification tells you only what to do, you now have more responsibility to design how to do it. Problem description You are given a text file called 'Students.txt' that contains information on many students. Your program reads the file, creating many Student objects, all of which will be stored into an array list of Student objects, in the Students...
Edit a C program based on the surface code(which is after the question's instruction.) that will implement a customer waiting list that might be used by a restaurant. Use the base code to finish the project. When people want to be seated in the restaurant, they give their name and group size to the host/hostess and then wait until those in front of them have been seated. The program must use a linked list to implement the queue-like data structure....
Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points). 1) Create “Enrollment” table. 2) Change the credits of “Database” course from 2 to 3. 3) List the course titles (not Course_No) and grades John Doe had taken. 4) Calculate average of Café Balance, and name new field as Average Balance. 5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled...