Garden Glory Project Questions Assume that Garden Glory designs a database with the following tables:
OWNER (OwnerID, OwnerName, OwnerEmail, OwnerType)
OWNED_PROPERTY (PropertyID, PropertyName, PropertyType, Street, City, State, Zip, OwnerID)
GG_SERVICE (ServiceID, ServiceDescription, CostPerHour);
EMPLOYEE (EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel)
PROPERTY_SERVICE ( PropertyServiceID , PropertyID , ServiceID, ServiceDate , EmployeeID, HoursWorked)
The referential integrity constraints are:
OwnerID in OWNED_PROPERTY must exist in OwnerID in OWNER
PropertyID in PROPERTY_SERVICE must exist in PropertyID in OWNED_PROPERTY
ServiceID in PROPERTY_SERVICE must exist in ServiceID in GG_SERVICE
EmployeeID in PROPERTY_SERVICE must exist in EmployeeID in EMPLOYEE
Assume that OwnerID in OWNER, PropertyID in PROPERTY, and EmployeeID in EMPLOYEE are surrogate keys with values as follows:
OwnerID Start at 1 Increment by 1
PropertyID Start at 1 Increment by 1
ServiceID Start at 1 Increment by 1
EmployeeID Start at 1 Increment by 1
PropertyServiceID Start at 1 Increment by 1
Sample data are shown in Figure 3-38, Figure 3-39, Figure 3-40, Figure 3-41, and Figure 3-42. OwnerType is either Individual or Corporation. PropertyType is one of Office, Apartments, or Private Residence. ExperienceLevel is one of Unknown, Junior, Senior, Master or SuperMaster. These tables, referential integrity constraints, and data are used
Sample Data for Garden Glory OWNER Table OwnerID OwnerName OwnerEmailAddress OwnerType
1 Mary Jones [email protected] Individual
2 DT Enterprises [email protected] Corporation
3 Sam Douglas [email protected] Individual
4 UNY Enterprises [email protected] Corporation
5 Doug Samuels [email protected] Individual
Sample Data for Garden Glory OWNED_PROPERTY Table PropertyID PropertyName PropertyType Street City State ZIP OwnerID
1 Eastlake Building Office 123 Eastlake Seattle WA 98119 2
2 Elm St Apts Apartments 4 East Elm Lynwood WA 98223 1
3 Jefferson Hill Office 42 West 7th St Bellevue WA 98007 2
4 Lake View Apts Apartments 1265 32nd Avenue Redmond WA 98052 3
5 Kodak Heights Apts Apartments 65 32nd Avenue Redmond WA 98052 4
6 Jones House Private Residence 1456 48th St Bellevue WA 98007 1
7 Douglas House Private Residence 1567 51st St Bellevue WA 98007 3
8 Samuels House Private Residence 567 151st St Redmond WA 98052 5
as the basis for the SQL statements you will create in the exercises that follow. If possible, run these statements in an actual DBMS, as appropriate, to obtain your results. Name your database GARDEN_GLORY. Use data types consistent with the DBMS you are using. If you are not using an actual DBMS, consistently represent data types using either the MySQL, Microsoft SQL Server, or Oracle Database data types shown in Figure 3-5. For each SQL statement you write, show the results based on your data. Write SQL statements and answer questions for this database as follows:
FIGURE 3-40
Sample Data for Garden Glory EMPLOYEE Table EmployeeID LastName FirstName CellPhone ExperienceLevel
1 Smith Sam 206-254-1234 Master
2 Evanston John 206-254-2345 Senior
3 Murray Dale 206-254-3456 Junior
4 Murphy Jerry 585-545-8765 Master
5 Fontaine Joan 206-254-4567 Senior
FIGURE 3-41
Sample Data for Garden Glory GG_SERVICE Table ServiceID ServiceDescription CostPerHour
1 Mow Lawn 25.00
2 Plant Annuals 25.00
3 Weed Garden 30.00
4 Trim Hedge 45.00
5 Prune Small Tree 60.00
6 Trim Medium Tree 100.00
7 Trim Large Tree 125.00
FIGURE 3-42
Sample Data for Garden Glory PROPERTY_SERVICE Table PropertyServiceID PropertyID ServiceID ServiceDate EmployeeID HoursWorked
1 1 2 2019-05-05 1 4.50
2 3 2 2019-05-08 3 4.50
3 2 1 2019-05-08 2 2.75
4 6 1 2019-05-10 5 2.50
5 5 4 2019-05-12 4 7.50
6 8 1 2019-05-15 4 2.75
7 4 4 2019-05-19 1 1.00
8 7 1 2019-05-21 2 2.50
9 6 3 2019-06-03 5 2.50
10 5 7 2019-06-08 4 10.50
11 8 3 2019-06-12 4 2.75
12 4 5 2019-06-15 1 5.00
13 7 3 2019-06-19 2 4.00
G. Write an SQL statement to list LastName, FirstName, and CellPhone of employees who have worked on a property in Seattle. Use a subquery.
H. Answer question G but use a join using JOIN ON syntax. What are the consequences of using (or not using) the DISTINCT keyword in this version of the query?
I. Write an SQL statement to list LastName, FirstName, and CellPhone of employees who have worked on a property owned by a corporation. Use a subquery.
will you please explain thank you!
In: Computer Science
Database Systems
Lab Exercises
|
Dept_Code |
Dept_Name |
|
ICS |
Information and Computer Science |
|
COE |
Computer Engineering |
|
SWE |
Software Engineering |
|
SE |
System Engineering |
|
Faculty_Id |
Last_Name |
First_Name |
Dept |
|
100234 |
Hashim |
Ahmad |
ICS |
|
287234 |
Yoesuf |
Mohammed |
COE |
|
767636 |
Amn |
Faisal |
ICS |
|
557899 |
Hamzah |
Yusuf |
SE |
|
345256 |
Lukman |
Mousa |
SWE |
|
626277 |
Ali |
Isa |
COE |
|
246266 |
Dawood |
Ageel |
SE |
In: Computer Science
Use the Manufacturing database from “Excel Databases.xls” on Blackboard. Use Excel to develop a multiple regression model to predict Cost of Materials by Number of Employees, New Capital Expenditures, Value Added by Manufacture, and End-of-Year Inventories.
Locate the observed value that is in Industrial Group 12 and has 7 employees. Based on the model and the multiple regression output, what is the corresponding residual of this observation? Write your answer as a number, round to 2 decimal places.
**Answer should be 542.83, I just need to know how**
| SIC Code | No. Emp. | No. Prod. Wkrs. | Value Added by Mfg. | Cost of Materials | Value of Indus. Shipmnts | New Cap. Exp. | End Yr. Inven. | Indus. Grp. |
| 201 | 433 | 370 | 23518 | 78713 | 4 | 1833 | 3630 | 1 |
| 202 | 131 | 83 | 15724 | 42774 | 4 | 1056 | 3157 | 1 |
| 203 | 204 | 169 | 24506 | 27222 | 4 | 1405 | 8732 | 1 |
| 204 | 100 | 70 | 21667 | 37040 | 4 | 1912 | 3407 | 1 |
| 205 | 220 | 137 | 20712 | 12030 | 4 | 1006 | 1155 | 1 |
| 206 | 89 | 69 | 12640 | 13674 | 3 | 873 | 3613 | 1 |
| 207 | 26 | 18 | 4258 | 19130 | 3 | 487 | 1946 | 1 |
| 208 | 143 | 72 | 35210 | 33521 | 4 | 2011 | 7199 | 1 |
| 209 | 171 | 126 | 20548 | 19612 | 4 | 1135 | 3135 | 1 |
| 211 | 21 | 15 | 23442 | 5557 | 3 | 605 | 5506 | 2 |
| 212 | 3 | 2 | 287 | 163 | 1 | 2 | 42 | 2 |
| 213 | 2 | 2 | 1508 | 314 | 1 | 15 | 155 | 2 |
| 214 | 6 | 4 | 624 | 2622 | 1 | 27 | 554 | 2 |
| 221 | 52 | 47 | 2471 | 4219 | 2 | 292 | 929 | 3 |
| 222 | 74 | 63 | 4307 | 5357 | 2 | 454 | 1427 | 3 |
| 223 | 13 | 12 | 673 | 1061 | 1 | 20 | 325 | 3 |
| 224 | 17 | 13 | 817 | 707 | 1 | 84 | 267 | 3 |
| 225 | 169 | 147 | 8986 | 10421 | 3 | 534 | 2083 | 3 |
| 226 | 51 | 41 | 3145 | 4140 | 2 | 220 | 697 | 3 |
| 227 | 55 | 44 | 4076 | 7125 | 2 | 176 | 1446 | 3 |
| 228 | 84 | 76 | 3806 | 8994 | 2 | 423 | 1014 | 3 |
| 229 | 61 | 47 | 4276 | 5504 | 2 | 464 | 1291 | 3 |
| 231 | 27 | 22 | 1239 | 716 | 1 | 22 | 356 | 4 |
| 232 | 200 | 178 | 9423 | 8926 | 3 | 200 | 2314 | 4 |
| 233 | 294 | 250 | 11045 | 11121 | 3 | 189 | 2727 | 4 |
| 234 | 38 | 32 | 1916 | 2283 | 1 | 29 | 682 | 4 |
| 235 | 17 | 14 | 599 | 364 | 1 | 21 | 197 | 4 |
| 236 | 34 | 28 | 2063 | 1813 | 1 | 20 | 450 | 4 |
| 237 | 1 | 1 | 34 | 71 | 1 | 2 | 17 | 4 |
| 238 | 31 | 25 | 1445 | 1321 | 1 | 16 | 526 | 4 |
| 239 | 224 | 179 | 10603 | 12376 | 3 | 465 | 2747 | 4 |
| 241 | 83 | 68 | 5775 | 9661 | 3 | 539 | 578 | 5 |
| 242 | 172 | 147 | 10404 | 19285 | 4 | 1071 | 3979 | 5 |
| 243 | 257 | 209 | 13274 | 18632 | 4 | 711 | 3329 | 5 |
| 244 | 51 | 43 | 1909 | 2170 | 1 | 88 | 355 | 5 |
| 245 | 82 | 68 | 4606 | 7290 | 2 | 182 | 580 | 5 |
| 249 | 94 | 78 | 5518 | 8135 | 2 | 715 | 1604 | 5 |
| 251 | 273 | 233 | 12464 | 12980 | 3 | 481 | 3535 | 6 |
| 252 | 70 | 53 | 5447 | 4011 | 2 | 358 | 829 | 6 |
| 253 | 37 | 29 | 2290 | 5101 | 2 | 128 | 447 | 6 |
| 254 | 81 | 61 | 4182 | 3755 | 2 | 177 | 956 | 6 |
| 259 | 54 | 39 | 2818 | 2694 | 2 | 109 | 718 | 6 |
| 261 | 15 | 11 | 2201 | 3279 | 2 | 698 | 725 | 7 |
| 262 | 116 | 90 | 18848 | 20596 | 4 | 3143 | 4257 | 7 |
| 263 | 55 | 42 | 9655 | 10604 | 3 | 2360 | 1502 | 7 |
| 265 | 212 | 163 | 15668 | 24634 | 4 | 1352 | 3976 | 7 |
| 267 | 232 | 182 | 25918 | 28963 | 4 | 1750 | 5427 | 7 |
| 271 | 403 | 136 | 30692 | 8483 | 4 | 1277 | 894 | 8 |
| 272 | 121 | 16 | 17982 | 6940 | 3 | 311 | 1216 | 8 |
| 273 | 136 | 57 | 17857 | 8863 | 3 | 618 | 3736 | 8 |
| 274 | 69 | 25 | 9699 | 2823 | 2 | 144 | 874 | 8 |
| 275 | 604 | 437 | 38407 | 29572 | 4 | 2959 | 4300 | 8 |
| 276 | 41 | 28 | 3878 | 3811 | 2 | 198 | 688 | 8 |
| 277 | 21 | 12 | 3989 | 1047 | 2 | 66 | 577 | 8 |
| 278 | 65 | 50 | 4388 | 2055 | 2 | 130 | 504 | 8 |
| 279 | 55 | 39 | 4055 | 1098 | 2 | 210 | 236 | 8 |
| 281 | 80 | 45 | 16567 | 11298 | 3 | 2002 | 2644 | 9 |
| 282 | 115 | 79 | 25025 | 34596 | 4 | 3731 | 6192 | 9 |
| 283 | 213 | 106 | 59813 | 27187 | 4 | 4301 | 11533 | 9 |
| 284 | 126 | 75 | 31801 | 19932 | 4 | 1304 | 4535 | 9 |
| 285 | 51 | 28 | 8497 | 9849 | 3 | 404 | 2178 | 9 |
| 286 | 126 | 75 | 28886 | 46935 | 4 | 6269 | 8577 | 9 |
| 287 | 37 | 24 | 12277 | 11130 | 3 | 1025 | 2354 | 9 |
| 289 | 76 | 45 | 11547 | 13085 | 3 | 1006 | 2749 | 9 |
| 291 | 67 | 43 | 26006 | 132880 | 4 | 5197 | 10718 | 10 |
| 295 | 25 | 18 | 3464 | 6182 | 2 | 251 | 658 | 10 |
| 299 | 14 | 8 | 2187 | 4446 | 2 | 124 | 670 | 10 |
| 301 | 65 | 54 | 7079 | 7091 | 3 | 579 | 1067 | 11 |
| 302 | 8 | 7 | 442 | 496 | 1 | 9 | 175 | 11 |
| 305 | 61 | 46 | 4528 | 3805 | 2 | 341 | 1057 | 11 |
| 306 | 122 | 95 | 7275 | 7195 | 3 | 435 | 1411 | 11 |
| 308 | 763 | 598 | 55621 | 57264 | 4 | 5658 | 11874 | 11 |
| 311 | 15 | 12 | 1313 | 1865 | 1 | 52 | 404 | 12 |
| 313 | 3 | 2 | 162 | 163 | 1 | 1 | 35 | 12 |
| 314 | 37 | 31 | 1907 | 1682 | 1 | 35 | 716 | 12 |
| 315 | 2 | 2 | 53 | 85 | 1 | 12 | 62 | 12 |
| 316 | 6 | 4 | 747 | 395 | 1 | 18 | 199 | 12 |
| 317 | 8 | 7 | 328 | 255 | 1 | 6 | 75 | 12 |
| 319 | 7 | 6 | 233 | 177 | 1 | 4 | 40 | 12 |
| 321 | 12 | 9 | 1717 | 943 | 1 | 248 | 282 | 13 |
| 322 | 60 | 51 | 6532 | 3527 | 2 | 853 | 1505 | 13 |
| 323 | 64 | 50 | 4850 | 4254 | 2 | 493 | 883 | 13 |
| 324 | 17 | 13 | 3509 | 2282 | 2 | 495 | 828 | 13 |
| 325 | 31 | 25 | 2176 | 1387 | 1 | 201 | 700 | 13 |
| 326 | 45 | 36 | 2696 | 1183 | 1 | 154 | 600 | 13 |
| 327 | 205 | 152 | 15739 | 17010 | 4 | 1200 | 1966 | 13 |
| 328 | 17 | 13 | 999 | 565 | 1 | 50 | 263 | 13 |
| 329 | 72 | 53 | 7838 | 5432 | 2 | 464 | 1652 | 13 |
| 331 | 221 | 174 | 29180 | 45696 | 4 | 3433 | 12198 | 14 |
| 332 | 128 | 106 | 9061 | 6913 | 3 | 651 | 1543 | 14 |
| 333 | 35 | 26 | 4200 | 11184 | 3 | 635 | 1834 | 14 |
| 334 | 15 | 11 | 1410 | 5735 | 2 | 90 | 694 | 14 |
| 335 | 162 | 123 | 16670 | 31892 | 4 | 1761 | 6377 | 14 |
| 336 | 94 | 79 | 5856 | 4696 | 2 | 459 | 938 | 14 |
| 339 | 32 | 23 | 3164 | 2790 | 2 | 271 | 800 | 14 |
| 341 | 33 | 27 | 3999 | 9364 | 2 | 526 | 1453 | 15 |
| 342 | 140 | 107 | 11750 | 8720 | 3 | 620 | 3124 | 15 |
| 343 | 45 | 32 | 4412 | 3527 | 2 | 178 | 1121 | 15 |
| 344 | 432 | 315 | 27974 | 31527 | 4 | 1139 | 7204 | 15 |
| 345 | 104 | 81 | 6936 | 4909 | 2 | 421 | 1768 | 15 |
| 346 | 259 | 211 | 19880 | 21531 | 4 | 1908 | 3997 | 15 |
| 347 | 129 | 99 | 7793 | 6232 | 3 | 724 | 1181 | 15 |
| 348 | 40 | 24 | 3528 | 1689 | 2 | 85 | 1077 | 15 |
| 349 | 300 | 219 | 21718 | 19273 | 4 | 1273 | 6460 | 15 |
| 351 | 79 | 55 | 10513 | 12954 | 3 | 678 | 3679 | 16 |
| 352 | 94 | 70 | 9545 | 11858 | 3 | 414 | 3339 | 16 |
| 353 | 205 | 133 | 18178 | 23474 | 4 | 889 | 7344 | 16 |
| 354 | 295 | 211 | 22673 | 14343 | 4 | 1485 | 6730 | 16 |
| 355 | 192 | 110 | 19221 | 16515 | 4 | 1334 | 6823 | 16 |
| 356 | 265 | 172 | 23110 | 18543 | 4 | 1260 | 7898 | 16 |
| 357 | 259 | 96 | 41135 | 60857 | 4 | 2917 | 10277 | 16 |
| 358 | 201 | 147 | 17521 | 21819 | 4 | 907 | 4857 | 16 |
| 359 | 392 | 293 | 25322 | 13897 | 4 | 1568 | 4964 | 16 |
| 361 | 74 | 51 | 6700 | 5523 | 2 | 308 | 1495 | 17 |
| 362 | 171 | 120 | 14278 | 12657 | 3 | 784 | 3887 | 17 |
| 363 | 108 | 87 | 9466 | 12578 | 3 | 721 | 2299 | 17 |
| 364 | 157 | 117 | 13428 | 11065 | 3 | 671 | 3076 | 17 |
| 365 | 49 | 37 | 3459 | 7621 | 2 | 485 | 1070 | 17 |
| 366 | 258 | 120 | 38705 | 29591 | 4 | 2268 | 9467 | 17 |
| 367 | 588 | 368 | 84059 | 44486 | 4 | 14345 | 13145 | 17 |
| 369 | 151 | 106 | 13920 | 13398 | 3 | 1286 | 3514 | 17 |
| 371 | 772 | 634 | 105899 | 223639 | 4 | 10264 | 15852 | 18 |
| 372 | 377 | 190 | 45220 | 42367 | 4 | 2023 | 36814 | 18 |
| 373 | 141 | 108 | 7903 | 7760 | 3 | 351 | 2165 | 18 |
| 374 | 31 | 23 | 2590 | 4363 | 2 | 97 | 1233 | 18 |
| 375 | 18 | 14 | 1435 | 1674 | 1 | 131 | 412 | 18 |
| 376 | 81 | 29 | 9986 | 8120 | 3 | 490 | 4770 | 18 |
| 379 | 47 | 35 | 3564 | 5476 | 2 | 142 | 1102 | 18 |
| 381 | 186 | 68 | 21071 | 8760 | 4 | 1223 | 6183 | 19 |
| 382 | 272 | 141 | 29028 | 18028 | 4 | 1466 | 7681 | 19 |
| 384 | 268 | 157 | 31051 | 16787 | 4 | 1648 | 7761 | 19 |
| 385 | 27 | 17 | 2390 | 1020 | 1 | 197 | 426 | 19 |
| 386 | 61 | 36 | 14032 | 8114 | 3 | 724 | 2290 | 19 |
| 387 | 6 | 4 | 415 | 382 | 1 | 17 | 177 | 19 |
| 391 | 43 | 30 | 2761 | 3646 | 2 | 119 | 1451 | 20 |
| 393 | 13 | 10 | 685 | 506 | 1 | 15 | 328 | 20 |
| 394 | 103 | 76 | 8327 | 6604 | 3 | 396 | 2608 | 20 |
| 395 | 35 | 26 | 2643 | 1789 | 1 | 197 | 799 | 20 |
| 396 | 24 | 19 | 1406 | 997 | 1 | 51 | 415 | 20 |
| 399 | 179 | 123 | 11199 | 8530 | 3 | 595 | 2861 | 20 |
In: Statistics and Probability
Question #2 - Review 'Cars Database'. From this data set develop the following: a. One bivariate regression b. One multiple regression c. Provide an effective chart displaying each of the two regressions. Charts should be presentation ready with effective title and labels. d. Provide a brief description of each of the two regressions (please use a text box in your Excel spreadsheet for your descriptions). Also, be sure to correctly identify and describe your independent and dependent variables, linear equation (answer), R, R square, F statistics, t statistic, other.
| ENGINE | HORSE | WEIGHT | ACCEL | YEAR | CYLINDER | MPG |
| 307 | 130 | 3504 | 12 | 70 | 8 | 18 |
| 350 | 165 | 3693 | 12 | 70 | 8 | 15 |
| 318 | 150 | 3436 | 11 | 70 | 8 | 18 |
| 304 | 150 | 3433 | 12 | 70 | 8 | 16 |
| 302 | 140 | 3449 | 11 | 70 | 8 | 17 |
| 429 | 198 | 4341 | 10 | 70 | 8 | 15 |
| 454 | 220 | 4354 | 9 | 70 | 8 | 14 |
| 440 | 215 | 4312 | 9 | 70 | 8 | 14 |
| 455 | 225 | 4425 | 10 | 70 | 8 | 14 |
| 390 | 190 | 3850 | 9 | 70 | 8 | 15 |
| 383 | 170 | 3563 | 10 | 70 | 8 | 15 |
| 340 | 160 | 3609 | 8 | 70 | 8 | 14 |
| 400 | 150 | 3761 | 10 | 70 | 8 | 15 |
| 455 | 225 | 3086 | 10 | 70 | 8 | 14 |
| 113 | 95 | 2372 | 15 | 70 | 4 | 24 |
| 198 | 95 | 2833 | 16 | 70 | 6 | 22 |
| 199 | 97 | 2774 | 16 | 70 | 6 | 18 |
| 200 | 85 | 2587 | 16 | 70 | 6 | 21 |
| 97 | 88 | 2130 | 15 | 70 | 4 | 27 |
| 97 | 46 | 1835 | 21 | 70 | 4 | 26 |
| 110 | 87 | 2672 | 18 | 70 | 4 | 25 |
| 107 | 90 | 2430 | 15 | 70 | 4 | 24 |
| 104 | 95 | 2375 | 18 | 70 | 4 | 25 |
| 121 | 113 | 2234 | 13 | 70 | 4 | 26 |
| 199 | 90 | 2648 | 15 | 70 | 6 | 21 |
| 360 | 215 | 4615 | 14 | 70 | 8 | 10 |
| 307 | 200 | 4376 | 15 | 70 | 8 | 10 |
| 318 | 210 | 4382 | 14 | 70 | 8 | 11 |
| 97 | 88 | 2130 | 15 | 71 | 4 | 27 |
| 140 | 90 | 2264 | 16 | 71 | 4 | 28 |
| 113 | 95 | 2228 | 14 | 71 | 4 | 25 |
| 232 | 100 | 2634 | 13 | 71 | 6 | 19 |
| 225 | 105 | 3439 | 16 | 71 | 6 | 16 |
| 250 | 100 | 3329 | 16 | 71 | 6 | 17 |
| 250 | 88 | 3302 | 16 | 71 | 6 | 19 |
| 232 | 100 | 3288 | 16 | 71 | 6 | 18 |
| 350 | 165 | 4209 | 12 | 71 | 8 | 14 |
| 400 | 175 | 4464 | 12 | 71 | 8 | 14 |
| 351 | 153 | 4154 | 14 | 71 | 8 | 14 |
| 318 | 150 | 4096 | 13 | 71 | 8 | 14 |
| 383 | 180 | 4955 | 12 | 71 | 8 | 12 |
| 400 | 170 | 4746 | 12 | 71 | 8 | 13 |
In: Statistics and Probability
Use the International Stock Market database from “Excel Databases.xls” on Blackboard. Use Excel to develop a multiple regression model to predict the DJIA by the Nasdaq, the S&P 500, the Nikkei, the Hang Seng, the FTSE 100, and the IPC. Performing a stepwise regression analysis at a 5% level of significance, add the independent variable from Step 2 and continue to perform the stepwise regression analysis until you have reached the best linear model. Which independent variables are in the best linear model? Check all that apply.
Excel Data Here
https://drive.google.com/file/d/1TQG5r2wzLGk--75whZXyb0SDTHZTWS0S/view?usp=sharing
A: Nasdaq
B: S&P 500
C: Nikkei
D: Hang Seng
E: FTSE 100
F: IPC
Choose All Answers That Apply
In: Statistics and Probability
Problem 1. Please create the following tables for a tool rental database with appropriate primary keys & foreign keys. [30 points]
Assumptions:
The list of tables is:
Tables:
Cust Table:
cid, -- customer id
cname, --- customer name
cphone, --- customer phone
cemail, --- customer email
Category table:
ctid, --- category id
ctname, --- category name
parent, --- parent category id since category has a hierarchy structure, power washers, electric power washers, gas power washers. You can assume that there are only two levels.
Tool:
tid, --- tool id
tname, --- tool name
ctid, --- category id, the bottom level.
quantity, --- number of this tools
Time_unit table allowed renting unit
tuid, --- time unit id
len, --- length of period, can be 1 hour, 1 day, etc.
min_len, --- minimal #of time unit, e.g., hourly rental but minimal 4 hours.
Tool_Price:
tid, --- tool id
tuid, --- time unit id
price, -- price per period
Rental:
rid, --- rental id
cid, --- customer id
tid, --- tool id
tuid, --- time unit id
num_unit, --- number of time unit of rental, e.g., if num_unit = 5 and unit is hourly, it means 5 hours.
start_time, -- rental start time
end_time, --- suppose rental end_time
return_time, --- time to return the tool
credit_card, --- credit card number
total, --- total charge
In: Computer Science
Create a relational database schema consisting of the four relation schemas representing various entities recorded by a furniture company.
Write CREATE TABLE statements for the following four relation schemas. Define all necessary attributes, domains, and primary and foreign keys.
Customer(CustomerID, Name, Address)
FullOrder(OrderID, OrderDate, CustomerID)
Request(OrderID, ProductID, Quantity)
Product(ProductID, Description, Finish, Price)
You should assume the following: Each CustomerID is a number with at most three digits, each OrderID is a number with at most five digits, and each ProductID is a number with at most two digits. Each Name is at most 25 characters long, and each Address is at most 50 characters long. Each Description is at most 28 characters long, and each Finish is at most 10 characters long. Quantity and Price are integer and float respectively.
In this schema, primary and foreign keys are not marked. Identify primary and foreign keys and other custom constraints. Declare PK and FK in your CREATE TABLE statement and custom constraints as follows:
Populate the database as follows:
CUSTOMER:
CUSTOMERID NAME ADDRESS
---------------------- ------------------------------ --------------------
2 CASUAL FURNITURE PLANO, TX
6 MOUNTAIN GALLERY BOULDER, CO
FULLORDER:
ORDERID ORDERDATE CUSTOMERID
---------------------- ------------------------- ----------------------
1006 24-MAR-10 2
1007 25-MAR-10 6
1008 25-MAR-10 6
1009 26-MAR-10 2
PRODUCT:
PRODUCTID DESCRIPTION FINISH PRICE
---------------------- ------------------------------ ---------- ----------
10 WRITING DESK OAK 425
30 DINING TABLE ASH 600
40 ENTERTAINMENT CENTER MAPLE 650
70 CHILDRENS DRESSER PINE 300
REQUEST:
ORDERID PRODUCTID QUANTITY
---------------------- ---------------------- ----------------------
1006 10 4
1006 30 2
1006 40 1
1007 40 3
1007 70 2
1008 70 1
1009 10 2
1009 40 1
Remember to insert the records containing primary key values before inserting the records containing the foreign keys that reference those values (or your insert statements will fail).
Display the contents of each table by adding four statements of the form SELECT * FROM TABLE_NAME ; to the end of your script, where TABLE_NAME is substituted by the four table names above.
In order to avoid conflicts, include DROP TABLE commands for all four tables before your CREATE TABLE statements. Either drop tables containing foreign keys before the tables containing the referenced primary keys, or use CASCADE CONSTRAINTS. Verify that the tables have been defined correctly before going on to the next step.
Run the complete script. Be sure that that the contents of the four tables are displayed correctly by your script.
Submit a Q1.sql file.
Note:
You must code this schema using ‘Create Table’ statements . You should not use any other tool except Oracle SQLDeveloper. No points will be given for auto-generated schemas using other 3rd party tools or web-based editors.
In: Computer Science
Internet Case 20.4 – Using the SEC EDGAR Database
(MUST POST FIRST) Initial Post – As an employee, write an internal memo to your manager addressing the following:
Visit the home page of The Securities & Exchange Commission at the following address: www.sec.gov
Use EDGAR to locate the most recent 10-K by researching an
automotive company of your choice on the Internet and examine its
consolidated income statement.
WRITE A MEMORANDUM INCLUDING
1. In the most recent year reported, what percentage of the company’s total revenue was from financial services?
2. In the most recent year reported, what was the company’s gross profit as a percentage of automotive sales?
3. How might the company’s sales mix (e.g., trucks, cars, sport utility vehicles, etc.) influence its profitability?
In: Accounting
Go onto PsychInfo (or some other database) and find a study that uses archival data. Give me a very brief (two to three sentence) synopsis of the study. What did they look at, and what did they find? Make sure you look at an actual peer-reviewed study (and not just an article that tells you what archival research studies are!)
PLEASE GIVE ME A DIFFERENT ANSWER THAN THE ONE GIVEN BEFORE (I mean, this questions was already answered, but I need a different answer than the one already given.) if the question is unclear, please tell me how it is unclear.
In: Psychology
Internet Case 20.4 – Using the SEC EDGAR Database
(MUST POST FIRST) Initial Post – As an employee, write an internal memo to your manager addressing the following:
Visit the home page of The Securities & Exchange Commission at the following address: www.sec.gov
Use EDGAR to locate the most recent 10-K by researching an automotive company of your choice on the Internet and examine its consolidated income statement.
I CHOOSE GENERAL MOTORS
In the most recent year reported, what percentage of the company’s total revenue was from financial services?
In the most recent year reported, what was the company’s gross profit as a percentage of automotive sales?
How might the company’s sales mix (e.g., trucks, cars, sport utility vehicles, etc.) influence its profitability?
In: Accounting