|
6 | 6 | "source": [ |
7 | 7 | "# Final Project\n", |
8 | 8 | "\n", |
9 | | - "- Define \n", |
10 | | - "- Populate (fake data)\n", |
11 | | - "- Query \n", |
| 9 | + "In this project, you will write Python code to (a) define, (b) populate, and (c) query a database. \n", |
| 10 | + "Your submission can be a single Jupyter notebook with these three clearly=defined sections. \n", |
12 | 11 | "\n", |
| 12 | + "You can propose your own database problem. In that case, first, describe its specification and purpose in detail. \n", |
| 13 | + "Otherwise, use the \"Hiring\" database specification below.\n", |
13 | 14 | "\n", |
14 | | - "The complexity of the schema must be on the scale of 6-12 tables." |
| 15 | + "The complexity of the schema must be at least 6 tables. \n", |
| 16 | + "It must be populated with a sufficient amount of data to allow interesting queries. \n", |
| 17 | + "You can use real data if available or generate fake data.\n", |
| 18 | + "\n", |
| 19 | + "Compose at least 12 nontrivial queries that use the major patterns we learned in class: selection, projection, joins, subqueries, and aggregations.\n", |
| 20 | + "\n" |
15 | 21 | ] |
16 | 22 | }, |
17 | 23 | { |
18 | 24 | "cell_type": "markdown", |
19 | 25 | "metadata": {}, |
20 | 26 | "source": [ |
21 | | - "Schema Design\n", |
| 27 | + "## Schema specification: \"Hiring database\"\n", |
| 28 | + "\n", |
| 29 | + "The schema design \n", |
22 | 30 | "\n", |
23 | | - "1. A company has open positions \n", |
24 | | - "2. Each position has a set of required or desired skills. \n", |
25 | | - "3. Candidates have skills of different level (intermediate or proficient)\n", |
26 | | - "4. " |
| 31 | + "1. Hiring managers have a name, phone, and email. \n", |
| 32 | + "2. A hiring manager can create job postings, including a job title, job description, open date, and the annual salary range (min and max). \n", |
| 33 | + "3. Each job posting has a set of required skills. You can use a set of programming languages as skills, including SQL and Python.\n", |
| 34 | + "4. Job seekers create profiles thas a name, phone, and email. \n", |
| 35 | + "5. Job seekers also list their skills. \n", |
| 36 | + "6. A job seeker can create an application for a specific job. \n", |
| 37 | + "7. A job manager can schedule an interview for a specific application for a specific date.\n", |
| 38 | + "8. A successful interview can lead to a job offer, including the start date and a starting salary. \n", |
| 39 | + "9. The offer is followed by an acceptance. " |
27 | 40 | ] |
28 | 41 | }, |
29 | 42 | { |
30 | | - "cell_type": "code", |
31 | | - "execution_count": null, |
| 43 | + "cell_type": "markdown", |
32 | 44 | "metadata": { |
33 | 45 | "vscode": { |
34 | 46 | "languageId": "plaintext" |
35 | 47 | } |
36 | 48 | }, |
37 | | - "outputs": [], |
38 | 49 | "source": [ |
39 | | - "Populate\n", |
| 50 | + "## Populate\n", |
40 | 51 | "\n", |
41 | | - "- At least four positions\n", |
42 | | - "- At least 300 candidates" |
| 52 | + "- At least three hiring managers\n", |
| 53 | + "- At least 20 positions\n", |
| 54 | + "- At least six skills\n", |
| 55 | + "- At least 30 job seekers\n", |
| 56 | + "- At least 50 applications\n", |
| 57 | + "- At least 30 interviews\n", |
| 58 | + "- At least 10 job offers\n", |
| 59 | + "- At least 5 job acceptances." |
43 | 60 | ] |
44 | 61 | }, |
45 | 62 | { |
46 | | - "cell_type": "code", |
47 | | - "execution_count": null, |
| 63 | + "cell_type": "markdown", |
48 | 64 | "metadata": { |
49 | 65 | "vscode": { |
50 | 66 | "languageId": "plaintext" |
51 | 67 | } |
52 | 68 | }, |
53 | | - "outputs": [], |
54 | 69 | "source": [ |
55 | | - "20 queries of increasing levels of complexity" |
| 70 | + "### Queries\n", |
| 71 | + "\n", |
| 72 | + "If your query output is too long, limit it to 10 rows.\n", |
| 73 | + "\n", |
| 74 | + "1. List all open jobs requiring SQL, including the number of applicants for each. Do not include jobs for which someone has already accepted an offer.\n", |
| 75 | + "\n", |
| 76 | + "2. List all skills, including the number of jobs requiring that skill, and the average salary range for jobs requiring this skill.\n", |
| 77 | + "\n", |
| 78 | + "3. List all hiring managers, including the number of jobs they have posted, the number of interviews the have given, and the number of job offers they have issued, and the number of accepted offers.\n", |
| 79 | + "\n", |
| 80 | + "3. List all job seekers who have applied for two or more jobs.\n", |
| 81 | + "\n", |
| 82 | + "4. List the numes of all job seekers who have been given a job offer but have not yet accepted.\n", |
| 83 | + "\n", |
| 84 | + "5. List all job applications for which the job candidate has all the required skills. \n", |
| 85 | + "\n", |
| 86 | + "6. List the top three job postings with the most applications.\n", |
| 87 | + "\n", |
| 88 | + "Finally, write three more interesting queries, first describing them.\n", |
| 89 | + "\n" |
56 | 90 | ] |
57 | 91 | }, |
58 | 92 | { |
|
0 commit comments