Download presentation
Presentation is loading. Please wait.
1
CSE4701 Introduction to Databases
Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 371 Fairfield Way, Box U-255 Storrs, CT (860) 486–4818 (Office) (860) (CSE Office)
2
Course Goals Provide a Practical Introduction to Database Models, Theory, and Systems Focus on Both Theory and Practice Theory Demonstrates Strong Mathematical Basis of Databases (Relational Model and Concurrency Control) Practice Provides Experimental Framework for Illustrating Theory (Actual Database Systems and their Usage) Exposure to Research Problems and Real-World Experiences
3
Course Philosophy Introduction to Fundamental Database Concepts
Promotion of Knowledge-Acquisition, Self-Learning, and Independence Rapid Evolution of Computing Always Must Keep Skills Up-to-Date “Learn how to Learn” Relevance of Database Concepts in Computing Software Engineering Object-Oriented Computing Operating Systems and Networks Almost Every Computer Science Area Practical Exposure to SQL, JDBC, and DB Platform (MySQL and Workbench)
4
Textbooks and Class Materials
UConn Bookstore has One Required Text … Fundamentals of Database Systems, Elmasri and Navathe, Addison-Wesley 6th (2009) edition CSE4701 Web Site at … All Course Notes, Project Materials, Web Site Links, Available On-Line Other Class Materials Various other Web Sites
6
Syllabus: Weekly Topic Coverage
Weeks Topic Chapters FOCUS ON CHAPTER TOPIC - NUMBERS FOR 6th/5th eds. 1 Introduction/Overview Ch 1,2 1.5 Relational Model Ch 3&6 6e, 7 5e 1 Basic & Advanced SQL Ch 4&5 6e, 8 5e 1.5 Conceptual DB/ER Model Ch 7&8 6e, 3&4 5e 1 ER-Relational Transl. Ch 9 6e, 5 6e 1.5 DB Design, Normal Forms Ch 15&16 6e, 14 5e 1 XML & SQL Prog/PHP Ch 12&13&14 6e 1 Design/Storage/Index Ch 17&18 6e, 13&14 5e 1 System Catalog/Query Op Ch 19 6e, 17&18 5e 1 Trans Proc/Conc. Cont. Ch 21&22 6e, 19&20 5e 1 Security & Recovery Ch 22&23 6e, 21&22 5e 1 DBMS/Web/Mining Ch 26/28/29 6e, 24/26/27 5e 1 One Semester Exams + Final Exam
7
Course Projects and Exams
Projects: Individual &/or Team (30-50% of Grade) In Process of Being Defined We’ll Review … Exams (40-50% of Grade) Midterm and Final – ITE334/338 Open Book, Open Notes, Web Access Home works (0-20%) Throughout the Semester - In Class also If no credit, Up to 2 Bonus Pts. Per Handed in Assignment Sp15/Fa15 – 40%P, 50%E, 10%H Must Pass Both Projects And Exams to PASS!!! Note: All Subject to Change – Use Breakdown that Most Benefits Students
8
Cheating/Collaboration
Not Tolerated in Any Form!!! Severe Penalties are Likely!!! See University of Connecticut Student Conduct Code All Homeworks/Some Project Represent Individual Effort! Remaining Projects Represent Team Effort Cooperative Problem Solving and Sharing Code is NOT Permitted and Will Likely Lead to Fs! Electronic Information is More Accessible! Use Protection Capabilities on your Account to Protect your Files!
9
Lateness Policies/Exams
Late Assignments (Projects) will Not be Accepted Except with Prior Permission or Emergencies Prior Permission: Contact the Instructor Three Days Before the Due Date Emergencies: Illness, Death in the Family, etc. Contact S. Demurjian at ITE265, x6-4818, by or via the CSE Office, ITE250, x6-3719 A Late Assignment is Recorded as a Zero Grade Assignment Due Date Means Start of Class!!! Makeup on Absent Exam at Instructor’s Discretion
10
Class Attendance and Computing
Attendance in Class is … Responsibility of each Student May Result in Missing Hint/Clarification/Error on Class Project Change in Due Date or Exam Date I Won’t Guarantee that All Information Makes it to Web! Computing for Class is … Predominately PCs - ITE Concourse Level or Engineering Learning Center (ITE 1st floor) Take Files with You! Your Responsibility to Protect Your Files
11
Remainder of Today’s Material
What is a Database? Motivation, Defining, Tables, Querying Main Software for the Course MySQL and MySQL Workbench Other Technologies XAMPP and MyphpAdmin A Useful Windows Utility Homework 0 Introducing the Semester Project
12
What is a Database? Database (DB) is a Structured Collection of Data about the Entities that Exist in an Enterprise and that are Used (Shared) by Applications of an Enterprise The Structure of the Database is Dependent Upon the Data Model that is Used - Understanding the Terms: Database (DB) Database System (DBS) Database Management Systems (DBMS) What can be a Database? Address Book, Contact List, Calendar, Bookmarks, Flat File Against Which a Program is Executed, Real-Time Data Sensor Feed into Embedded Program, Set of Word or Excel Documents, Fitness Data from App or Device, Recipes, etc.
13
What Does a Database Contain?
Conceptually – One View Consider Excel Spreadsheet with Multiple Tabs Tabs: Employee, Department, Projects, Each Tab has Columns that Each have Own Types Each Tab has Data for All Columns/Multiple Rows Data is Static, Human Readable/Updateable
14
Excel Spreadsheet Example
15
What Does a Database Contain?
Conceptually – Another View Consider a set of Java Classes Employee, Manager ISA Employee, Department, Projects, etc. Each Class has Single Instance Need to Use Collection in Java for Set of Instances class Employee { private String Name, SSN, Address; private Date BirthDate; private double Salary; private integer DeptNum; public Empolyee() { ... }; };
16
What are Problems with each?
Both Cases: Data is Not Stored in a Permanent Repository Data Not easily Sharable/Modified by Multiple Users Simultaneously Data Consistency Constraints Not Enforceable DeptNum in Employee/Project vs. Number in Department Same Issue across Classes Need Way to Persistently store Data Accessible by Multiple Users
17
Defining a Database Table
CREATE TABLE EMPLOYEE ( FNAME VARCHAR(15) NOT NULL , MINIT CHAR , LNAME VARCHAR(15) NOT NULL , SSN CHAR(9) NOT NULL , BDATE DATE ADDRESS VARCHAR(30) , SEX CHAR , SALARY DECIMAL(10,2) , SUPERSSN CHAR(9) , DNO INT NOT NULL , PRIMARY KEY (SSN) , FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) , FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUMBER) ) ;
18
A Schema Contains Multiple Tables
19
…filled with Rows of Tuples/Instances
Which Represent Tuples/Instances of Each Relation A S C null W B 1 4 5
20
…filled with Rows of Tuples/Instances
21
SQL Searches the Tables
Retrieve the Birthdate and Address of the Employee whose Name is 'John B. Smith'. SELECT BDATE, ADDRESS FROM EMPLOYEE WHERE FNAME='John' AND MINIT='B’ AND LNAME='Smith’ Which Row(s) are Selected? B S C null W
22
Main Software for Class
MySQL and MySQL Workbench
23
Loading a Database Schema
Select File, Open SQL Script, and browse to the directory to select demo sql and from the window below, select, the Open option
24
Loading a Database Schema
25
The Database Tables
26
To Load a Database – back to this Tab Click on Localhost
MySQL and MySQL Workbench
27
Takes five or more Minutes
Result is Following Screen Select Run SQL Script choose demo sql Note: Lots of Data, Takes five or more Minutes
28
Takes five or more Minutes
Result is Following Screen Select Run SQL Script choose demo sql Note: Lots of Data, Takes five or more Minutes
29
Screen that Appears while Loading .sql
30
Resulting Screen to Query Database
31
Querying the Database SELECT * FROM OpenMRS.Person;
32
Result of Query
33
Query Results Window
34
Export to csv
35
Extended Entity Relation Diagram
36
SELECT * FROM OpenMRS.Person;
37
SELECT * FROM OPENMRS.person_name;
38
Person & Person_name Tables link person_id
39
Other Technologies - XAMPP
XAMPP includes: Apache, PHP, MySQL, and other goodies. No need to download and install them separately, XAMPP does it all. Download: FAQs (Includes instructions on how to install it and set it up): Windows FAQs: OSX FAQs: Linux FAQs:
40
The XAMPP Control Panel
41
Other Use Technologies -phpMyAdmin
44
What to Watch Out for… Suppose Install MySQL + Workbench
Then Install XAMPP Which Also Installs MySQL May End up with Multiple Instances of MySQL On Windows/Control Panel/Admin Tools/Services
45
Useful on Windows Control Panel-Admin Tools - Services Stop Start
Pause Service
46
Homework 0 Install MySQL Homework 0
Homework 0 Install and Play with Chinook and Northwind DBs Also Explore XAMPP and MyphpAdmin
47
Chinook Loaded with Query on Employee Arrow shows save to a csv file
48
Query Results in Excel
49
Project Focus Design, Extend, Develop, and Test a UI/ Information System for Customers and Employees of Either: NorthwindExtended Database Sample – Database of Employees, Customers, Suppliers, etc. Phases I and II posted … may be updated before assigned
50
Northwind
51
Clients and Software Architecture
Web Client Connect and Interact with MySQL REST php API MySQL Web Client Front half contains API (Java calls) that hide DB interactions from Client Back half is the implementation of the classes that contains code to open the database connection, perform a query, collect results, etc.
52
Project Requirements Team Project - Discussion Between Teams Allowed if you are Helping with DB Configuration, Programming Question, etc., NOT Joint Design/Development! Will either Be Teams of 3 Implementation Languages/Platform DB/Server side: MySQL Workbench, php UI Aptana Studio 3 Mobile UI App Framework Should work on Chrome
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.