Conceptual Questions 1. A RDBMS is a database management system designed specifically for relational databases. 2. SQL is the language used to communicate with a database. 3. An ER Model is a model that defines data elements and relationships for a specified system. 4. A one-to-one relationship is when a primary entity will have only one related entity. A one-to-many relationship is when the primary entity may have many related entities. A many-to-many relationship is when many entities from one table can be related to many entities from another table. 5. The purpose of a primary is to implement a relationship between tow tables, they are unique because they hold unique values. SQL Exercises 6. CREATE TABLE IF NOT EXISTS customers ( 1. id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, 2. first_name VARCHAR(255) NOT NULL, 3. last_name VARCHAR(255) NOT NULL, 4. address VARCHAR(255) NOT NULL, 5. city VARCHAR(255) NOT NULL, 6. state VARCHAR(255) NOT NULL, 7. zip INTEGER(5) NOT NULL, 8. email VARCHAR(255) NOT NULL ); 7. ALTER TABLE customers ADD age INTEGER UNSIGNED NOT NULL; 8. INSERT INTO customers(first_name, last_name, address, city, state, zip, email) VALUES ('Diego', 'Chavez', '435 Oak St', 'Bakersfield', 'Ca', '93314', 'diego@email.com'), ('John', 'Doe', '123 Elm St', 'Oakland', 'Ca', '92456', 'john@email.com'), ('Mary', 'Jane', '1800 L St', 'Los Angeles', 'Ca', '95678', 'mary@email.com'); 9. SELECT * FROM customers; 10. CREATE TABLE IF NOT EXISTS products ( 1. id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, 2. title VARCHAR(255) NOT NULL, 3. description VARCHAR(255) NOT NULL, 4. price DECIMAL(5,2) NOT NULL ); 11. INSERT INTO products (title, description, price) VALUES ('nintendo switch', 'newest nintendo gaming device', '199.99'), ('ps4', 'newest sony gaming device', '249.99'), ('xbox one', 'newest microsoft device', '299.99'); 12. SELECT * FROM products; 13. UPDATE products SET price = '200.00' WHERE id = 2; 14. SELECT products WHERE price < 100; 15. DELETE FROM products ORDER BY id desc limit 1; 16. CREATE TABLE IF NOT EXISTS orders () 1. id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, 2. cid INTEGER UNSIGNED NOT NULL, 3. amount DECIMAL UNSIGNED NOT NULL, 4. date TIMESTAMP DEFAULT CURRENT_TIMESTOP, FOREIGN KEY (cid) REFERENCES customers(id) ); 17. INSERT INTO orders(cid, amount, date) VALUES ('1', '1', '2020-03-17 10:00:00'), ('2', '3', '2020-03-17 23:59:00'), ('3', '5', '2020-03-17 12:00:00'); 18. SELECT orders WHERE id = 1; 19. SELECT orders WHERE price > 100; 20. DROP TABLE IF EXISTS orders;