CSE4701 Introduction to Databases

Slides:



Advertisements
Similar presentations
CSE 4701 Project-1 Semester Project Requirements Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 191.
Advertisements

OV-1.1 CSE4701 CSE4701 Introduction to Databases Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 371.
OV-1.1 CSE4100 CSE4100 Programming Language Translation Prof. Steven A. Demurjian, Sr. Computer Science & Engineering Department The University of Connecticut.
CS 104 Introduction to Computer Science and Graphics Problems Introduction to Database (2) Basic SQL 12/05/2008 Yang Song.
OV-1.1 CSE244 CSE244 Programming Language Translation Aggelos Kiayias Computer Science & Engineering Department The University of Connecticut 371 Fairfield.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Students: Nadia Goshmir, Yulia Koretsky Supervisor: Shai Rozenrauch Industrial Project Advanced Tool for Automatic Testing Final Presentation.
Overview of SQL Server Alka Arora.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
OV-1.1 CSE2102 CSE2102 Intro to Software Engineering Prof. Steven A. Demurjian, Sr. Director, CS&E Graduate Program Computer Science & Engineering Department.
Course Introduction Software Engineering
CS461: Principles and Internals of Database Systems Instructor: Ying Cai Department of Computer Science Iowa State University Office:
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
1 Working with MS SQL Server Textbook Chapter 14.
INFS614, Dr. Brodsky, GMU1 Database Management Systems INFS 614 Instructor: Professor Alex Brodsky
Introduction. » How the course works ˃Homework ˃Project ˃Exams ˃Grades » prerequisite ˃CSCI 6441: Mandatory prerequisite ˃Take the prereq or get permission.
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
OV-1.1 CSE230 CSE230 Introduction to Databases Prof. Steven A. Demurjian, Sr. Computer Science & Engineering Department The University of Connecticut 371.
Database Management Systems
CSE202 Database Management Systems
Information System Applications
2nd year Computer Science & Engineer
Databases (CS507) CHAPTER 2.
DBM 380 AID Focus Dreams/dbm380aid.com
CS4222 Principles of Database System
CSE3002 Social, Ethical & Prof. Issues in CSE History of Computing
CIS 336 AID Your Dreams Our Mission/cis336aid.com
Entity- Relationship (ER) Model
CS320 Web and Internet Programming SQL and MySQL
GO! with Microsoft Office 2016
Chapter 1: Introduction
Database System Concepts and Architecture
Relational database and SQL MySQL LAMP SQL queries
Seminar 10 : OODB Design (Self-Study)
Introduction to Web programming
Principles of Software Development
Seminar 6 : OODB Schema in ODL
GO! with Microsoft Access 2016
Welcome to GC311 Database Concepts
Lecture 1 Introduction to Database
PHP / MySQL Introduction
Translation of ER-diagram into Relational Schema
CIS 336 str Competitive Success/snaptutorial.com
DBM 380 AID Lessons in Excellence-- dbm380aid.com.
CIS 336 str Education for Service- -snaptutorial.com.
CIS 336 STUDY Lessons in Excellence-- cis336study.com.
DBM 380 Education for Service/snaptutorial.com
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
CIS 336 str Teaching Effectively-- snaptutorial.com.
CS 174: Server-Side Web Programming February 12 Class Meeting
Welcome to GC311 Database Concepts
CSE255 Final Exam Advice and Hints
CSE4701 Introduction to Databases
Intro to Relational Databases
Analysis models and design models
Project Phase II Instructions &Sample Code
Introduction to Database Programs
Computer Science Projects Database Theory / Prototypes
CS3220 Web and Internet Programming SQL and MySQL
Course Overview CS 4640 Programming Languages for Web Applications
Introduction to Database Programs
CSE4102 Programming Languages
Lecture 1: Overview of CSCI 485 Notes: I presented parts of this lecture as a keynote at Educator’s Symposium of OOPSLA Shahram Ghandeharizadeh Director.
Lecture 1: Overview of CSCI 485 Notes: I presented parts of this lecture as a keynote at Educator’s Symposium of OOPSLA Shahram Ghandeharizadeh Associate.
Course Overview CS 4640 Programming Languages for Web Applications
CMPE/SE 131 Software Engineering March 7 Class Meeting
Web Application Development Using PHP
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CSE4701 Introduction to Databases Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 371 Fairfield Way, Box U-255 Storrs, CT 06269-3255 steve@engr.uconn.edu http://www.engr.uconn.edu/~steve (860) 486–4818 (Office) (860) 486-3719 (CSE Office)

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

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)

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 … www.engr.uconn.edu/~steve/Cse4701/cse4701.html All Course Notes, Project Materials, Web Site Links, Available On-Line Other Class Materials Various other Web Sites

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

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) Likely Two Exams and Final Open Book and Open Notes 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

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!

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 steve@engr.uconn.edu, 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

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

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

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.

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

Excel Spreadsheet Example

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() { ... }; };

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

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) ) ;

A Schema Contains Multiple Tables

…filled with Rows of Tuples/Instances Which Represent Tuples/Instances of Each Relation A S C null W B 1 4 5

…filled with Rows of Tuples/Instances

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

Main Software for Class MySQL and MySQL Workbench

Loading a Database Schema Select File, Open SQL Script, and browse to the directory to select demo-1.11.0.sql and from the window below, select, the Open option

Loading a Database Schema

The Database Tables

To Load a Database – back to this Tab Click on Localhost MySQL and MySQL Workbench

Takes five or more Minutes Result is Following Screen Select Run SQL Script choose demo-1.12.0.sql Note: Lots of Data, Takes five or more Minutes

Takes five or more Minutes Result is Following Screen Select Run SQL Script choose demo-1.11.0.sql Note: Lots of Data, Takes five or more Minutes

Screen that Appears while Loading .sql

Resulting Screen to Query Database

Querying the Database SELECT * FROM OpenMRS.Person;

Result of Query

Query Results Window

Export to csv

Extended Entity Relation Diagram

SELECT * FROM OpenMRS.Person;

SELECT * FROM OPENMRS.person_name;

Person & Person_name Tables link person_id

Other Technologies - XAMPP XAMPP includes: Apache, PHP, MySQL, and other goodies. No need to download and install them separately, XAMPP does it all. Download: https://www.apachefriends.org/download.html FAQs (Includes instructions on how to install it and set it up): Windows FAQs: https://www.apachefriends.org/faq_windows.html OSX FAQs: https://www.apachefriends.org/faq_osx.html Linux FAQs: https://www.apachefriends.org/faq_linux.html

The XAMPP Control Panel

Other Use Technologies -phpMyAdmin

Another Useful Capability 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

On Windows/Control Panel/Admin Tools/Services Stop Start Pause Service

Homework 0 Install MySQL Homework 0 http://www.engr.uconn.edu/~steve/Cse4701/MySQLinstall.docx Homework 0 http://www.engr.uconn.edu/~steve/Cse4701/cse4701hw0Instructions.docx Install and Play with Chinook and Northwind DBs Also Explore XAMPP and MyphpAdmin

Chinook Loaded with Query on Employee Arrow shows save to a csv file

Query Results in Excel

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 http://noeticforce.com/best-hybrid-mobile-app-ui-frameworks-html5-js-css Should work on Chrome

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. https://code.google.com/p/northwindextended/ Phases I and II posted … may be updated before assigned

Northwind

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.