Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
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
- Please provide step-by-step in Microsoft Access for the following problem. Create a new query in Query Design View based on the Consultant table with the following instructions to test the new custom function, the Travel function, as used within a query: Use LastName, Reside, and Salary fields from the Consultant Create a new calculated field named TravelExpense that uses the new Travel function with the Reside field for the CountryValue argument and the Salary field for the SalaryValue Save the query with the name TravelCalculation and then display it in Datasheet View to test your new custom function and calculated field. Close the TravelCalculation query.arrow_forwardCREATE TABLE sales ( SalesNumber INT(10) AUTO_INCREMENT PRIMARY KEY, SalesDate DATE, SalesTotal DECIMAL(10,2)); CREATE TABLE products ( number INT(11) AUTO_INCREMENT PRIMARY KEY, prodid VARCHAR(20) UNIQUE, prodname VARCHAR(30), price DECIMAL(10,2), onhand INT(11), CONSTRAINT fk_salesdetails_products FOREIGN KEY (prodid) REFERENCES salesdetails(prodid) ON DELETE RESTRICT); CREATE TABLE salesdetails ( number INT(10) AUTO_INCREMENT PRIMARY KEY, SalesNumber INT(10), prodid VARCHAR(20), price DECIMAL(7,2), qty INT(10), CONSTRAINT fk_salesdetails_sales FOREIGN KEY (SalesNumber) REFERENCES sales(SalesNumber) ON DELETE CASCADE, CONSTRAINT fk_salesdetails_products FOREIGN KEY (prodid) REFERENCES products(prodid) ON DELETE CASCADE); Using the above SQL and the schema diagram, create an ER diagram detailing all the fields of the tables and the relationship amount the tables.arrow_forwardBelow are some rows of the PROVIDERS table for a factory: PCODE NAME PHONE 10192 Hans, Inc. 231 - 3092 98411 Tools and More 231 - 1029 0489035 Motors Inc. 993 - 1821 All providers from the factory zone of the city start with 231. You want to get the providers that are in the factory zone of the city. Which of the following is more appropriate? a. SELECT * FROM PROVIDERS WHERE PHONE LIKE ‘%231%’ b. SELECT * FROM PROVIDERS WHERE PHONE LIKE ‘% 231’ c. SELECT * FROM PROVIDERS WHERE PHONE LIKE ‘___ 231 ___’ d. SELECT * FROM PROVIDERS WHERE PHONE LIKE ‘231%’arrow_forward
- Q. Please write SQL codes to query data from member tables based on below criteria Please write a SELECT statement to display each member’sdata that member_id is an odd number. Please display the result in ascending order of the last_name. The result should be identical to below results: [Screenshot]arrow_forwardHow do you specify conditions for an Access query?arrow_forward4 and 5arrow_forward
- Create a table named company with these columns: Company_id varchar(255) Company_name varchar(255) default ‘x’ Hq_phone_number varchar(255) Primary key of company_id (please use constraint format) Unique key of Hq_phone_number (please use constraint format)arrow_forwardQ1- List all employees whose job_id is IT_PROG and hired after 01-JAN-95 and earning more than5000.Q2- List all employee except those with employee_id 101, 102, 103, 104 and 105Q3- Display the city attribute from locations table. Show the ones that contain “South” in the city.Sort the list in descending order.Q4- Display the first name, last name, salary, manager id and job id of all employees whose last fourcharacters of job id ends with “LERK”.Q5- Display the first name, last name and salary of all employees. Round the salary to the nearestunit of 1000 (ex. Salary=4500 New Salary=5000). Label the column as "New Salary".arrow_forwardGiven the table PRODUCT(ProductID, ProductName, ProductClass, ProductWeight, ProductStyle, ProductColor, ProductPrice). Note: ProductWeight and ProductPrice are numeric fields, and the other attributes are character fields, i.e., store text. Write a SQL query to display the product class whose average price is at least 50arrow_forward
- DATABASEarrow_forwardFor this problem create a (temporary) table called instructor_course_nums. Write a procedure that accepts an instructor ID as input. The procedure calculates the total number of course sections taught by that instructor, and adds a tuple to the temporary table consisting of the instructors ID number, name, and total courses taught - call these attributes: ID, name, and tot_courses. If the instructor already has an entry in the table,then the procedure makes sure the total number of courses taught in the temporary table is up-to-date. You must name your procedure: Written in PostgreSQLarrow_forwardPLZ HELP WITH THE FOLLOWING: make the following work select MOVIE_NAME, MOVIE_YEAR from MOVIE where MOVIE_COST > (select a.MOVIE_COST from MOVIE a, PRICE b where a.PRICE_CODE = b.PRICE_CODE and b.PRICE_DESC ="weekly Special"); CREATE TABLE MEMBERSHIP ( MEM_NUM CHAR(3) CONSTRAINT MEMBER_MEMNUM_PK PRIMARY KEY, MEM_FNAME VARCHAR(30) NOT NULL, MEM_LNAME VARCHAR(30) NOT NULL, MEM_STREET VARCHAR(30), MEM_CITY VARCHAR(10), MEM_STATE CHAR(2), MEM_ZIP CHAR(5), MEM_BALANCE NUMBER(2) ); CREATE TABLE RENTAL ( RENT_NUM CHAR(4) CONSTRAINT RENTAL_RENTNUM_PK PRIMARY KEY, RENT_DATE DATE, MEM_NUM CHAR(3), CONSTRAINT RENTAL_MEMNUM_FK FOREIGN KEY (MEM_NUM) REFERENCES MEMBERSHIP ); CREATE TABLE PRICE ( PRICE_CODE CHAR(1) CONSTRAINT PRICE_PRICECODE_PK PRIMARY KEY, PRICE_DESC VARCHAR(20), PRICE_RENTFEE NUMBER (3, 1), PRICE_DAILYATFEE NUMBER(3, 1) ); CREATE TABLE MOVIE ( MOVIE_NUM CHAR(4) CONSTRAINT MOVIE_MOVIENUM_PK PRIMARY KEY, MOVIE_NAME VARCHAR(30) NOT NULL,…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education