The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I have final tomorrow about sql. and this is what i suppose to bring but i can not create it because i do not get it and i do not have sql in my computer. annd i need it for tomorrow morning can someone please help me i need answer for the document i attached thank you.
CIT 140
Student must create a database for a store. The database must reflect the necessary tables and have
integrity. Here is a suggested database layout for an imaginary Gadgets store. Use this as a guide.
Do not copy the database, tables or fields.
Needed information:
● The store sells electronic gadgets: cell phones, players, radios, GPSs, etc.
● When describing the store, ignore employee salary information
● Provide a writeup that describes your reasoning and layout (10pts) GADGETS
Column
Name
GADGETID
GADGETNAME
GADGETDESC
GADGETPRICE Data
Type Lengt
h
— NULLs
Allowed
?
No DEFAUL
T
Value
— PRIMAR
Y
KEY?
Yes FOREIG
N
KEY?
No Refers
To
Table
— SMALLIN
T
VARCHAR
VARCHAR
DECIMAL 15
50
6 + 2 No
Yes
No —
—
0 No
No
No No
No
No —
—
— Data
Type Lengt
h SMALLIN
T
VARCHAR
VARCHAR
VARCHAR
VARCHAR — NULLs
Allowed
?
No DEFAUL
T
Value
— PRIMAR
Y
KEY?
Yes FOREIG
N
KEY?
No Refers
To
Table
— 10
10
15
15 No
No
No
No —
—
—
— No
No
No
No No
No
No
No —
—
—
— EMPS
Column
Name
EMPID
LOGIN
PASSS
FNAME
LNAME Page 2 CUSTOMERS
Column
Name
CUSTID
CUSTNAME Data
Type Lengt
h
— NULLs
Allowed
?
No DEFAUL
T
Value
— PRIMAR
Y
KEY?
Yes FOREIG
N
KEY?
No Refers
To
Table
— SMALLIN
T
CHAR 50 No — No No — SALES
Column
Name
SALEID
SALETS
GADGETID
EMPID
CUSTID Data
Type
SMALLIN
T
DATETIM
E
SMALLIN
T
SMALLIN
T
SMALLIN
T Length
— NULLs
Allowed?
No DEFAULT
Value
— PRIMARY
KEY?
Yes FOREIGN
KEY?
No Refers
To Table
— — No — No No — — No — No Yes GADGETS — No — No Yes EMPS — No — No Yes CUSTOMERS Example:
GADGETID SMALLint not null primary key….
GADGETID SMALLINT NOT NULL FOREIGN KEY REFERENCES GADGETS(GADGETID)
….
1. Create 4 tables similar to the sample above.
2. Add 10 rows in each table.
3. Use the snipping tool to submit your code that reflects the created tables, queries, and database
diagram. (above totaling in 90 points-- See Rubric on Schoology)
a.Write a query to show details for the entire items that have ‘r’ in the Gadget name.
b.Write a query to display the list of passwords for the entire employee whose login
contains ‘m’. (or a similar Query)
c.Write a query to find how many employees are there.
d.Using a join, write a query to find number of Gadgets bought by each customer.
e.Create a select statement to find out the last date gadgets were ordered.
4. Explain about your project in one page.(10 points)
At the completion of your work, submit all your code in one document. Create your Project
description in another document. Provide each query on schoology separately. Page 3
-----------