Concept explainers
Use the following tables for your answers to questions 3.7 through 3.51 :
PET_OWNER (OwnerID, OwnerLasst Name, OwnerFirstName,
OwnerPhone, OwnerEmail)
PET (PetID, PeeetName, PetType, PetBreed, PetDOB, OwnerID)
Sample data for these tables are shown in Figures 3-27 and 3-28, For each SQL statement you write, show the results based on these data. If possible, run the statements you write for the questions that follow in an actual DBMS, as appropriate, to obtain results. Use data types that are consistent with the DBMS you are using. If you are not using an actual DBMS, consistently represent data types by using either the SQL Server, Oracle
3.7 Write an SQL CREATE TABLE statement to create the PET_OWNER table, with OwnerID as a surrogate key. Justify your choices of column properties.
Figure 3-27 PET_OWNER Data
Figure 3-28 PET Data
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Database Concepts (8th Edition)
Additional Engineering Textbook Solutions
Modern Database Management (12th Edition)
Starting Out With Visual Basic (7th Edition)
Artificial Intelligence: A Modern Approach
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Problem Solving with C++ (9th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
- Write the SQL code that will change the PROJ_NUM to 14 for employees who were hired before January 1, 1994, and whose job code is at least 501. (You may assume that the table will be restored to its condition preceding this question.)arrow_forwardSQL includes many numerical functions. Two of these functions are FLOOR and CEIL. Use the Internet to research these functions. Are the functions available in Oracle, SQLServer, and Access? Write a paragraph that discusses what the functions do and anydifferences and/or similarities between the functions in Oracle, SQL Server, and Access.Then perform the following tasks: a. Solmaris Condominium Group would like to know the impact of discounting its condofees by 3 percent. Write an SQL statement in Oracle that displays the condo ID, unitnumber, discounted condo fee, discounted condo fee with the CEIL function, anddiscounted condo fee with the FLOOR function. b. Based on your research, will the values in the three columns vary? If so, how? Usethe condo with the ID of 1 to explain your answer. Be sure to cite your references.arrow_forwardWrite the SQL code to delete the row for William Smithfield, who was hired on June 22, 2004, and whose job code is 500. (Hint: Use logical operators to include all of the information given in this problem.)arrow_forward
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning