CSCI-UA:0060-02. Database Design & Web Implementation. Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com

Similar documents
UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

BM482E Introduction to Computer Security

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

Introduction: Database management system

Web Development using PHP (WD_PHP) Duration 1.5 months

Logistics. Database Management Systems. Chapter 1. Project. Goals for This Course. Any Questions So Far? What This Course Cannot Do.

Goals. Managing Multi-User Databases. Database Administration. DBA Tasks. (Kroenke, Chapter 9) Database Administration. Concurrency Control

Database Security. Principle of Least Privilege. DBMS Security. IT420: Database Management and Organization. Database Security.

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

Customer Bank Account Management System Technical Specification Document

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Winter 2009 Lecture 1 - Class Introduction

An Approach to Implement Map Reduce with NoSQL Databases

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Databases and SQL. The Bioinformatics Lab SS Wiki topic 10. Tikira Temu. 04. June 2013

Discovering SQL. Wiley Publishing, Inc. A HANDS-ON GUIDE FOR BEGINNERS. Alex Kriegel WILEY

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

Oracle Database Cloud Services OGh DBA & Middleware Day

Java EE Web Development Course Program

SQL Injection Vulnerabilities in Desktop Applications

Principles of Database. Management: Summary

Database Extension 1.5 ez Publish Extension Manual

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

DTWMS Required Software Engineers. 1. Senior Java Programmer (3 Positions) Responsibilities:

Basic Concepts of Database Systems

Computer Security: Principles and Practice

FROM RELATIONAL TO OBJECT DATABASE MANAGEMENT SYSTEMS

SAP HANA SPS 09 - What s New? SAP HANA Multitenant Database Containers

iservdb The database closest to you IDEAS Institute

Introductory Concepts

Database Assessment. Vulnerability Assessment Course

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

IT360: Applied Database Systems. Database Security. Kroenke: Ch 9, pg PHP and MySQL: Ch 9, pg

Open is as Open Does: Lessons from Running a Professional Open Source Company

1 File Processing Systems

CatDV Pro Workgroup Serve r

Cloud Service Model. Selecting a cloud service model. Different cloud service models within the enterprise

Topics. Introduction to Database Management System. What Is a DBMS? DBMS Types

Overview of Databases On MacOS. Karl Kuehn Automation Engineer RethinkDB

Transactions and Concurrency Control. Goals. Database Administration. (Manga Guide to DB, Chapter 5, pg , ) Database Administration

Database Management System Choices. Introduction To Database Systems CSE 373 Spring 2013

NoSQL replacement for SQLite (for Beatstream) Antti-Jussi Kovalainen Seminar OHJ-1860: NoSQL databases

Cyber Security Challenge Australia 2014

owncloud Architecture Overview

SMART Solutions for Active Directory Migrations

HYBRID. Course Packet

SQL Server for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

Intruduction to Groovy & Grails programming languages beyond Java

Lotus Domino Security

Web development... the server side (of the force)

How To Let A Lecturer Know If Someone Is At A Lecture Or If They Are At A Guesthouse

XDB. Shared MySQL hosting at Facebook scale. Evan Elias Percona Live MySQL Conference, April 2015

SurfCop for Microsoft ISA Server. System Administrator s Guide

