2. 3. Use the create table statement to create a table named dogs with the following...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. 3. Use the create table statement to create a table named dogs with the following columns and data types name age weight owner_name varchar(20) int int varchar (50) Add the following check constraints to the dogs table: • the age must be greater than 0 • the weight must be greater than 0 Create a table named owners with the following columns and data types. owner_name varchar (50) yrs_owned int 4. Create a primary key constraint on the owner column in the owners table and make the owner_name column the primary key. This must be done before a foreign key constraint can be created on the dogs table. 5. Create a foreign key constraint on the dogs table. The dogs table will reference the owners table through the owner_name column (a foreign key/exported key for the owner_name column in the dogs table.) 6. Test your foreign key constraint by adding a row to the owners table and then add a row to the dogs table with the same owner_name value. 2. 3. Use the create table statement to create a table named dogs with the following columns and data types name age weight owner_name varchar(20) int int varchar (50) Add the following check constraints to the dogs table: • the age must be greater than 0 • the weight must be greater than 0 Create a table named owners with the following columns and data types. owner_name varchar (50) yrs_owned int 4. Create a primary key constraint on the owner column in the owners table and make the owner_name column the primary key. This must be done before a foreign key constraint can be created on the dogs table. 5. Create a foreign key constraint on the dogs table. The dogs table will reference the owners table through the owner_name column (a foreign key/exported key for the owner_name column in the dogs table.) 6. Test your foreign key constraint by adding a row to the owners table and then add a row to the dogs table with the same owner_name value.
Expert Answer:
Answer rating: 100% (QA)
1 Create the dogs table sql CREATE TABLE dogs name VARCHAR20 age INT CHECK age 0 weight INT CHECK we... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
What is the likely reason that the parietal lobe is activated in brain scans while people are responding to moral dilemmas?
-
In the following exercises, you will use the data in the Solmaris Condominium Group database shown in Figures 1-21 through 1-25. (If you use a computer to complete these exercises, use a copy of the...
-
The graded problems in Module 3 provide experience with the CREATE TABLE statement. You should execute the statements using either Oracle, PostgreSQL, or MySQL. To facilitate grading, please number...
-
Blackmon Company provides locator services to the city transportation departments. Blackmons service involves installing a dedicated hardware transmitter in each city bus. This transmitter provides...
-
RTP is used to transmit CD-quality audio, which makes a pair of 16-bit samples 44,100 times/sec, one sample for each of the stereo channels, how many packets per second must RTP transmit?
-
1. Assume that the preference relation on a metric space X is continuous. Show that this implies that the sets > (y) = {x : x>y} and < (y) = {x : x (y) = {x : x>y} and < (y) = {x: x z0. a. Suppose...
-
Describe a possible sequence of fabrication processes that might be used to manufacture the helicopter rotor blade in Figure 1.12. Note that several different materials and fiber lay-ups are used....
-
The Bigco pension plan has invested in dozens of VC funds. The director of the pension plan is preparing his annual report to the Bigco board of directors. Summary information for Bigcos VC portfolio...
-
Given the following annual returns for Stock ABC, what does a $3,000 investment grow to over the 5-year period? Year 1: 15% Year 2: 20% Year 3: 25% Year 4: 15% Year 5: 15%
-
The Stone River Textile Mill was inspected by OSHA and found to be in violation of a number of safety regulations. The OSHA inspectors ordered the mill to alter some existing machinery to make it...
-
You are the training manager for a manufacturing company which is opening a new branch in a distant location. You need to arrange induction training for all new employees in this location. You can...
-
In an oganisation such as any fast food outlet or in restaurant industry : What environmental and resource efficiency issues is the organisation subject to? What resources does the organisation use?...
-
A government uses tax money from the private sector for a project that yields an annual benefit of $40 a year (starting next year and continuing forever). The rate of return in the private sector is...
-
Last year, on April 24 you borrowed 17.3 million euro from a bank in Amsterdam at 6.5 percent and wired it to your affiliate in Mexico, who in turn converted the entire amount into peso immediately....
-
1) A firm estimates next year's total manufacturing overhead at $450,000. Three possible overhead bases being considered are: 40,000 direct labor hours, $350,000 direct labor dollars, and 2,300...
-
Explain why the velocities for the two calculations (from KE and from Fc) are different. Also show a calculation that compares two velocities from one of the rows in the table above (you have to...
-
Suppose you invest $3000 in an account that pays out 4% simple interest each year. How much interest will your account earn in 15 years? $2402 $1800 $2461 $120
-
Question 6.10 Current and deferred tax worksheets and tax entries From the hip Ltd?s statement of profit or loss for the year ended 30 June 2007 and extracts from its statements of financial position...
-
Matthew borrows $250,000 to invest in bonds. During 2012, his interest on the loan is $30,000. Matthew's interest income from the bonds is $10,000. This is Matthew's only investment income. a....
-
Carol Harris, Ph.D, CPA, is a single taxpayer and she lives at 674 Yankee Street, Durham, NC 27409. Her Social Security number is 793-52-4335. Carol is an Associate Professor of Accounting at a local...
-
Frank Willingham has the following transactions during the year: Sale of office equipment on March 15 that cost $20,000 when purchased on July 1, 2010. Frank has claimed $5,000 in depreciation and...
-
A batch distillation facility has a bank of columns of Type 1 and another bank of Type 2. Type 1 columns are available for processing \(6,000 \mathrm{hr} /\) week, and Type 2 columns are available...
-
During the 2002 Winter Olympics in Salt Lake City, Utah, a local microbrewery received a rush order for 100 gallons of beer containing at least 4.0 volume \(\%\) alcohol. Although no \(4 \%\) beer...
-
Willy Wonka has engaged your consultation services to assist in the recipe formulation of a new brand of chocolate bar, weighing \(100 \mathrm{~g}\), which he plans to name "Super-choc." Each...
Study smarter with the SolutionInn App