19. The following code refers to the sample data in the table people. What is the result of each select statement? FROM people WHERE spouse_id IS NULL WITH CHECK OPTION; CREATE VIEW new people AS SELECT * (a) SELECT COUNT(*) FROM people; (b) SELECT COUNT(*) FROM new_people; INSERT INTO new_people (firstname, lastname) VALUES ('Einstein', 'Brown'); (c) SELECT COUNT(*) FROM people; (d) SELECT COUNT(*) FROM new_people; INSERT INT0 new_people (firstnameę, lastname, spouse_id) VALUES ('Cclara', 'Clayton', 6); (e) SELECT COUNT(*) FROM people; (f) SELECT COUNT(*) FROM new_people;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
19. The following code refers to the sample data in the table people. What is the result of each select
statement?
* FROM people WHERE spouse id IS NULL WITH CHECK OPTION;
CREATE VIEW new people AS SELECT
(a) SELECT COUNT (*) FROM people;
(b) SELECT COUNT(*) FROM new_ people;
INSERT INTO new_people (firstname, lastname) VALUES ('Einstein', 'Brown');
(c) SELECT COUNT(*) FROM people;
(d) SELECT COUNT (*) FROM new people;
INSERT INTO new_people (firstname, lastname, spouse_id) VALUES ('Clara', 'Clayton', 6) ;
(e) SELECT COUNT(*) FROM people;
(f) SELECT COUNT (*) FROM new_people;
Transcribed Image Text:19. The following code refers to the sample data in the table people. What is the result of each select statement? * FROM people WHERE spouse id IS NULL WITH CHECK OPTION; CREATE VIEW new people AS SELECT (a) SELECT COUNT (*) FROM people; (b) SELECT COUNT(*) FROM new_ people; INSERT INTO new_people (firstname, lastname) VALUES ('Einstein', 'Brown'); (c) SELECT COUNT(*) FROM people; (d) SELECT COUNT (*) FROM new people; INSERT INTO new_people (firstname, lastname, spouse_id) VALUES ('Clara', 'Clayton', 6) ; (e) SELECT COUNT(*) FROM people; (f) SELECT COUNT (*) FROM new_people;
For the remaining questions, use the following table of people:
people (id (pk), firstname, lastname, spouse_id (fk))
The table was created as:
CREATE TABLE people (id INT NOT NULL AUTO INCREMENT PRIMARY KEY,
firstname VARCHAR(30), lastname VARCHAR (30), spouse id INT,
CONSTRAINT spouse fk FOREIGN KEY (spouse id) REFERENCES people (id));
This is some sample data:
Participation Activity 9
+----
| id | firstname | lastname | spouse_id |
+
1 | Marty
2 | Jennifer
| McFly
| Parker
| McFly
| Tannen
| McFly
|
|
3 | Lorraine
4 | Biff
5 | George
NULL |
NULL |
5 |
NULL |
3 |
+----+--
Transcribed Image Text:For the remaining questions, use the following table of people: people (id (pk), firstname, lastname, spouse_id (fk)) The table was created as: CREATE TABLE people (id INT NOT NULL AUTO INCREMENT PRIMARY KEY, firstname VARCHAR(30), lastname VARCHAR (30), spouse id INT, CONSTRAINT spouse fk FOREIGN KEY (spouse id) REFERENCES people (id)); This is some sample data: Participation Activity 9 +---- | id | firstname | lastname | spouse_id | + 1 | Marty 2 | Jennifer | McFly | Parker | McFly | Tannen | McFly | | 3 | Lorraine 4 | Biff 5 | George NULL | NULL | 5 | NULL | 3 | +----+--
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Query Syntax
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education