CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.

Slides:



Advertisements
Similar presentations
LIS651 lecture 5 direct use of wotan Thomas Krichel
Advertisements

CS1020 Week 3: 29th January 2015.
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
A crash course in njit’s Afs
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
Welcome to Linux & Shell Scripting Small Group How to learn how to Code Workshop small-group/
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Unix Basics Chapter 4.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
Copyright (c) by CNAPTICS Corporation. All rights reserved.1 INFO Oracle Database 11g: Administration II Presented By: Marc S. Paller,
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
Introduction to Programming Using C An Introduction to Operating Systems.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Web programming Part 1: environment 由 NordriDesign 提供
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
ICE UNIX TUTORIAL. File System Commands cd – change directory cd – change directory ls – list contents ls – list contents rm – remove/delete rm – remove/delete.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Learning Unix/Linux Based on slides from: Eric Bishop.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
INF1343, Winter 2012 Data Modeling and Database Design Yuri Takhteyev Faculty of Information University of Toronto This presentation is licensed under.
CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
Welcome to INF1343! Database Modeling and Database Design This presentation is licensed under Creative Commons Attribution License, v To view a copy.
CCT1343, Week 3 SQL Queries Using Multiple Tables This presentation is licensed under Creative Commons Attribution License, v To view a copy of this.
INF1343, Week 6 Implementing a Database with SQL This presentation is licensed under Creative Commons Attribution License, v To view a copy of this.
CCT395, Week 6 Implementing a Database with SQL and a Case Study Exercise This presentation is licensed under Creative Commons Attribution License, v.
CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
Review Why do we use protection levels? Why do we use constructors?
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
CCT395, Week 5 Translating ER into Relations; Normalization This presentation is licensed under Creative Commons Attribution License, v To view a.
Tutorial Six Linux Basics CompSci Semester Two 2016.
Overview of Linux Fall 2016 Dr. Donghyun Kim
Introduction to Unix for FreeSurfer Users
ENEE150 Discussion 01 Section 0101 Adam Wang.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
CS1010: Intro Workshop.
Development Environment Basics
Review Databases and Objects
Web Programming Essentials:
Special Topics in CCIT: Databases
Andy Wang Object Oriented Programming in C++ COP 3330
Introduction to Linux Dr Karina Kubiak - Ossowska
Part 3 – Remote Connection, File Transfer, Remote Environments
Assignment Preliminaries
Data Modeling and Database Design INF1343, Winter 2012 Yuri Takhteyev
LING 408/508: Computational Techniques for Linguists
Introduction to UNIX UNIX developed at Bell Labs in 70s
Introduction to Linux Week 0 - Thursday.
Web Programming Essentials:
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Command line.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Lab 2: Terminal Basics.
DIBBs Brown Dog Tutorial Setup
Presentation transcript:

CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution License, v To view a copy of this license, visit This presentation incorporates images from the Crystal Clear icon collection by Everaldo Coelho, available under LGPL from

Week 7 Catchup and Case Studies

Introduction 1-Table SQL The ER Model Conversion Joins Normalization Catchup Applications Advanced SQL Documents Security Performance

Normal Forms 4 th Normal Form BC Normal Form 3 rd Normal Form 2 nd Normal Form 1 st Normal Form 5 th Normal Form No multi-valued attributes No improper dependencies Yet more decomposition

3NF? (vote_id, kitten1_id, kitten2_id, kitten1_caption, kittern2_caption, vote)

3NF? (photo_id, caption, date_uploaded, user_id, user_name, pro?, camera_id, width, height, num_comments) (user_id, user_name, pro?, photo_id, comment_text, date_posted)

3NF? (photo_id, caption, date_uploaded, user_id, user_name, pro?, camera_id, width, height, num_comments) (comment_id, user_id, user_name, pro?, comment_text, date_posted, photo_id)

Real Life Examples

Non-ER Diagrams Flowcharts Sequence diagrams Data flow diagrams All of those are NOT ER diagrams

Flowcharts

Custome r 2. Acce pt Orde r order informatio n orders 3. Dispa tch Orde r Warehouse book data 1. Locat e Book order informatio n book informatio n quer y book informatio n

LOAD DATA load data local infile "«filename»" into table «table»; load data local infile "/tmp/pets.csv" into table pet;

Getting the Data Simplest: Export from Excel / OpenOffice Alternatively: Edit in a text editor

SCP Option 1: In the terminal Option 2: A GUI client (PSCP, WinSCP)

A Terminal App / Bash OSX: “Terminal” (pre-installed) Linux: “gnome-terminal” (pre-installed) Windows: “git-bash” from Git (you can use PuTTY if you prefer)

SSH ssh

More Unix Commands ls – list files in a directory cd – change directory mkdir – create (make) a directory rm – delete (“remove”) a file or directory cp – copy a file or directory less – view a text file nano – edit a text file mysql – start mysql client some of those commands are available both in your local and remote bash, some just on the server

Anatomy of the Unix Command cp -r /play/yoda /tmp/yoda2 the commandarguments options (may have their own arguments)

Some Examples cd /play go to directory “/play” Hint: press [Tab] after typing “/pl” ls list the files in the current directory cd yoda go to directory “yoda” Hint: press [Tab] after typing “y” ls Hint: use [ ↑ ] for earlier commands

Some Examples less force.txt Hint: press [Tab] after typing “f” Hint: press “q” to exit less cd.. go to up one level ls cd locked go to directory “sandbox” Hint: you don't have the permissions

Some Examples cd sandbox mkdir obiwan create a directory “obiwan” (use your own name) ls we should see everyone's directory cd obiwan go to your directory

Some Examples ls /play/yoda/ What was that file called again? less /play/yoda/force.txt Let's look at it again. cp /play/yoda/force.txt. copy “force.txt” to the local directory nano force.txt edit force.txt Hint: ^ means [Control]

Options ls -sh list files with file sizes cp -r /play/yoda. copy “recursively” less -N force.txt. show the file with line numbers

Getting Help man ls user manual for the ls command

Directories /home/okenobi user's “home” directory ~ alias for user's home directory e.g. “ls ~”. current directory.. parent of the current directory

Web Pages /home/okenobi/public_html/ user's website, maps to bi cd ~/public_html nano index.html (Press Ctrl-X to save and quit.) See for intro to HTML.

Redirection command > file.txt write the output to file command < file.txt feed the content of file to the command command1 | comman2 send the output of command1 to command2 (We'll see examples in a second.)

SQL From a File cd ~ cp /play/yoda/humans.sql. mysql < humans.sql run mysql client feeding it the contents of “non-humans.sql” mysql h.txt save the output into “h.txt” Exercise: create a file “ewoks.sql” that would give us a list of Ewoks.

Remote to Local scp /local/dir e.g.: scp usernam e host (server) remote file local directory

Local to Remote scp /local/file e.g.: scp pets.csv

João’s Fair Trade Coffee