THE SEMANTIC WEB AND IT`S APPLICATIONS

Assistant Information Technology Specialist. X X X software related to database development and administration Computer platforms and

A Brief Introduction to MySQL

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Oracle Database: SQL and PL/SQL Fundamentals NEW

High Availability and Scalability for Online Applications with MySQL

Oracle E-Business Suite APPS, SYSADMIN, and oracle Securing Generic Privileged Accounts. Stephen Kost Chief Technology Officer Integrigy Corporation

Geodatabase Programming with SQL

Guide to Web Hosting in CIS. Contents. Information for website administrators. ITEE IT Support

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Fall 2007 Lecture 1 - Class Introduction

GigaSpaces XAP.NET Administration Training ADMINISTRATION, MONITORING AND TROUBLESHOOTING GIGASPACES XAP.NET DISTRIBUTED SYSTEMS

Penetration testing. A step beyond missing patches and weak passwords

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

Big Data Architecture & Analytics A comprehensive approach to harness big data architecture and analytics for growth

How To Write A Web Server In Javascript

FIFTH EDITION. Oracle Essentials. Rick Greenwald, Robert Stackowiak, and. Jonathan Stern O'REILLY" Tokyo. Koln Sebastopol. Cambridge Farnham.

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

REST web services. Representational State Transfer Author: Nemanja Kojic

Certified Selenium Professional VS-1083

Database Scalability and Oracle 12c

ICADBS504A Integrate database with a website

Chapter 14: Databases and Database Management Systems

GigaSpaces XAP 9.7 Administration Training ADMINISTRATION, MONITORING AND TROUBLESHOOTING GIGASPACES XAP DISTRIBUTED SYSTEMS

Avatier Identity Management Suite

In This Lecture. Security and Integrity. Database Security. DBMS Security Support. Privileges in SQL. Permissions and Privilege.

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

MEGA Web Application Architecture Overview MEGA 2009 SP4

TRANSACÇÕES. PARTE I (Extraído de SQL Server Books Online )

An Open Source NoSQL solution for Internet Access Logs Analysis

Building Java Servlets with Oracle JDeveloper

Migration and Building of Data Centers in IBM SoftLayer with the RackWare Management Module

database abstraction layer database abstraction layers in PHP Lukas Smith BackendMedia

Data Discovery and Systems Diagnostics with the ELK stack. Rittman Mead - BI Forum 2015, Brighton. Robin Moffatt, Principal Consultant Rittman Mead

Oracle Database 10g Express

MySQL 5.0 vs. Microsoft SQL Server 2005

Transformation of honeypot raw data into structured data

5 Mistakes to Avoid on Your Drupal Website

Rapid SQL XE Product Reviewer Guide

Agenda. SQL Injection Impact in the Real World Attack Scenario (1) CHAPTER 8 SQL Injection

Pro<DOC/> e-commerce Technology An Introduction

Ursuline College Accelerated Program

Transcription:

CSCI-UA:0060-02 Database Design & Web Implementation Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com Lecture #27: DB Administration and Modern Architecture:The last real lecture. Database Design and Web Implementation

Administrivia Homework HW 9 Is Out Do Some Reading Check Out Python and MongoDB Book Database Design and Web Implementation 2

On The Menu Modern Architecture PHP Stack vs. AJAX Stack Simple Twitter via Apis Database Migrations Optimization Concurrency Issues Database Administration Roles Application Architecture Environments Database Design and Web Implementation 3

Our Architecture HTML Database Design and Web Implementation 4

Alternative (Modern Architecture) API Data Response JSON XML HTTP Data Request HTML Web Server Database Design and Web Implementation 5

API Design in PHP Easy - instead of writing out HTML we'll write out some other type of data - in this example we'll use JSON Two New Commands to do this header('content-type: application/json'); json_encode([php_array]); Twitter example User profile Tweets Database Design and Web Implementation 6

Real Database Application Architecture User HTTP Port 80 HTTP Port 80 DB Connection Load Balancer Firewall Application Server Database Server Database Design and Web Implementation 7

Database Roles Often a database application will have many classes of users DBA, Developer, Analytics, End User MySQL Allows Administrators to grant certain classes of users certain privileges. SELECT, UPDATE, INSERT, DELETE, ALTER All customizable on a user level All customizable on a table level Database Design and Web Implementation 8

Data Staff Customers Sales Paintings Artists Sales Staff Insert Change Query Insert Query Query Curator Query Query Insert Gallery Owner DBMS Admin. Insert Change Query Modify structures; Grant rights Insert Change Query Modify structures; Grant rights Change Query Insert Change Query Modify structures; Grant rights Query Insert Change Query Insert Change Query Modify structures; Grant rights Database Design and Web Implementation 9

Environments Often applications are developed in a multitiered environment Development The place where the code get's written Should be similar to staging, but often its somebody's laptop Staging Computing environment that is technically identical to production except for scale and load Production Where the code is run for real Database Design and Web Implementation 10

Database Roles & Environments Development The developer is has God-like powers over all aspects of the system Staging The developer has some access to staging servers and database Production The developer likely does not have access to production servers. Database Design and Web Implementation 11

Database Migration Often in production applications it becomes necessary to change the underlying schema or data without interrupting operations. A Database migration is an sequence of database operations designed to alter a database without disturbing the overall integrity of its data. Generally written by developers but applied by database administrators Database Design and Web Implementation 12

Run the DBMS behind a firewall!! Apply all patches to the OS and DBMS Use the least functionality possible Disable all unnecessary access and network protocols; restrict user access; disable guest users, etc Protect the computer itself (lock it up!!!) Manage accounts and user groups carefully E.g. forbid null passwords Plan for security emergencies Database Design and Web Implementation 13

Database Optimization In production performance is often overriding priority, so optimization often becomes hugely important. Optimizations include Index Creation View Materialization Query Optimization De-normalization (gasp) Database Design and Web Implementation 14

Definition: to insure that one user s work does not inappropriately influence another user s work. Example: A user should be able to set up an airline reservation for a customer and get the same result whether there are 5, 50, or 500 users on the system at the time. Database Design and Web Implementation 15

Concurrency control requires trade-offs For example, one user could obtain strict concurrency control by locking the entire database and then nobody else could work! All multi-user systems require a schema for managing concurrency control, not just database systems Database Design and Web Implementation

Group together database actions based on the task These are commonly designated as Start transaction Commit transaction Rollback transaction if needed Database Design and Web Implementation 17

Locks can be implicit (set by the system) or explicit (set by the programmer) Granularity of a lock: indicates the size. For example, the large granularity of locking an entire file insures the transaction but prevents other users from working. Locks with small granularity require much more code (e.g. locking one record) but conflicts among users are less common. Database Design and Web Implementation 18

LUWs: logical units of work For example, given a sale: Change the customer s record: increase the amount due Change the salesperson s record to increase the commission earned Insert the new order record into the database Database Design and Web Implementation 19

When two users are vying for the same resource and each has locked the other s. For example: User A has locked the clients file to add a client User B has locked the accounts file to add an account User A needs to add an account for the new client User B needs to assign a client to the new account Both users cannot relinquish the lock on their respective file before completing the transaction(s). Every database system has algorithms to deal with this! Database Design and Web Implementation 20

Technical Interviews - A Word Not you're typical job interview Interviewer wants to establish both your technical proficiency and problem solving ability. Problem solving is easier to gauge in an interview Sketch out a system Solve a very specific technical problem Database Design and Web Implementation 21

Finally - The Final Areas we will cover Relational Design MySQL PHP PHP + MySQL SQLite MongoDB Database Design and Web Implementation 22