Database Concepts (8th Edition)
8th Edition
ISBN: 9780134601533
Author: David M. Kroenke, David J. Auer, Scott L. Vandenberg, Robert C. Yoder
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 3, Problem 3.13RQ
Program Plan Intro
SQL:
- SQL stands for “Structured Query Language”.
- The current version of SQL is “ANSI SQL – 92”.
- It contains constructs which are used to define and process
database . They are executed using DBMS-supplied command prompt. - SQL is not a
programming language. It is text-based and it is also called as data sublanguage. In order to get SQL as a complete programming language, it should be included in scripting languages like Java, C#, and so on.
DROP TABLE statement:
“DROP TABLE” statement comes under Data Definition Language. It is used to delete the information and to delete the structure of the table. The syntax to drop a table is as follows.
Syntax:
DROP TABLE table_Name;
ALTER TABLE Statement:
“ALTER TABLE” statement comes under Data Definition Language. It is used to modify column, add constraints, add column(s), drop column, rename column name and table name, drop constraints, and so on.
Syntax:
Syntax to drop constraint is as follows:
ALTER TABLE table_Name DROP CONSTRAINT constraintName;
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
PLZ help with the following:
The manager wants to add a new painter as an artist in the database. What would the insert statement look like?
For a painter to be considered in the Artist database, the painter must have painted at least one painting, however, a painting might not be exhibited in a gallery. Based on these business rules, please insert one painting for the painter that you inserted in Q1.
sql file
CREATE TABLE GALLERY (GAL_NUM char(4),GAL_OWNER varchar(35),GAL_AREACODE char(3),GAL_PHONE char(8),GAL_RATE number);INSERT INTO GALLERY VALUES('5','L. R. Gilliam','901','123-4456',0.37);INSERT INTO GALLERY VALUES('6','G. G. Waters','405','353-2243',0.45 );INSERT INTO GALLERY VALUES('1','N. D. Cosner','203','123-9956',0.67);INSERT INTO GALLERY VALUES('2','S. H. Artwork','415','154-3243',0.30);
/* -- */
CREATE TABLE PAINTER (PTR_NUM char(4),PTR_LASTNAME varchar(15) NOT NULL,PTR_FIRSTNAME varchar(15) NOT NULL,PTR_AREACODE char(3),PTR_PHONE char(8));INSERT INTO PAINTER…
A select operation in a relational database decreases the size of a table by removing columns that fulfill certain criteria.Is this statement truthful or false?
Is this statement true or false? The term "null" refers to a column in a database table that does not contain any data and is thus empty.
Chapter 3 Solutions
Database Concepts (8th Edition)
Ch. 3 - Prob. 3.1RQCh. 3 - What is a data sublanguage?Ch. 3 - Prob. 3.3RQCh. 3 - Prob. 3.4RQCh. 3 - Prob. 3.5RQCh. 3 - Why do some standard SQL-92 statements fail to run...Ch. 3 - Use the following tables for your answers to...Ch. 3 - Write an SQL CREATE TABLE statement to create the...Ch. 3 - Prob. 3.9RQCh. 3 - Prob. 3.10RQ
Ch. 3 - Prob. 3.11RQCh. 3 - Is PET or PET_2 a better design? Explain your...Ch. 3 - Prob. 3.13RQCh. 3 - Prob. 3.14RQCh. 3 - Prob. 3.15RQCh. 3 - Prob. 3.16RQCh. 3 - Prob. 3.17RQCh. 3 - Write an SQL statement to display the breed, type,...Ch. 3 - Prob. 3.19RQCh. 3 - Prob. 3.20RQCh. 3 - Write an SQL statement to display the breed, type,...Ch. 3 - Write an SQL statement to display the name, breed,...Ch. 3 - Write an SQL statement to display the pet ID,...Ch. 3 - Prob. 3.24RQCh. 3 - Prob. 3.25RQCh. 3 - Write an SQL statement to display the name and...Ch. 3 - Prob. 3.27RQCh. 3 - Write an SQL statement to count the number of...Ch. 3 - Write an SQL statement to count the number of...Ch. 3 - Prob. 3.30RQCh. 3 - Prob. 3.31RQCh. 3 - Prob. 3.32RQCh. 3 - Prob. 3.33RQCh. 3 - Answer question 3.33, but do not consider any pet...Ch. 3 - Write an SQL statement to display the last name,...Ch. 3 - Write an SQL statement to display the last name,...Ch. 3 - Write SQL statements to (1) create the BREED...Ch. 3 - Prob. 3.38RQCh. 3 - Prob. 3.39RQCh. 3 - Prob. 3.40RQCh. 3 - Write an SQL statement to display the...Ch. 3 - Write SQL statements to add three new rows to the...Ch. 3 - Write SQL statements to add three new rows to the...Ch. 3 - Write an SQL statement to change the value of Std....Ch. 3 - Explain what will happen if you leave the WHERE...Ch. 3 - Prob. 3.46RQCh. 3 - Prob. 3.47RQCh. 3 - Prob. 3.48RQ
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Does the DBMS or the user make the choice of which index to use to accomplish a given task?arrow_forwardAn EMPLOYEES table was added to the JustLee Books database to track employee information. Display a list of each employee’s name, job title, and manager’s name. Use column aliases to clearly identify employee and manager name values. Include all employees in the list and sort by manager name.arrow_forwardWrite a SQL statement to create a view named 'IT_Club_Student' which will contain information about all the students acting in the IT club.arrow_forward
- Using the Henry Books database,Henry Books no longer carries books written by Barbara Owen. Delete this author from the authors table. You will insert 2 snips for this question. What construct did you use to delete author Barbara Owens? Insert the snip of the construct used: Insert the snip of the authors table. Be sure all rows are displayed:arrow_forwardDatabase Access Code Write the codethe best that you can to execute the following SQLstatement against a database. Your code should read thedata from the DB and print out all of the data. Thedatabase is an Access database, setup with an ODBCname of "AccountingDB'. Do the best you can, partialcredit will be given. Put your code in the main methodgiven below. [Hint: SQL will return all accounts from thedatabase.]SOL = "Select AcctNo, Owner, Balance fromAccounts"public static void main (String args[])arrow_forwardWrite a SQL statement to create a view named 'IT_Club_Activities' which will contain information about all the activities organized by ‘IT Club’.arrow_forward
- Create the following queries for the “books” database. For each query make sure to only include those tables that are necessary to answer the question. Your answers for each of these questions should consist of the SQL query that will produce these lists, NOT the list itself. For each type of book (e.g. biography, children, etc), show the number of those books that are 450 pages or longer. The column heading should be '# of long books'. Modify the answer to the previous question so that only those types for which there are at least 2 long books are displayed For each publisher, list the name of the publisher and total number of pages that the publisher has published in all their books (ie. add up all the pages in all books for each publisher). Show the publishers who have published the most pages at the top of the result list. Modify the previous query so that only publishers who have published at least 1250 pages will show up. List each publisher's name and the numbers of…arrow_forward1 SELECT COUNT(Employee.name) From Employee 2 JOIN Team ON Team.id = Employee.team 3 After executed, the above query will output.... a. The number of employees that worked in the same team. b. The number of employees that belong to a team c. The name of the employees that belong to a specific team. d. The number of employees in the database.arrow_forwardCreate an SQL package specification and body called JOB_PKG, containing the following procedures: Create a procedure called ADD_JOB to insert a new job into the JOBS table. The procedure has job id, job title, minimum salary and maximum salary as parameters. Ensure that the value of maximum salary is greater than minimum salary, raise an exception if this rule is violated (create a private procedure for salary validation).arrow_forward
- In a relational database, a select operation reduces the size of a table by eliminating columns that meet specified specifications.Is this statement accurate or incorrect?arrow_forward1. Run an update query that converts the uppercase names in the database into normal case(i.e. ROGER GOODWIN becomes Roger Goodwin).arrow_forwardIn a relational database, a select operation is used to minimise the size of a table by eliminating columns that do not fulfil certain constraints.Is this statement true or false?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr