OPTIONAL Currently, there’s been quite a bit of discussion a…

OPTIONAL Currently, there’s been quite a bit of discussion about the causes of autism. There is some evidence of an association between taking Tylenol during pregnancy, and the later development of autism in a child. First, tell me what type of correlation this is and why. Next, tell me why arriving at the conclusion that Tylenol causes autism is questionable at best. 

A hospital has a patients table. The administrator wants to…

A hospital has a patients table. The administrator wants to view patients sorted by last name alphabetically. Which SQL statement works best? SELECT * FROM patients ORDER BY last_name SELECT * FROM patients GROUP BY last_name SELECT * FROM patients WHERE last_name ASC SELECT * FROM patients ORDER BY last_name DESC Answer: SELECT * FROM patients ORDER BY last_name Explanation: By default, ORDER BY sorts text in ascending order (A to Z). GROUP BY would group records, not sort them. Adding WHERE last_name ASC is invalid syntax. Using DESC would sort in reverse order (Z to A).

Which statement is true about inserting rows into a table?…

Which statement is true about inserting rows into a table? You must always list every column name You can insert into multiple rows at once using commas in the VALUES list You cannot insert into text columns with INSERT INTO Insert statements automatically delete existing rows Answer: You can insert into multiple rows at once using commas in the VALUES list Explanation: SQL allows multiple records in one INSERT by separating each value set with commas. Listing columns is optional if filling all columns, and INSERT does not delete rows or restrict text fields.

A library has a books table with (book_id, title, author). W…

A library has a books table with (book_id, title, author). Which SQL correctly inserts two books at once? INSERT INTO books VALUES (1, ‘1984’, ‘Orwell’), (2, ‘Dune’, ‘Herbert’); INSERT INTO books (1, ‘1984’, ‘Orwell’) AND (2, ‘Dune’, ‘Herbert’); ADD INTO books VALUES (1, ‘1984’, ‘Orwell’), (2, ‘Dune’, ‘Herbert’); INSERT books (book_id, title, author) = (1, ‘1984’, ‘Orwell’), (2, ‘Dune’, ‘Herbert’); Answer: INSERT INTO books VALUES (1, ‘1984’, ‘Orwell’), (2, ‘Dune’, ‘Herbert’); Explanation: Multiple rows can be inserted in one INSERT by separating tuples with commas. The other options use invalid SQL syntax.

A hospital wants to create a patients table with columns:…

A hospital wants to create a patients table with columns: patient_id (unique number, required) full_name (up to 255 characters, required) age (whole number) Which SQL is correct? CREATE TABLE patients (patient_id INT NOT NULL, full_name VARCHAR(255) NOT NULL, age DECIMAL(10,2)); CREATE TABLE patients (patient_id INT NOT NULL, full_name VARCHAR(255) NOT NULL, age INT); CREATE patients TABLE (patient_id INT NOT NULL, full_name TEXT, age INT); CREATE TABLE patients (patient_id VARCHAR(255), full_name INT, age INT); Answer: CREATE TABLE patients (patient_id INT NOT NULL, full_name VARCHAR(255) NOT NULL, age INT); Explanation: INT works for identifiers and ages, VARCHAR(255) is appropriate for names, and NOT NULL ensures mandatory fields. The other options either misuse data types or have invalid syntax.