csc321: database management systems

134
CSC321: Database Management Systems Dr. Zhen Jiang Computer Science Department West Chester University West Chester, PA 19383

Upload: evelyn

Post on 23-Feb-2016

55 views

Category:

Documents


4 download

DESCRIPTION

CSC321: Database Management Systems. Dr. Zhen Jiang Computer Science Department West Chester University West Chester, PA 19383. Why this class? Job hunting WCU graduated, Database, Software Engineering, … vs. UPenn , Temple, Drexel, … Something help you to stand out! - PowerPoint PPT Presentation

TRANSCRIPT

CST221: Database Systems (II)

CSC321: Database Management SystemsDr. Zhen JiangComputer Science DepartmentWest Chester UniversityWest Chester, PA 19383Why this class?Job huntingWCU graduated, Database, Software Engineering, vs.UPenn, Temple, Drexel, Something help you to stand out! How do you like to be introduced?Research projectCritical thinking, communication, well-plan, etc.Real competition, deadline, pressureMore realistic system, complex programming, for instance, http://www.cis.temple.edu/~jiang/RSU_van.pptx. Student opportunities: http://www.cs.wcupa.edu/~zjiang/student_info.htm SponsorshipNSF, NSA, etcIndustry interns

NSF REUCollaborative work at inter-department levelCollaboration at inter-disciplinary level

Course projectCollaboration at international level Student Opportunities

Industry partnersSuch as Gnostech, Chase, etc.Invited talks in coursesSeminars or guest speechesCurriculum review/assessmentPermanent intern opportunities

GoalCompetitive students entrepreneurially and computationally empowered citizenriesTemple, NYU, etc. IBM, SAP, Vanguard, Bell lab, etc. Key Attract students and keep them continuously working hardStrategyReal-world computing paradigms and principles in an obstacle-less learning

No pain, no gainNeed to handle those things coming from pressure: frustration, upset, madness, etc.Looking for solution, not excuse.Deadline!

Class website (including ppt)+ google searchHands-on experienceGroup discussion Happy ending!

Database, Database management system, and AccessShelly, Cashman, Pratt, Microsoft Office Access 2007 Comprehensive Concepts and Techniques, Course Technology

Access

Input each piece of information manually

Design view to change the format type (especially useful for currency and date input)

Database Systems & AccessPage: AC14Page: AC44Exercise 1: http://www.cs.wcupa.edu/~zjiang/csc321_lab1.docx Creating a reportReport wizard, page AC50-AC56Input & OutputLoad/import data from external resource, Page AC211Plain text file

Excel file (xls or xlsx)

QueryingCreation (Query wizzard) SaveUseWildcard (*, ?), page AC87Use criteria for a field not included in the result list, page AC88Parameter Query, page AC89Comparison Operator, page AC94Compound criterion (AND, OR), page AC 95Sorting, page AC97Omitting duplicates, page AC 100Multiple keys (high priority from left to right), page AC101Top-value query, page AC 102Multiple table, page AC103Calculated field, page AC 113Calculating Statistics and Aggregate Values, page AC 117

31Exercise 2: http://www.cs.wcupa.edu/~zjiang/csc321_lab2.docx

Show the name and age and salary of all employees who are younger than 25.

Double click the items to include in the list

Add criteria to meet the certain requirement

Datasheet viewDesign viewComparison Operator, such as same row, OR => different rows)Sorting (By default, it is sorted in ascending order)Use criteria for a field not included in the result list, disabled show propertyMultiple keys (high priority from left to right)Top-value query, return in top design viewParameter Query, [ ] in dnum field, or any name that has not been used as column names (possiblily a misspelled column name) Calculated field, zoom in shortcut menu (e.g., Total Amount:[Amount Paid]+[Current Due])Calculating Statistics (built-in statistics)Multiple table, share fieldAggregations (statistics with group by)

Show the Enum, name, salary of all employees whose names have 5 letters.

Show the name, Enum ,salary, and age of all employees with a salary > $40,000 AND younger than 25

Show the Enum of all employees sorted by salary (i.e., in the ascending order by default)

Hidden column for criteria (not displayed in the list) Q4EnumE909E303E404E222E202E101E707E606E505E808

Show the Enum of all employees sorted by salary (in ascending order) and LName (in descending alphabetical order)Q4EnumE909E303E404E222E202E101E707E606E505E808Q4EnumE303E909E404E222E202E101E707E606E505E808Which? List top 5 high paid employees.

List the LName of all employees in the department (Dnum) entered by the user.

List the LName of all employees with a new column labeled hiring age, which has a value by subtracting the years of working (wYears) from the current age (age).

List the max, min, and average of salary for all employees.

Multiple table (AC 105-109)DeptDnumDnameCityD22Web WCD25Databases NYD28Software LAEmpEnumLNameagesalaryDnumwYearsE101Jones45$56,000.00D2512E202Anders66$46,000.00D2225E303Smith34$25,000.00D229E404Rivera22$30,000.00D251E505Brown45$80,000.00D2517E606Caldwell52$70,000.00D2820E707Stiles44$65,000.00D2811E808Walker48$90,000.00D2221E909Hartman20$25,000.00D281E222Carter29$35,000.00D253Multiple tables and aggregations (statistics with group)Exercise 3: http://www.cs.wcupa.edu/~zjiang/csc321_lab3.docx For each employee, print out his/her name and the department name.

Calculation of aggregate values (aggregations, statistics with grouping)

Show the average age (label as average age) and average salary (label as average salary) for all employees

For all employees under 30, show a count of these employees and their average salary.

Show the max, min and average age for all employees in Dept SoftwareMultiple tables are needed!

Still sounds incorrect!

For all employees in department D22 or D28, show a count of these employees, their average age, and maximum salary

What will be the result?

For each department list avg, max and min age, along with a count of employees in each department.

For each department find a count and average salary for all employees younger than 40.

For each department with an average salary of >40000 list the dnums, employee count for these departments.

For each department with less than 4 employees, show the average age and number of employees.

For each department with more than 2 people over 40 list deptNum, and a count of these people.

Project 1Submit accdb file. MaintenanceRecord addition, page AC 144Search, page AC 145Record update, page AC 147Record deletion, page AC 148Filter, page AC 149