Q3
.pdf
keyboard_arrow_up
School
Georgia Gwinnett College *
*We aren’t endorsed by this school
Course
4200
Subject
Computer Science
Date
Feb 20, 2024
Type
Pages
6
Uploaded by jam_1415
1/14/2021 : Quiz Submissions - QUIZ BOWL CHAPTER 3 - Advanced Databases Section 01 Fall 2020 CO - Georgia Gwinnett College Quiz Submissions - QUIZ BOWL CHAPTER 3 X Jamaima Endres (username: jendres) Attempt 6 Written: Jan 12, 2021 1:20 PM - Jan 12, 2021 1:27 PM Submission View Your quiz has been submitted successfully. Question 1 2 / 2 points Consider the ADDRESS table that has the following 3 columns and no rows: ID NUMBER NOT NULL, ZONE NUMBER, ZIP_CODE VARCHAR2(5) COMMIT; INSERT INTO ADDRESS VALUES (1, 1, '94506'); SAVEPOINT ZONE_ADDRESS_1; UPDATE ADDRESS SET ZONE = 2 WHERE ZIP_CODE ='94506'; ROLLBACK; ADDRESS will have 1 row with a value of 1 for ZONE. ADDRESS will have 1 row with a value of 2 for ZONE. v the ADDRESS table will have no rows. The statements will generate a syntax error. D View Feedback Question 2 2 / 2 points If a table T3 has four numeric columns (A, B, C, D) and no primary key, which of these statements will succeed? Choose all that apply. v LINSERT INTO T3 VALUES (3, 6, 7, NULL); v/l INSERT INTO T3 VALUES ('3} '9, 10, '12"); https://ggc.view.usg.edu/d2l/Ims/quizzing/user/quiz_submissions_attempt.d21?isprv=&qi=2465969&ai=34550292&isInPopup=0&cfql=0&fromQB=0&ou... 1/6
1/14/2021 : Quiz Submissions - QUIZ BOWL CHAPTER 3 - Advanced Databases Section 01 Fall 2020 CO - Georgia Gwinnett College V[ ] INSERT INTO T3 SELECT * FROM T3; v NONE OF THESE INSERT STATEMENTS WILL SUCCEED. D View Feedback Question 3 2 / 2 points What is the result of: UPDATE cruises SET cruise_name = 'Bahamas', SET start_date = SYSDATE WHERE cruise _id = 1; An error will occur because two columns cannot be updated with one UPDATE For the first record in the CRUISES table whose cruise_id is 1, cruise_name will be set to '‘Bahamas' and start_date will be set to the current date v For the all records in the CRUISES table whose cruise_id is 1, cruise_name will be set to '‘Bahamas' and start_date will be set to the current date For the all records in the CRUISES table whose cruise_id is 1, cruise_name will be set to '‘Bahamas' and start_date will be set to the current date, as long as their original values were not NULL D View Feedback Question 4 0 / 2 points Which of these commands will remove every row in a table, but not delete the table itself? Choose one or more answers. = 3% (| | ADELETE command with no WHERE clause v A DROP TABLE command = I I ATRUNCATE command ) 4 UPDATE command, setting every column to NULL with no WHERE clause. https://ggc.view.usg.edu/d2l/Ims/quizzing/user/quiz_submissions_attempt.d21?isprv=&qi=2465969&ai=34550292&isInPopup=0&cfql=0&fromQB=0&ou... 2/6
1/14/2021 : Quiz Submissions - QUIZ BOWL CHAPTER 3 - Advanced Databases Section 01 Fall 2020 CO - Georgia Gwinnett College D View Feedback Question 5 2 / 2 points CREATE TABLE STUDENT_LIST (STUDENT_ID NUMBER, STUDENT_NAME VARCHAR2(30), STUDENT_PHONE VARCHAR2(20)); INSERT INTO STUDENT_LIST VALUES (1, Joe Wookie', 3185551212); The table will create succesfully. What will result from the INSERT statement execution? It will fail because there is no column listing It will fail because the value for STUDENT_PHONE is numeric, and STUDENT_PHONE is a character datatype. v It will execute and the table will contain one row of data. It will fail because no primary key has been specified for the table. D View Feedback Question 6 2 / 2 points A user named SALLY updates some rows, and asks another user MELVIN to login and check the changes before she commits them. Which of the following statements is true about this situation? (Choose the best answer.) MELVIN can see SALLY's changes but cannot alter them until SALLY commits. v MELVIN cannot see SALLY's updates because she has not entered the COMMIT command. SALLY must commit the updates, so that MELVIN can view them, and if necessary roll them back. SALLY must commit the updates, so that MELVIN can view them, but only SALLY can roll them back. D View Feedback https://ggc.view.usg.edu/d2l/Ims/quizzing/user/quiz_submissions_attempt.d21?isprv=&qi=2465969&ai=34550292&isInPopup=0&cfql=0&fromQB=0&ou...
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 Questions
PHP script
arrow_forward
mysql> CREATE TABLE School ( -> SchoolNumber INT PRIMARY KEY, -> Name VARCHAR(50), -> Address VARCHAR(100), -> PhoneNumber BIGINT, -> Built DATE, -> Size INT -> );ERROR 1046 (3D000): No database selectedmysql> SELECT * FROM School;ERROR 1046 (3D000): No database selected
arrow_forward
Page - 1
DBMS - TASK 1: Draw an ERD and Map it to relational schema.
Please complete reading page 1 before going to page 2.
In this task, you will be given a text that describes a company (in page 2). Each student
should complete the steps below to fully solve the task
Represent the company description as an ER-diagram, including all relevant constraints as the
following steps:
-
Each student should download Lucidchart app
Every student should use Lucidchart to draw the ERD
Edit
Lucidchart
Blank diagram
Select View Insert Arrange Help
80
What's New
Saved
Start a free trial to access unlimited shapes and documents! X
BIUAT-
2 px None None
408
Liberation Sans
▾
10 pt +
Shapes
O
Standard
×
T
Flowchart
000
☐ ODOT
☐ ☐ ☐ ☐ ☐☐
)>0 ×
TU Xx
14
<<
ΔΟ
▼ Shapes
ΠΑ
☐ ☐
Name
B
Present
MA
when you create
After each entity
ID
print screen, your
name include your
user ID should be
shown
university ID number
Department
0190334
Dep_ID
Employee
0190334
Name
arrow_forward
Database course
arrow_forward
Database Schema
The schema for the Ch07_FACT database is shown below and should be used to answer the
next several problems. Click this image to view it in its own tab.
FIGURE P7.56 THE CH07_FACT ERD
CHECKOUT
PATRON
PK
Check Num
PK Pat ID
FK1 Book_Num
FK2 Pat_ID
Check_Out_Date
Check_Due_Date
Check_In_Date
>0-----H-
Pat_FName
Pat LName
Pat_Type
BOOK
AUTHOR
PK
Book_Num
PK Au ID
Book_Title
Book_Year
Book_Cost
Book_Subject
FK1 Pat_ID
Au_FName
Au_LName
Au_BirthYear
WRITES
PK,FK1 Book Num
PK,FK2 Au ID
The CIS Department at Tiny College maintains the Free Access to Current Technology (FACT)
library of e-books. FACT is a collection of current technology e-books for use by faculty and
students. Agreements with the publishers allow patrons to electronically check out a book,
arrow_forward
Access Assignment
Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information.
The following table contains the clients’ information.
Client Number
Client Name
Street
City
State
Postal Code
Telephone Number
Billed
Paid
Technician Number
AM53
Ashton-Mills
216 Rivard
Anderson
TX
78077
512-555-4070
$315.50
$255.00
22
AR76
The Artshop
722 Fisher
Liberty Corner
TX
78080
254-555-0200
$535.00
$565.00
23
BE29
Bert's Supply
5752 Maumee
Liberty Corner
TX
78080
254-555-2024
$229.50
$0.00
23
DE76
D & E Grocery
464 Linnell
Anderson
TX
78077
512-555-6050
$485.70…
arrow_forward
Indexing
Consider a relational database that consists of the relational tables created by the following CREATE TABLE statements:
CREATE TABLE PART(
P_PARTKEY NUMBER(12) NOT NULL,
P_NAME VARCHAR(55) NOT NULL,
P_RETAILPRICE NUMBER(12,2) NOT NULL,
CONSTRAINT PART_PEKEY PRIMARY KEY (P_PARTKEY) );
CREATE TABLE SUPPLIER(
S_SUPPKEY NUMBER(12) NOT NULL,
S_NAME CHAR(25) NOT NULL
S_NATIONKEY NUMBER(12) NOT NULL,
S_PHONE CHAR(15) NOT NULL,
CONSTRAINT SUPPLIER_PKEY PRIMARY KEY (S_SUPPKEY) );
CREATE TABLE PARTSUPP(
PS_PARTKEY NUMBER(12) NOT NULL,
PS_SUPPKEY NUMBER(12) NOT NULL,
PS_SUPPLYCOST NUMBER(12,2) NOT NULL,
CONSTRAINT PARTSUPP_PKEY PRIMARY KEY (PS_PARTKEY, PS_SUPPKEY), CONSTRAINT PARTSUPP_FKEY1 FOREIGN KEY (PS_PARTKEY) REFERENCES PART(P_PARTKEY),
CONSTRAINT PARTSUPP_FKEY2 FOREIGN KEY (PS_SUPPKEY) REFERENCES SUPPLIER(S_SUPPKEY) );
Determine what index should be created to improve the performance of the queries listed below in the best possible way. Consider each one of the…
arrow_forward
Q1: Identify one PK from each table and add the constraints using alter.
arrow_forward
assume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100.
arrow_forward
You have given a table from a database and the name of the table is Employees Please display the following from the Employees
1) The Employee Id, Last Name and First Name for each employee in order in terms of Last Name.
2) The employees who is title is Sales Representative
3) Delete the employee whose title of courtesy is Dr.
4) Update the title of the employee whose title is Sales Manager to Senior Sales Manager.
arrow_forward
assume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column and the Num_Shares column from every row in the table.
arrow_forward
Task 1:Create a database Entity and Relationship Diagram (ERD) for the following application (Submitted An image of the Diagram By using Any Application:Application:
The Application idea: It is a mobile application called (Khair) to help people. This assistance is moral, material. This assistance is also provided by good people in our community.
Example to understand the Application idea more: For example, a person urgently needs a medical chair or bed and does not have the ability to purchase what he needs. The medical chair or bed is requested through the application, and whoever has what he requests initiates the request through the application’s messages and determines the meeting place.
Application models (page):
Login included:
login
registration
login included:
user name
password
New registration included:
name
E-mail
Password
phone number
date
National Identification Number
Home page included:
Request - applicant name - address - send message
Messages list form included:
list…
arrow_forward
A social media application stored information about each registered user in the table
create table user (id int primary key auto_increment, name varchar(100) not null)
A user can have many "friends" and can also be a "friend" to many other users. Specify how this
relationship would be implemented by coding the create table statement(s) for the tables.
arrow_forward
Part A: MySQL Query/Exec
Create StudentsDB database in MySQL server with the following table:
Table: Students
uid
int, Primary Key, Auto Increment
studentID
varchar(8), Unique
name
varchar(50)
major
varchar(50)
passedCredits
int
CGPA
float
Implement the following PHP scripts as required below:
php: the script should display student’s info (StudentID, name, major, credits passed and CGPA) in HTML table with appropriate title for each column. Student cells/rows should be highlighted as follows:
Condition
Highlight Color
Student At Risk: CGPA < 2.0
Red for CGPA Cell
Expected to graduate: Passed Credits >=115
Yellow for Passed Credits Cell
Outstanding Student: CGPA = 3.5 or above
Green for the entire Student Row
php: This script should display all students’ names and major. Each student will be identified by a checkbox (define the checkbox name as a numeric array holding the uid). The…
arrow_forward
Task 6:
The StayWell Property Management team considers creating a discount scheme for the property owners with more than one property in the system. You will need to provide all the owner IDs (OWNER_NUM) and the count of properties of the owners with more than one active property in the database. The output columns should be OWNER_NUM and COUNT(*) respectively.
arrow_forward
Task 6:
The Car Maintenance team considered that the available maintenance tasks should also have the price information in the database. Alter the MAINTENANCE_TYPES table to include a new column named MAINTENANCE_PRICE of type FLOAT.
ANSWER IN MYSQL PLEASE
arrow_forward
Assignment 6: Creating the Babbage Bookkeeping Database
Create a query to display the Client Number, Client Name, and Address fields for all clients with an address on Maum. Save the query as “Q22-Client-Maum Query.”
Create a query that will allow the user to enter the city to search when the query is run. The query results should display the Client Number, Client Name, and Bookkeeper Number. Test the query by searching for those records where the client is located in Portage. Save the query as “Q23-Client-City Query.”
Create a query from the Client table to display the cities in ascending order. Each city should appear only once (i.e., no repeating city). Save the query as “Q24-City-Sorting Query.”
Create a query to display the Client Number, Client Name, and Balance fields for all clients where the bookkeeper number is 24 or 34 and the balance is greater than $300.00. Save the query as “Q25-Client-Bookkeeper24-34 Query.”
Create a query to display the First Name,…
arrow_forward
Design and develop android application that inserts movie information into database. The following is required:
Validation: duration must be >0 and less than 20 (Show appropriate toast message otherwise)
Movie rating is a drop down list with values between 1 and 10
Movie year is a drop down list with values from 1950 until today's year
Show appropriate success message (using dialog) when the movie is successfully added to database
Insert movie information to database is achieved using a php web service
Database type is MYSQL
You should submit the following:
o Java files
Layout files
o AndroidManifest.xml
o Build.gradle that contains the dependencies of your project
o php web service file
Table movie looks like the following:
Mid
Mname
Duration
Rating
myear
The design looks like the following:
Movie Name
Movie Duration
Movie Rating
Movie Year
Add Movie
arrow_forward
using php
We run a dog grooming shop, there are new 4 breeds that are being registered to our system. Please add their names, breeds, and ages to the database, also display the new inputs with non-prepared statements
Requirement 1: Require the programmer to insert rows
Requirement 2: Require the programmer to display the rows after they have been changed
Requirement 3: Require use of a non-prepared statement
arrow_forward
- Create a new table called CLERKS based on EMP table so that it contains all the clerks in EMP
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- PHP scriptarrow_forwardmysql> CREATE TABLE School ( -> SchoolNumber INT PRIMARY KEY, -> Name VARCHAR(50), -> Address VARCHAR(100), -> PhoneNumber BIGINT, -> Built DATE, -> Size INT -> );ERROR 1046 (3D000): No database selectedmysql> SELECT * FROM School;ERROR 1046 (3D000): No database selectedarrow_forwardPage - 1 DBMS - TASK 1: Draw an ERD and Map it to relational schema. Please complete reading page 1 before going to page 2. In this task, you will be given a text that describes a company (in page 2). Each student should complete the steps below to fully solve the task Represent the company description as an ER-diagram, including all relevant constraints as the following steps: - Each student should download Lucidchart app Every student should use Lucidchart to draw the ERD Edit Lucidchart Blank diagram Select View Insert Arrange Help 80 What's New Saved Start a free trial to access unlimited shapes and documents! X BIUAT- 2 px None None 408 Liberation Sans ▾ 10 pt + Shapes O Standard × T Flowchart 000 ☐ ODOT ☐ ☐ ☐ ☐ ☐☐ )>0 × TU Xx 14 << ΔΟ ▼ Shapes ΠΑ ☐ ☐ Name B Present MA when you create After each entity ID print screen, your name include your user ID should be shown university ID number Department 0190334 Dep_ID Employee 0190334 Namearrow_forward
- Database coursearrow_forwardDatabase Schema The schema for the Ch07_FACT database is shown below and should be used to answer the next several problems. Click this image to view it in its own tab. FIGURE P7.56 THE CH07_FACT ERD CHECKOUT PATRON PK Check Num PK Pat ID FK1 Book_Num FK2 Pat_ID Check_Out_Date Check_Due_Date Check_In_Date >0-----H- Pat_FName Pat LName Pat_Type BOOK AUTHOR PK Book_Num PK Au ID Book_Title Book_Year Book_Cost Book_Subject FK1 Pat_ID Au_FName Au_LName Au_BirthYear WRITES PK,FK1 Book Num PK,FK2 Au ID The CIS Department at Tiny College maintains the Free Access to Current Technology (FACT) library of e-books. FACT is a collection of current technology e-books for use by faculty and students. Agreements with the publishers allow patrons to electronically check out a book,arrow_forwardAccess Assignment Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information. The following table contains the clients’ information. Client Number Client Name Street City State Postal Code Telephone Number Billed Paid Technician Number AM53 Ashton-Mills 216 Rivard Anderson TX 78077 512-555-4070 $315.50 $255.00 22 AR76 The Artshop 722 Fisher Liberty Corner TX 78080 254-555-0200 $535.00 $565.00 23 BE29 Bert's Supply 5752 Maumee Liberty Corner TX 78080 254-555-2024 $229.50 $0.00 23 DE76 D & E Grocery 464 Linnell Anderson TX 78077 512-555-6050 $485.70…arrow_forward
- Indexing Consider a relational database that consists of the relational tables created by the following CREATE TABLE statements: CREATE TABLE PART( P_PARTKEY NUMBER(12) NOT NULL, P_NAME VARCHAR(55) NOT NULL, P_RETAILPRICE NUMBER(12,2) NOT NULL, CONSTRAINT PART_PEKEY PRIMARY KEY (P_PARTKEY) ); CREATE TABLE SUPPLIER( S_SUPPKEY NUMBER(12) NOT NULL, S_NAME CHAR(25) NOT NULL S_NATIONKEY NUMBER(12) NOT NULL, S_PHONE CHAR(15) NOT NULL, CONSTRAINT SUPPLIER_PKEY PRIMARY KEY (S_SUPPKEY) ); CREATE TABLE PARTSUPP( PS_PARTKEY NUMBER(12) NOT NULL, PS_SUPPKEY NUMBER(12) NOT NULL, PS_SUPPLYCOST NUMBER(12,2) NOT NULL, CONSTRAINT PARTSUPP_PKEY PRIMARY KEY (PS_PARTKEY, PS_SUPPKEY), CONSTRAINT PARTSUPP_FKEY1 FOREIGN KEY (PS_PARTKEY) REFERENCES PART(P_PARTKEY), CONSTRAINT PARTSUPP_FKEY2 FOREIGN KEY (PS_SUPPKEY) REFERENCES SUPPLIER(S_SUPPKEY) ); Determine what index should be created to improve the performance of the queries listed below in the best possible way. Consider each one of the…arrow_forwardQ1: Identify one PK from each table and add the constraints using alter.arrow_forwardassume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100.arrow_forward
- You have given a table from a database and the name of the table is Employees Please display the following from the Employees 1) The Employee Id, Last Name and First Name for each employee in order in terms of Last Name. 2) The employees who is title is Sales Representative 3) Delete the employee whose title of courtesy is Dr. 4) Update the title of the employee whose title is Sales Manager to Senior Sales Manager.arrow_forwardassume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column and the Num_Shares column from every row in the table.arrow_forwardTask 1:Create a database Entity and Relationship Diagram (ERD) for the following application (Submitted An image of the Diagram By using Any Application:Application: The Application idea: It is a mobile application called (Khair) to help people. This assistance is moral, material. This assistance is also provided by good people in our community. Example to understand the Application idea more: For example, a person urgently needs a medical chair or bed and does not have the ability to purchase what he needs. The medical chair or bed is requested through the application, and whoever has what he requests initiates the request through the application’s messages and determines the meeting place. Application models (page): Login included: login registration login included: user name password New registration included: name E-mail Password phone number date National Identification Number Home page included: Request - applicant name - address - send message Messages list form included: list…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage