From the above ER Diagram: SQL section containing: a. A basic SQL statement to c
ID: 3851769 • Letter: F
Question
From the above ER Diagram:
SQL section containing:
a. A basic SQL statement to create your database (5 pts);
b. A basic SQL statement to create one of your tables, including the columns, primary and foreign keys, data type, length, null/not null and, if applicable, default values. [Note: Select a table from your design that consists of three or more columns.] (5 pts);
c. A basic SQL statement to display all data in the table you created in step 3.b (above) and sorted by one of the columns (5 pts);
d. A basic SQL statement to display all data meeting a certain condition in the table you created in step 3.b (above) (5 pts);
e. A single SQL statement that displays data from/across two of your tables.
[Note: Refer to your database design documentation.] (5 pts); Present the information for this step in a two-column format. The first column should be used to describe the action. The second column should contain the complete SQL statement using the correct syntax.
E-R diagram for the above given table: Chore Actus Minutes iption ChoreAssoco dClient ChoreEstmated Min CategoryD oryCos Chore Status ChoreCategorylD Chore Chore Categories ChoreDesc ripton ChorelD has Prot: ProfiMonth ProftAmount Cient CienContact No have Person Person D PersonSalary Person EmailExplanation / Answer
a.
CREATE DATABASE ChoreDB;
b.
CREATE TABLE Client (
ClientID int NOT NULL PRIMARY KEY,
ClientName varchar(50) NOT NULL,
ClientAddress varchar(255),
[ClientContact No] int NOT NULL,
ClientEmail varchar(50) NOT NULL
);
c.
select * from client order by clientID
d. select * from client where clientemail like '%hotmail.com'
e. select a.chorestatus ,b.categorycostperhour from chores a left join [chore_categories] b on a. chorecategoryID = b. categoryID
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.