Question

In: Computer Science

Create your own data. Ensure the data will test all criteria and prove all sorts worked...

Create your own data. Ensure the data will test all criteria and prove all sorts worked as required. Be sure that all tables and queries have descriptive names. “Query 1” and “Step 1” are examples of poor names.

Step 1

Build a Database named DBMS Course Project. The database should include the following tables:

  • First Table – Students
    • ID
    • First Name
    • Last Name
    • Address
    • City
    • State
    • Zip Code
    • Phone Number with area code
  • Second Table – GPA
    • ID Current GPA (two decimal positions)
    • Class (numeric field, 1 = Freshman, 2 = Sophomore, etc.)
      • Freshman
      • Sophomore
      • Junior
      • Senior
      • Graduate Student
  • Third Table – Scholarships
    • ID
    • Major course of study
    • Academic Scholarship (Use Yes/No data type)
    • Athletic Scholarship (Use Yes/No data type)

Step 2

Extract the First and Last Name, Address, City, State, Zip Code and Phone Number of each Senior on the database. Sort by Last Name, then First Name (1 sort).

Step 3

Extract the First and Last Name, and GPA of each student who qualifies for the Dean’s List. Sort by GPA, then Last Name, then First Name (1 sort). A GPA of 3.25 is required to make the Dean’s List.

PART 2

Build a query of all students on athletic scholarship. Additionally, produce a report with descriptive report and column headings. Be sure there is enough data to prove the selection and sort worked as required. Submit the database in unzipped format as well as submitting screenshots of the query and the report.

Step 1

Extract the First and Last Name, Student ID, Course Major and GPA of all students on athletic scholarship. Sort by Course Major, Last Name, then First Name in a single sort.

Step 2

Produce a report with the data from Step 1 and use good headings.

Solutions

Expert Solution

PART 1

The SQL code to create the given tables and query to extract data is given below.


Step 1: Three tables are created namely Students, GPA and Scholarships. Each table has primary key and associated foreign key. All necessary conditions are meeting.


CREATE TABLE Students
(
   ID       INT,
   FirstName   VARCHAR(50),
   LastName   VARCHAR(50),
   Address       VARCHAR(255),
   City       VARCHAR(50),
   State       VARCHAR(25),
   ZipCode       VARCHAR(5),
   Phone       VARCHAR(15),
   PRIMARY KEY (ID)
);

CREATE TABLE GPA
(
   ID       INT,
GPA       DECIMAL(3,2),
   Class       INT,
   PRIMARY KEY ID,
   FOREIGN KEY (ID) REFERENCES Students(ID)
);

CREATE TABLE Scholarship
(
   ID       INT,
   MajorCourse   VARCHAR(50),
   AcademicScholarship ENUM('Yes','No'),
   AthleticScholarship ENUM('Yes', 'No'),
   PRIMARY KEY (ID),
   FOREIGN KEY (ID) REFERENCES Students(ID)
);

Step 2: Table Students and GPA are joined to extract the records. Order by clause is used to sort the result as specified.


SELECT FirstName, LastName, Address, City, State, ZipCode, Phone
FROM Students INNER JOIN GPA
ON Students.ID = GPA.ID
WHERE GPA.Class = 4
ORDER BY LastName, FirstName;

Step 3: Table Students and GPA are joined on common attribute ID.


SELECT s.FirstName, s.LastName, g.GPA
FROM Students AS s INNER JOIN GPA AS g
ON s.ID = g.ID
WHERE g.GPA >= 3.25


Related Solutions

Test, state and prove a theorem that defines a set of minimum congruence criteria for each...
Test, state and prove a theorem that defines a set of minimum congruence criteria for each of the following quadrilaterals: parallelograms, rectangles, and rhombi.
Create your own data type using a C++ structure. Assign values to a variable of that...
Create your own data type using a C++ structure. Assign values to a variable of that data type. Retrieve values from the variable of that data type. Description: In this lab you will choose the statements to create a program that: Creates a brand new data type called "Monster". Once created, creates a variable of type Monster and assign values to the variable and then display the contents. This lab will again take the form of a guided multiple-choice quiz...
Describe in your own works Criteria of Causation and how it relates to exposure and a...
Describe in your own works Criteria of Causation and how it relates to exposure and a suspected risk factor? (EPIDEMIOLOGY)
Create your own Java program that has all three of these components in its design: Includes...
Create your own Java program that has all three of these components in its design: Includes file input OR file output (one of the two) Uses token-based processing of String, int, double, or boolean (your choice) Incorporates two additional methods in addition to the main() method: one that's a value-returning method, the other a void.
Create your own example of a misleading statistic.
Create your own example of a misleading statistic. Explain the context of the data, the source of the data, the sampling method that you used (or would use) to collect the data, and the (misleading) conclusions that would be drawn from your example. Be specific in explaining how the statistic is misleading.
In your own words, what is “sex addiction?” Are there agreed upon criteria for a clinical...
In your own words, what is “sex addiction?” Are there agreed upon criteria for a clinical diagnosis? What other qualities do those with sex addiction generally possess? What are your own personal thoughts on sex addiction? Do you think it’s real?
For a Clinical Decision Support System: create a policy to ensure compliance with health information, data...
For a Clinical Decision Support System: create a policy to ensure compliance with health information, data exchange or industry infrastructure standards.
1. We want to test a new drug and we want to ensure that all age...
1. We want to test a new drug and we want to ensure that all age groups are represented it to do this we split up the general population into age groups and then select randomly within each group state what type of sampling this is and support your answer. 1b. Describe what type of distribution this is and support your answer 2. We roll 5 six-sided die. What is the probability of obtanining exactly two 1s? 3. How many...
Given your own experience at your workplace, indicate FOUR (4) criteria that motivates you to perform...
Given your own experience at your workplace, indicate FOUR (4) criteria that motivates you to perform well. Provide examples to support your answer. At the beginning in your answer (1st para), briefly describe the meaning of motivation.
Create a post telling me and your classmates about a manager you have worked for that...
Create a post telling me and your classmates about a manager you have worked for that stands out in your mind as being very bad, and tell why you consider(ed) them as such.   DO NOT USE ACTUAL NAMES/PLACES. It is better to use GENERIC DESCRIPTIONS like . . . a manager at a restaurant. The use of general terms will serve the purpose and keep us all out of hot water.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT