CST225Quiz4 Done
docx
keyboard_arrow_up
School
North Carolina A&T State University *
*We aren’t endorsed by this school
Course
225
Subject
Electrical Engineering
Date
Apr 3, 2024
Type
docx
Pages
6
Uploaded by DeanMoon9058
CST225
Quiz#4: SQL I Spring2024
Problem: Reading quiz.
Note
:
Please read/review the lecture notes for basic SQL chapter in preparation for this quiz. XAMPP is REQUIRED!!! (See how to download Xampp in the software folder located on Blackboard. Go over the slides then write
, run
the SQL queries for the following questions and show the result of each query. (
SCREENSHOTS OF SYNTAXES AND RESULTS).
You can either use XAMPP shell, the command prompt or php admin please see lab 4
Noah Thompson
1.
Connect to mysql 2.
Show all the databases.
3.
Create a new database called "lastname_db".(where lastname is your last name)
Page | 1
CST225
Quiz#4: SQL I Spring2024
4.
Set the "lastname_db"(where lastname is your last name) database as the default database.
5.
Show all the tables in the default database.
6.
Create a new table called "Departments" with the columns and type indicated below. deptName
VARCHAR(20)
building
VARCHAR(15)
budget
FLOAT(12,2)
Biology
Watson
90000.00
Comp.Sci.
Taylor
100000.00
Elec.Eng.
Taylor
85000.00
Finance
Painter
120000.00
7.
Insert the above records in the Departments Table
Page | 2
CST225
Quiz#4: SQL I Spring2024
8.
Create another new table called "Instructors" with the columns and type indicated below.
ID
CHAR(5)
name
VARCHAR(30)
deptName
VARCHAR(20)
salary
FLOAT(10,2)
12121
Alice Wu
Finance
90000.00
15151
John Mozart
Music
40000.00
22222
Frank Einstein
Physics
95000.00
32343
El Said
History
60000.00
33456
Chelsea Dunn
Physics
90000.00
9.
Insert the above records in the Instructors Table
10. Delete from the departments table the comp.Sci. Department
Page | 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
CST225
Quiz#4: SQL I Spring2024
11. Add a column named "chairperson" with domain type VARCHAR(40) in the department
table
12. Drop the "chairperson" column you just created in the department table
13. Change the domain of the attribute named "building" in the departments table from VARCHAR(15) to VARCHAR(30) 14. Increase salaries of instructors whose salary is over $100,000 by 2%, and all others receive a 4% raise
Page | 4
CST225
Quiz#4: SQL I Spring2024
15. Select the content of the attributes named “ID" and “name" from the instructors table
16. Select the content of all
columns from the instructors
table
17. Select only the distinct values from the column named “deptName” from the instructors table
18. Select only the instructors who works in the "Physics" with salary equal to $90000.00.
19. Select only the instructors who works in the "Physics" OR instructors who make $90000.00
20. Select the instructors whose name ends with an " n" from the instructors table
21. Select the instructors whose name includes the substring "an" from the instructors table
22. Find the names of all instructors whose name does not include the substring “an”.
23. Select all the instructors from the instructors table, however, we want to sort the salaries of all instructors in descending order
24. Select all the instructors from the instructors table, however, we want to sort the salaries of all instructors in ascending order
25. Delete the data in the Instructors table 26. Delete the departments table from the tutorials database Page | 5
CST225
Quiz#4: SQL I Spring2024
Page | 6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Documents
Related Questions
The numbers from 0-9 and a no characters
is the Basic 1 digit seven segment display
* .can show
False
True
In a (CA) method of 7 segments, the
anodes of all the LED segments are
* "connected to the logic "O
False
True
Some times may run out of pins on your
Arduino board and need to not extend it
* .with shift registers
True
False
arrow_forward
b) There are five binary or hexadecimal numbers and six decimal conversions. Draw a line to
connect each binary/hexadecimal to decimal number.
Binary/Hexadecimal
Decimal
4E
78
11011010
157
10011101
167
A7
25
19
218
arrow_forward
1) Here is a Digital Logic question on registers and counters with the answer. Please explain what the teacher did and why they did it. I need you to explain how they got the answer.
arrow_forward
Question 7 election
Full explain this question and text typing work only thanks.
arrow_forward
Please answer in typing format
arrow_forward
What is the function of the odd parity generator circuit?
O a. produces an output of 'I' for even number of logic T
O b. produces an output of '0' for odd number of logic T'
O c. produces an output of '1' for odd number of logic T
shift?
What is the difference between a left logical shift and a left arithmet
O a. logical shift feeds a '0' in the MSB
O b. arithmetic shift feeds a '0' in the MSB
O c. no difference
arrow_forward
Must be handwritten No AI based ANSWER
arrow_forward
Can someone please help me solve this please
arrow_forward
Given the diagram.
a.) What is the boolean algebraic equation for Q in terms of A and B?
b.) Create a four state truth table for Q in terms of A and B
c.) What gate this the diagram represent?
arrow_forward
1) What is the biggest binary number (decimal value) you can write with 6 bits?
What is the biggest binary number (decimal value and in terms of n) you can write
with n bits?
If you want to represent the decimal numbers from 0-16, what is the minimum
number of bits you will need?
Convert the decimal number 238 to binary number. (ZERO point if not showing
steps/calculation!)
arrow_forward
| Solve all parts. Will give thumb's up|
If you can't do all please don't attempt the questions.
arrow_forward
a) Convert the decimal number - 239 into a
signed binary number using
(1) sign-magnitude method (2) 1's
complement method (3) 2's complement
method
b) If the above decimal number is positive ,
that is + 239, then convert it to a signed
binary number using 1 's complement
method
c) Do the following binary subtraction:
101111111.01111-
001011010.10110
d)Explain Types of RAM?
arrow_forward
Explain the arithmetic operations in binary number system and how code conversion is done between binary and decimal numbers.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Related Questions
- The numbers from 0-9 and a no characters is the Basic 1 digit seven segment display * .can show False True In a (CA) method of 7 segments, the anodes of all the LED segments are * "connected to the logic "O False True Some times may run out of pins on your Arduino board and need to not extend it * .with shift registers True Falsearrow_forwardb) There are five binary or hexadecimal numbers and six decimal conversions. Draw a line to connect each binary/hexadecimal to decimal number. Binary/Hexadecimal Decimal 4E 78 11011010 157 10011101 167 A7 25 19 218arrow_forward1) Here is a Digital Logic question on registers and counters with the answer. Please explain what the teacher did and why they did it. I need you to explain how they got the answer.arrow_forward
- Question 7 election Full explain this question and text typing work only thanks.arrow_forwardPlease answer in typing formatarrow_forwardWhat is the function of the odd parity generator circuit? O a. produces an output of 'I' for even number of logic T O b. produces an output of '0' for odd number of logic T' O c. produces an output of '1' for odd number of logic T shift? What is the difference between a left logical shift and a left arithmet O a. logical shift feeds a '0' in the MSB O b. arithmetic shift feeds a '0' in the MSB O c. no differencearrow_forward
- Must be handwritten No AI based ANSWERarrow_forwardCan someone please help me solve this pleasearrow_forwardGiven the diagram. a.) What is the boolean algebraic equation for Q in terms of A and B? b.) Create a four state truth table for Q in terms of A and B c.) What gate this the diagram represent?arrow_forward
- 1) What is the biggest binary number (decimal value) you can write with 6 bits? What is the biggest binary number (decimal value and in terms of n) you can write with n bits? If you want to represent the decimal numbers from 0-16, what is the minimum number of bits you will need? Convert the decimal number 238 to binary number. (ZERO point if not showing steps/calculation!)arrow_forward| Solve all parts. Will give thumb's up| If you can't do all please don't attempt the questions.arrow_forwarda) Convert the decimal number - 239 into a signed binary number using (1) sign-magnitude method (2) 1's complement method (3) 2's complement method b) If the above decimal number is positive , that is + 239, then convert it to a signed binary number using 1 's complement method c) Do the following binary subtraction: 101111111.01111- 001011010.10110 d)Explain Types of RAM?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
