The URL of the whole system is:

Size: px
Start display at page:

Download "The URL of the whole system is:"

Transcription

1 &6)LQDO3URMHFW )DOO %RRN6WRUH'DWDEDVH :HE%DVHG 0DQDJHPHQW,PSOHPHQWDWLRQ 7R 'U6RQ&DR7UDQ )URP 7HDP %R'X <X3DQ ;LQ[LD$Q ^EGX\SDQ[DQ`#FVQPVXHGX 'DWH'XH'HFHPEHU 'DWH6XEPLWWHG'HFHPEHU

2 Purpose: Web-based database management is used in a lot of areas in today s world. This project is to implement an online bookstore. This design uses MySQL as the core DBMS and CGI (Common Gateway Interface) to generate web page to manage the data in the tables. The system will provide super-user (or manager) to access and manipulate the database entry. The users can use the web pages to register to our online bookstore, to place and modify orders. The system will also give user a query method to retrieve the information from the database as to certain criteria. Design: The URL of the whole system is: There are three functional modules in the system. The manager of the bookstore has the ability to access all the database tables and do browsing and modifications (insertion and deletion). The manager can also maintain the database of the customer. The customer can register to the bookstore for the first time user. They can modify their own personal profile and make orders of purchase or cancel the orders. Any ordinary user can browses the bookstore database either use HTML browsing or use SQL command browsing. We are trying out best to make this looks more like a real online bookstore. Therefore the whole project has been divided into several modules with different security levels. The basic scheme of our design is showed in Appendix A. There are 4 tables used in this system, as listed in Appendix B-1. Commands used to create these tables are listed in Appendix B-2. To make our design work, the E/R diagram is the first step to make the relationships clear in the whole database. The E/R diagram is attached in Appendix C. For each entry in the database, some of them can be a NULL value, but some are required, thus appropriate constraints are necessary. The constraints that we enforced are listed in Appendix D. The "HTML Browse" part of this project includes two functionalities - providing a interface for the users/customers to look up the book information (no user and order information) from the book table, and a interface for the managers to browse all the content of all the tables. 1. Book Look-up Interface The book look-up interface for the users is implemented by a single perl cgi script, not a

3 HTML file. The main reason for this is to avoid to hard-code the column names inside a HTML page, so it may still work fine if the attribute names of the book table get changed in the future. We distinguish between the attributes of character type and the attributes of numeric type while taking and handling the input conditions for search from the users. For the numeric attributes, i.e., the price,pages,copy,year and edition attributes, we require the users to have a relation operator like >, <, =, >= and so on in each of the input fields in the interface. The embedded javascript will alert the user if this requirement is not met. These operators are directly used to construct a SQL query. For all attributes of character type, we just take the input conditions and construct a SQL query using a 'like' clause. The users have the choice on which columns to display in the query output. Each column is associated with a checkbox. When checked, the corresponding column will appear in the output tuples. For each of the output tuples which are not out of stock, a link to the "Add a new book order" page, is attached. So the users could order a book directly on their look-up results. (For Dubo,The bookid is not sent over yet because the add-new-order program reads input from STDIN, not from an environment variable) 2. DB Table Browse Interface While the book look-up interface just allows the users to look up book information, the DB Table Browse Interface allows the managers to browse all the content of all the tables including the user table and orderinfo table. This interface includes a drop-down list to choose a table to browse and a multiple selection list to choose which columns of this table to display. One feature of this interface is that both the drop-down list and multiple selection list are generated dynamically by looking up the databases. That is, there is no hard-code component in the implementation and it will always work whatever changes the managers make on the database structure. Both of these interfaces also provide the capability of searching by performing a query.

4 Conclusion: This database implementation system utilizes the MySQL DBMS and using CGI to manipulate the data in the database. It is a very good practice of what we have learned in the database course. In the design of this application system, we successfully implement modulo design and every team member did a very good job. We considered the security issues in the real world and give a primitive yet efficient implementation. In considering of the future development, the whole system is very expandable. It leaves enough space and corresponding interface to add more functional modules.

5 Appendix A. Basic function stucture: Book Store Management (password protected) User Applications Add Modify Delete User Order Browse Error Book Entry Entry Deletion Operation Database Report Entry (2) (3) (4) (5) (6) (7) (1) (password protected) Place a Cancel User HTML SQL New Order an order Browse Query Add a New User Change User Information Work Load: - Yu Pan: 1, 2, 3 - Bo Du: 4, 5, 7 - Xinxia An: 6

6 Appendix B-1. Tables used in the system Table Schemas: Table1. book: Field Type Null Key Default Extra BookID varchar(15) PRI CallNo varchar(10) Title varchar(100) ISBN varchar(20) Author varchar(100) YES NULL Subject varchar(20) YES NULL Edition int(11) YES 1 Pages int(11) YES 0 Copy int(11) YES 0 Status varchar(20) YES in stock Price float YES 0 Year year(4) YES NULL Publisher varchar(100) YES NULL Memo varchar(255) YES NULL Table2. user: Field Type Null Key Default Extra ID varchar(9) PRI firstname varchar(10) lastname varchar(10) gender char(1) YES NULL age int(11) YES NULL address varchar(50) YES NULL varchar(30) phone varchar(10) YES NULL description varchar(100) YES NULL Table3. orderinfo: Field Type Null Key Default Extra OrderID varchar(10) PRI User varchar(9) BookID varchar(15) OrderDate date Quantity int(11) 0 Status varchar(10) Canc tinyint(1)

7 Table4. passwd: Field Type Null Key Default Extra ssn varchar(9) PRI pwd varchar(12) There is another password file for the security concern.

8 Appendix B-2. SQL commands used to create the tables in Appendix B-1: CREATE TABLE book ( BookID varchar(15) PRIMARY KEY, CallNo varchar(10) NOT NULL, Title varchar(100) NOT NULL, ISBN varchar(20) NOT NULL, Author varchar(100), Subject varchar(20), Edition int DEFAULT 1, Pages int DEFAULT 0, Copy int DEFAULT 0, Status varchar(20) DEFAULT "in stock", Price float DEFAULT 0, Year year(4), Publisher varchar(100), Memo varchar(255) ); CREAT TABLE user ( ID varchar(9) PRIMARY KEY, firstname varvhar(10) NOT NULL, lastname varchar(10) NOT NULL, gender char(1) CHECK(gender in ( F, M )), age int, address varchar(50), varchar(30) NOT NULL, phone varchar(10), description varchar(100) ); CREATE TABLE orderinfo ( OrderID varchar(10) PRIMARY KEY, User varchar(9) NOT NULL, BookID varchar(15) NOT NULL, OrderDate date NOT NULL, Quantity int NOT NULL, Status varchar(10) NOT NULL, Canc bool NOT NULL ); CREATE TABLE passwd ( ssn varchar(9) PRIMARY KEY, pwd varchar(12) NOT NULL );

9 Appendix C. E/R diagram Title CallNo Pages Subject ISBN BookID Author Edition Price Copy Year Book Publisher Memo Status Orderinfo OrderID OderDate Canc Quantity phone address User description gender age lastname firstname ID

10 Appendix D. Constraints 1. Constrains on the tables: For the Book Insertion part: INSERT INTO book (BookID, CallNo, Title, ISBN [, Author] [, Subject] [, Edition] [, Pages] [, Copy] [, Status] [, Price] [, Year] [, Publisher] [, Memo]) VALUES (<newid>, <newcallno>, <newtitle>, <newisbn>, [, <newauthor>] [, <newsubject>] [, <newedition>] [, <newpages>] [, <newcopy>] [, <newstatus>] [, <newprice>] [, <newyear>] [, <newpublisher>] [, <newmemo>]); For the Book deletion part: Delete from book Where [BookID like %<value1>% ] [and CallNo like %<value2>% ] [and ISBN like %<value3>% ] [and Title like %<value4>% ] For the Book Information Update part: UPDATE book SET BookID = <newid>, CallNo = <newcallno>, Title = <newtitle>, ISBN = <newisbn> [, Author = <newauthor>] [, Subject = <newsubject> ] [, Edition = <newedition>] [, Pages = <newpages>] [, Copy = <newcopy>] [, Status = <newstatus>] [, Price = <newprice>] [, Year = <newyear>] [, Publisher = <newpublisher>] [, Memo = <newmemo>]) [Where] [BookID like %<value1>% ] [and CallNo like %<value2>% ] [and ISBN like %<value3>% ] [and Title like %<value4>% ] 2. Constrains on the operation: For the Book Insertion part: 1. BookID, CallNo, Title, and ISBN must have a value, warning information will be returned if no value presents and operation will fail. 2. The length of user input for each field are controlled according to the database schema. 3. Only digits are allowed for Edition, Copy, Pages, and Year fields. Warning information will be returned for invalid user input and operation will fail. 4. There won t be warning information for invalid input of Price field. It is the user s responsibility of giving correct floating point number. The operation will fail without notifying the user. For the Book Insertion part: 1. User can enter any string for BookID, CallNo, Title, and ISBN. All records that satisfies the condition will be returned.

11 2. All records that satisfies the condition will be deleted once user confirm the deletion and can not be take back. For the Book Information Update part 1. User can enter any string for BookID, CallNo, Title, and ISBN or leave them empty. But if multiple records that satisfy the condition found, a warning information will be returned and ask the user to redefine the search condition. 2. All constrains for insertion will still hold for update. 3. User can even change the BookID. But if the same BookID was already in the database, warning information will be returned and operation will fail. For user insertion and modification part, similarly, all required fields in the database are checked using Javascript before the value get into the database tables.

Create a simple database with MySQL

Create a simple database with MySQL Create a simple database with MySQL 1.Connect the MySQL server through MySQL Workbench You can achieve many database operations by typing the SQL langue into the Query panel, such as creating a database,

More information

Where Are We? Next Few Lectures. Integrity Constraints Motivation. Constraints in E/R Diagrams. Keys in E/R Diagrams

Where Are We? Next Few Lectures. Integrity Constraints Motivation. Constraints in E/R Diagrams. Keys in E/R Diagrams Where Are We? Introduction to Data Management CSE 344 Lecture 15: Constraints We know quite a bit about using a DBMS Start with real-world problem, design ER diagram From ER diagram to relations -> conceptual

More information

Working with Databases and Java

Working with Databases and Java Working with Databases and Java Pedro Contreras Department of Computer Science Royal Holloway, University of London January 30, 2008 Outline Introduction to relational databases Introduction to Structured

More information

Oracle Database 10g Express

Oracle Database 10g Express Oracle Database 10g Express This tutorial prepares the Oracle Database 10g Express Edition Developer to perform common development and administrative tasks of Oracle Database 10g Express Edition. Objectives

More information

EGCI 321: Database Systems. Dr. Tanasanee Phienthrakul

EGCI 321: Database Systems. Dr. Tanasanee Phienthrakul 1 EGCI 321: Database Systems Dr. Tanasanee Phienthrakul 2 Chapter 10 Data Definition Language (DDL) 3 Basic SQL SQL language Considered one of the major reasons for the commercial success of relational

More information

Creating Tables, Defining Constraints. Rose-Hulman Institute of Technology Curt Clifton

Creating Tables, Defining Constraints. Rose-Hulman Institute of Technology Curt Clifton Creating Tables, Defining Constraints Rose-Hulman Institute of Technology Curt Clifton Outline Data Types Creating and Altering Tables Constraints Primary and Foreign Key Constraints Row and Tuple Checks

More information

Introduction to SQL on GRAHAM ED ARMSTRONG SHARCNET AUGUST 2018

Introduction to SQL on GRAHAM ED ARMSTRONG SHARCNET AUGUST 2018 Introduction to SQL on GRAHAM ED ARMSTRONG SHARCNET AUGUST 2018 Background Information 2 Background Information What is a (Relational) Database 3 Dynamic collection of information. Organized into tables,

More information

SQL Data Definition Language: Create and Change the Database Ray Lockwood

SQL Data Definition Language: Create and Change the Database Ray Lockwood Introductory SQL SQL Data Definition Language: Create and Change the Database Pg 1 SQL Data Definition Language: Create and Change the Database Ray Lockwood Points: DDL statements create and alter the

More information

Database Management Systems,

Database Management Systems, Database Management Systems SQL Query Language (1) 1 Topics Introduction SQL History Domain Definition Elementary Domains User-defined Domains Creating Tables Constraint Definition INSERT Query SELECT

More information

Private Institute of Aga NETWORK DATABASE LECTURER NIYAZ M. SALIH

Private Institute of Aga NETWORK DATABASE LECTURER NIYAZ M. SALIH Private Institute of Aga 2018 NETWORK DATABASE LECTURER NIYAZ M. SALIH Data Definition Language (DDL): String data Types: Data Types CHAR(size) NCHAR(size) VARCHAR2(size) Description A fixed-length character

More information

Department of Computer Science University of Cyprus. EPL342 Databases. Lab 2

Department of Computer Science University of Cyprus. EPL342 Databases. Lab 2 Department of Computer Science University of Cyprus EPL342 Databases Lab 2 ER Modeling (Entities) in DDS Lite & Conceptual Modeling in SQL Server 2008 Panayiotis Andreou http://www.cs.ucy.ac.cy/courses/epl342

More information

Database Management Systems,

Database Management Systems, Database Management Systems Database Design (2) 1 Topics Data Base Design Logical Design (Review) Physical Design Entity Relationship (ER) Model to Relational Model Entity Relationship Attributes Normalization

More information

Introduction to Data Management CSE 344

Introduction to Data Management CSE 344 Introduction to Data Management CSE 344 Lecture 16: Constraints CSE 344 - Fall 2014 1 Announcements Sections tomorrow: XML. Quiz and next HW on XML posted soon, due next week after midterm HW 4 due tomorrow

More information

Introduction to Database Systems CSE 414

Introduction to Database Systems CSE 414 Introduction to Database Systems CSE 414 Lecture 16: Constraints CSE 414 - Spring 2015 1 Announcements Reminders: Web quiz due Monday night XML homework due Wednesday night Today: Constraints (7.1, 7.2,

More information

Information Systems Engineering. SQL Structured Query Language DDL Data Definition (sub)language

Information Systems Engineering. SQL Structured Query Language DDL Data Definition (sub)language Information Systems Engineering SQL Structured Query Language DDL Data Definition (sub)language 1 SQL Standard Language for the Definition, Querying and Manipulation of Relational Databases on DBMSs Its

More information

CS 327E Lecture 2. Shirley Cohen. January 27, 2016

CS 327E Lecture 2. Shirley Cohen. January 27, 2016 CS 327E Lecture 2 Shirley Cohen January 27, 2016 Agenda Announcements Homework for today Reading Quiz Concept Questions Homework for next time Announcements Lecture slides and notes will be posted on the

More information

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS 1 INTRODUCTION TO EASIK EASIK is a Java based development tool for database schemas based on EA sketches. EASIK allows graphical modeling of EA sketches and views. Sketches and their views can be converted

More information

CLASS DISCUSSION AND NOTES

CLASS DISCUSSION AND NOTES Mon CLASS DISCUSSION AND NOTES October 2009 Tue Wed Thu Fri 19 20 21 22 23 AH-6; PBL & Project Peer Evaluations Chap. 7 SQL/DB Construction AH-6; PBL & Project Peer Evaluations Chap. 7 SQL/DB Construction

More information

Chapter Five Physical Database Design

Chapter Five Physical Database Design Chapter Five Physical Database Design 1 Objectives Understand Purpose of physical database design Describe the physical database design process Choose storage formats for attributes Describe indexes and

More information

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data. Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting

More information

205CDE Developing the Modern Web. Assignment 2 Server Side Scripting. Scenario D: Bookshop

205CDE Developing the Modern Web. Assignment 2 Server Side Scripting. Scenario D: Bookshop 205CDE Developing the Modern Web Assignment 2 Server Side Scripting Scenario D: Bookshop Introduction This assignment was written using PHP programming language for interactions with the website and the

More information

How to use SQL to create a database

How to use SQL to create a database Chapter 17 How to use SQL to create a database How to create a database CREATE DATABASE my_guitar_shop2; How to create a database only if it does not exist CREATE DATABASE IF NOT EXISTS my_guitar_shop2;

More information

Database Management Systems

Database Management Systems Sample Questions 1 Write SQL query to create a table for describing a book. The table should have Book Title, Author, Publisher, Year published, and ISBN fields. Your table should have a primary key. For

More information

Constraints. Primary Key Foreign Key General table constraints Domain constraints Assertions Triggers. John Edgar 2

Constraints. Primary Key Foreign Key General table constraints Domain constraints Assertions Triggers. John Edgar 2 CMPT 354 Constraints Primary Key Foreign Key General table constraints Domain constraints Assertions Triggers John Edgar 2 firstname type balance city customerid lastname accnumber rate branchname phone

More information

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210 SQL: Concepts Todd Bacastow IST 210: Organization of Data 2/17/2004 1 Design questions How many entities are there? What are the major entities? What are the attributes of each entity? Is there a unique

More information

AN INTRODUCTION TO WEB PROGRAMMING. Dr. Hossein Hakimzadeh Department of Computer and Information Sciences Indiana University South Bend, IN

AN INTRODUCTION TO WEB PROGRAMMING. Dr. Hossein Hakimzadeh Department of Computer and Information Sciences Indiana University South Bend, IN AN INTRODUCTION TO WEB PROGRAMMING Dr. Hossein Hakimzadeh Department of Computer and Information Sciences Indiana University South Bend, IN HISTORY Developed by Michael Widenius. Initially release in 1995.

More information

Databases (MariaDB/MySQL) CS401, Fall 2015

Databases (MariaDB/MySQL) CS401, Fall 2015 Databases (MariaDB/MySQL) CS401, Fall 2015 Database Basics Relational Database Method of structuring data as tables associated to each other by shared attributes. Tables (kind of like a Java class) have

More information

Locate your Advanced Tools and Applications

Locate your Advanced Tools and Applications MySQL Manager is a web based MySQL client that allows you to create and manipulate a maximum of two MySQL databases. MySQL Manager is designed for advanced users.. 1 Contents Locate your Advanced Tools

More information

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 5 Structured Query Language Hello and greetings. In the ongoing

More information

SQL DATA DEFINITION LANGUAGE

SQL DATA DEFINITION LANGUAGE SQL DATA DEFINITION LANGUAGE DATABASE SCHEMAS IN SQL SQL is primarily a query language, for getting information from a database. DML: Data Manipulation Language SFWR ENG 3DB3 FALL 2016 MICHAEL LIUT (LIUTM@MCMASTER.CA)

More information

SQL DATA DEFINITION LANGUAGE

SQL DATA DEFINITION LANGUAGE SQL DATA DEFINITION LANGUAGE DATABASE SCHEMAS IN SQL SQL is primarily a query language, for getting information from a database. DML: Data Manipulation Language SFWR ENG 3DB3 FALL 2016 MICHAEL LIUT (LIUTM@MCMASTER.CA)

More information

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas SQL SQL Functionality stands for Structured Query Language sometimes pronounced sequel a very-high-level (declarative) language user specifies what is wanted, not how to find it number of standards original

More information

This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client

This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client Lab 2.0 - MySQL CISC3140, Fall 2011 DUE: Oct. 6th (Part 1 only) Part 1 1. Getting started This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client host

More information

SQL DATA DEFINITION LANGUAGE

SQL DATA DEFINITION LANGUAGE 9/27/16 DATABASE SCHEMAS IN SQL SQL DATA DEFINITION LANGUAGE SQL is primarily a query language, for getting information from a database. SFWR ENG 3DB3 FALL 2016 But SQL also includes a data-definition

More information

Web Security. Attacks on Servers 11/6/2017 1

Web Security. Attacks on Servers 11/6/2017 1 Web Security Attacks on Servers 11/6/2017 1 Server side Scripting Javascript code is executed on the client side on a user s web browser Server side code is executed on the server side. The server side

More information

Outline. Databases and DBMS s. Recent Database Applications. Earlier Database Applications. CMPSCI445: Information Systems.

Outline. Databases and DBMS s. Recent Database Applications. Earlier Database Applications. CMPSCI445: Information Systems. Outline CMPSCI445: Information Systems Overview of databases and DBMS s Course topics and requirements Yanlei Diao University of Massachusetts Amherst Databases and DBMS s Commercial DBMS s A database

More information

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 13 Constraints & Triggers Hello and welcome to another session

More information

A practical introduction to database design

A practical introduction to database design A practical introduction to database design Dr. Chris Tomlinson Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building chris.tomlinson@imperial.ac.uk Computer Skills Classes 17/01/19

More information

Lab # 1. You will be using MySQL as a database management system during the labs. The goal of this first lab is to familiarize you with MySQL.

Lab # 1. You will be using MySQL as a database management system during the labs. The goal of this first lab is to familiarize you with MySQL. DDB Spring 2006 Lab # 1 You will be using MySQL as a database management system during the labs. The goal of this first lab is to familiarize you with MySQL. The reason you are using MySQL is twofolds.

More information

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013 CSE 530A ER Model to Relational Schema Washington University Fall 2013 Relational Model A relational database consists of a group of relations (a.k.a., tables) A relation (table) is a set of tuples (rows)

More information

Unit 27 Web Server Scripting Extended Diploma in ICT

Unit 27 Web Server Scripting Extended Diploma in ICT Unit 27 Web Server Scripting Extended Diploma in ICT Dynamic Web pages Having created a few web pages with dynamic content (Browser information) we now need to create dynamic pages with information from

More information

MySQL Installation Guide (Windows)

MySQL Installation Guide (Windows) Step1- Install MySQL MySQL Installation Guide (Windows) The following description is based on MySQL 5.7.17 for Windows. Go to MySQL download page ( http://dev.mysql.com/downloads/mysql/ ). Click the Go

More information

SQL: Data Definition Language

SQL: Data Definition Language SQL: Data Definition Language CSC 343 Winter 2018 MICHAEL LIUT (MICHAEL.LIUT@UTORONTO.CA) DEPARTMENT OF MATHEMATICAL AND COMPUTATIONAL SCIENCES UNIVERSITY OF TORONTO MISSISSAUGA Database Schemas in SQL

More information

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen LECTURE 9: INTRODUCTION TO SQL SELECT-FROM-WHERE STATEMENTS SUBQUERIES Set-up the database 1. Log in to your machine using

More information

Introduction to Databases and SQL

Introduction to Databases and SQL Introduction to Databases and SQL Files vs Databases In the last chapter you learned how your PHP scripts can use external files to store and retrieve data. Although files do a great job in many circumstances,

More information

Assignment 6: SQL III

Assignment 6: SQL III Data Modelling and Databases Exercise dates: April 12/April 13, 2018 Ce Zhang, Gustavo Alonso Last update: April 16, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 6: SQL III This assignment

More information

Comp 519: Web Programming Autumn 2015

Comp 519: Web Programming Autumn 2015 Comp 519: Web Programming Autumn 2015 Advanced SQL and PHP Advanced queries Querying more than one table Searching tables to find information Aliasing tables PHP functions for using query results Using

More information

3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key

3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key Unit 3: Types of Keys & Data Integrity 3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key Different Types of SQL Keys A key is a single or combination of multiple fields in a

More information

Introducing SQL Query Verifier Plugin

Introducing SQL Query Verifier Plugin Introducing SQL Query Verifier Plugin IBM Application Runtime Expert for i Document version: 1.0 To download the master version of this document, visit product home site: http://www.ibm.com/systems/power/software/i/are/index.html

More information

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel. Adobe Dreamweaver CS6 Project 3 guide How to create forms You can use forms to interact with or gather information from site visitors. With forms, visitors can provide feedback, sign a guest book, take

More information

ENTITY-RELATIONSHIP MODEL. CS 564- Spring 2018

ENTITY-RELATIONSHIP MODEL. CS 564- Spring 2018 ENTITY-RELATIONSHIP MODEL CS 564- Spring 2018 WHAT IS THIS LECTURE ABOUT E/R Model: entity sets, attribute relation: binary, multi-way relationship roles, attributes on relationships subclasses (ISA) weak

More information

EE221 Databases Practicals Manual

EE221 Databases Practicals Manual EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School

More information

SQL Commands & Mongo DB New Syllabus

SQL Commands & Mongo DB New Syllabus Chapter 15 : Computer Science Class XI ( As per CBSE Board) SQL Commands & Mongo DB New Syllabus 2018-19 SQL SQL is an acronym of Structured Query Language.It is a standard language developed and used

More information

CS W Introduction to Databases Spring Computer Science Department Columbia University

CS W Introduction to Databases Spring Computer Science Department Columbia University CS W4111.001 Introduction to Databases Spring 2018 Computer Science Department Columbia University 1 in SQL 1. Key constraints (PRIMARY KEY and UNIQUE) 2. Referential integrity constraints (FOREIGN KEY

More information

SQL Introduction. CS 377: Database Systems

SQL Introduction. CS 377: Database Systems SQL Introduction CS 377: Database Systems Recap: Last Two Weeks Requirement analysis Conceptual design Logical design Physical dependence Requirement specification Conceptual data model (ER Model) Representation

More information

SQL Data Definition and Data Manipulation Languages (DDL and DML)

SQL Data Definition and Data Manipulation Languages (DDL and DML) .. Cal Poly CPE/CSC 365: Introduction to Database Systems Alexander Dekhtyar.. SQL Data Definition and Data Manipulation Languages (DDL and DML) Note: This handout instroduces both the ANSI SQL synatax

More information

Database: Introduction

Database: Introduction Database: Introduction Database Systems Important topic in the study of information systems Store/track items: scalar data (names, dates, ), pictures, audio, video Early applications: internal uses Internet:

More information

ERD Tutorial: How to Design and Generate SQL Server DB? Written Date : June 19, 2015

ERD Tutorial: How to Design and Generate SQL Server DB? Written Date : June 19, 2015 ERD : How to Design and Generate SQL Server DB? ERD : How to Design and Generate SQL Server DB? Written Date : June 9, 05 You can design database with ERD, and construct database by generating from the

More information

CS143: Relational Model

CS143: Relational Model CS143: Relational Model Book Chapters (4th) Chapters 1.3-5, 3.1, 4.11 (5th) Chapters 1.3-7, 2.1, 3.1-2, 4.1 (6th) Chapters 1.3-6, 2.105, 3.1-2, 4.5 Things to Learn Data model Relational model Database

More information

Course Web Site. 445 Staff and Mailing Lists. Textbook. Databases and DBMS s. Outline. CMPSCI445: Information Systems. Yanlei Diao and Haopeng Zhang

Course Web Site. 445 Staff and Mailing Lists. Textbook. Databases and DBMS s. Outline. CMPSCI445: Information Systems. Yanlei Diao and Haopeng Zhang Course Web Site CMPSCI445: Information Systems Yanlei Diao and Haopeng Zhang University of Massachusetts Amherst http://avid.cs.umass.edu/courses/445/s2015/ or http://www.cs.umass.edu/~yanlei à Teaching

More information

MySQL Installation Guide (Windows)

MySQL Installation Guide (Windows) Step1- Install MySQL MySQL Installation Guide (Windows) The following description is based on MySQL 5.7.10 for Windows. Go to MySQL download page (http://dev.mysql.com/downloads/mysql/). Click the Windows

More information

CMPT 354: Database System I. Lecture 2. Relational Model

CMPT 354: Database System I. Lecture 2. Relational Model CMPT 354: Database System I Lecture 2. Relational Model 1 Outline An overview of data models Basics of the Relational Model Define a relational schema in SQL 2 Outline An overview of data models Basics

More information

Assignment 6: SQL III Solution

Assignment 6: SQL III Solution Data Modelling and Databases Exercise dates: April 12/April 13, 2018 Ce Zhang, Gustavo Alonso Last update: April 16, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 6: SQL III Solution This assignment

More information

Creating the Data Layer

Creating the Data Layer Creating the Data Layer When interacting with any system it is always useful if it remembers all the settings and changes between visits. For example, Facebook has the details of your login and any conversations

More information

Relational databases and SQL

Relational databases and SQL Relational databases and SQL Relational Database Management Systems Most serious data storage is in RDBMS Oracle, MySQL, SQL Server, PostgreSQL Why so popular? Based on strong theory, well-understood performance

More information

CMPSCI445: Information Systems

CMPSCI445: Information Systems CMPSCI445: Information Systems Yanlei Diao and Haopeng Zhang University of Massachusetts Amherst Course Web Site http://avid.cs.umass.edu/courses/445/s2015/ or http://www.cs.umass.edu/~yanlei à Teaching

More information

CS 1520 / CoE 1520: Programming Languages for Web Applications (Spring 2013) Department of Computer Science, University of Pittsburgh

CS 1520 / CoE 1520: Programming Languages for Web Applications (Spring 2013) Department of Computer Science, University of Pittsburgh CS 1520 / CoE 1520: Programming Languages for Web Applications (Spring 2013) Department of Computer Science, University of Pittsburgh Term Project: Pittsburgh Interactive Research Accounting System (piras)

More information

SQL DDL. Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin

SQL DDL. Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin SQL DDL Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin Steen Jensen, autumn 2017 Languages Languages for relational DBMSs are: SQL QBE Structured

More information

The Relational Model 2. Week 3

The Relational Model 2. Week 3 The Relational Model 2 Week 3 1 We have seen how to create a database schema, how do we create an actual database on our computers? professor(pid : string, name : string) course(pid : string, number :

More information

Unit 1 - Chapter 4,5

Unit 1 - Chapter 4,5 Unit 1 - Chapter 4,5 CREATE DATABASE DatabaseName; SHOW DATABASES; USE DatabaseName; DROP DATABASE DatabaseName; CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype,... columnn

More information

COMP283-Lecture 6 Applied Database Management

COMP283-Lecture 6 Applied Database Management Applied Database Management Introduction Database Administration More Optimisation Maintaining Data Integrity Improving Performance 1 DB Administration: Full-text index Full Text Index Index large text

More information

2. E/R Design Considerations

2. E/R Design Considerations 2. E/R Design Considerations 32 What you will learn in this section Relationships cont d: multiplicity, multi-way Design considerations Conversion to SQL 33 Multiplicity of E/R Relationships Multiplicity

More information

Translating an ER Diagram to a Relational Schema

Translating an ER Diagram to a Relational Schema Translating an ER Diagram to a Relational Schema CS386/586 Introduction to Database Systems, Lois Delcambre 1999-2009 Slide 1 Translate each entity set into a table, with keys. Entity set: represented

More information

Chapter 3. Introduction to relational databases and MySQL. 2010, Mike Murach & Associates, Inc. Murach's PHP and MySQL, C3

Chapter 3. Introduction to relational databases and MySQL. 2010, Mike Murach & Associates, Inc. Murach's PHP and MySQL, C3 1 Chapter 3 Introduction to relational databases and MySQL Slide 2 Objectives Applied 1. Use phpmyadmin to review the data and structure of the tables in a database, to import and run SQL scripts that

More information

Basic SQL. Basic SQL. Basic SQL

Basic SQL. Basic SQL. Basic SQL Basic SQL Dr Fawaz Alarfaj Al Imam Mohammed Ibn Saud Islamic University ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation Basic SQL Structured

More information

CSC 3300 Homework 3 Security & Languages

CSC 3300 Homework 3 Security & Languages CSC 3300 Homework 3 Security & Languages Description Homework 3 has two parts. Part 1 is an exercise in database security. In particular, Part 1 has practice problems in which your will add constraints

More information

Chapter 13 : Informatics Practices. Class XI ( As per CBSE Board) SQL Commands. New Syllabus Visit : python.mykvs.in for regular updates

Chapter 13 : Informatics Practices. Class XI ( As per CBSE Board) SQL Commands. New Syllabus Visit : python.mykvs.in for regular updates Chapter 13 : Informatics Practices Class XI ( As per CBSE Board) SQL Commands New Syllabus 2018-19 SQL SQL is an acronym of Structured Query Language.It is a standard language developed and used for accessing

More information

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one } The result of a query can be sorted in ascending or descending order using the optional ORDER BY clause. The simplest form of an ORDER BY clause is SELECT columnname1, columnname2, FROM tablename ORDER

More information

The Relational Model (ii)

The Relational Model (ii) ICS 321 Fall 2009 The Relational Model (ii) Asst. Prof. Lipyeow Lim Information and Computer Science Department University of Hawaii at Manoa 1 Internet Book Store Example Isbn title author qty price year

More information

Oracle Exam 1z0-882 Oracle Certified Professional, MySQL 5.6 Developer Version: 7.0 [ Total Questions: 100 ]

Oracle Exam 1z0-882 Oracle Certified Professional, MySQL 5.6 Developer Version: 7.0 [ Total Questions: 100 ] s@lm@n Oracle Exam 1z0-882 Oracle Certified Professional, MySQL 5.6 Developer Version: 7.0 [ Total Questions: 100 ] Oracle 1z0-882 : Practice Test Question No : 1 Consider the statements: Mysql> drop function

More information

Enterprise Reporting -- APEX

Enterprise Reporting -- APEX Quick Reference Enterprise Reporting -- APEX This Quick Reference Guide documents Oracle Application Express (APEX) as it relates to Enterprise Reporting (ER). This is not an exhaustive APEX documentation

More information

Lecture 04: SQL. Wednesday, October 4, 2006

Lecture 04: SQL. Wednesday, October 4, 2006 Lecture 04: SQL Wednesday, October 4, 2006 1 Outline The Project Nulls (6.1.6) Outer joins (6.3.8) Database Modifications (6.5) 2 The Project Application: Boutique online music and book store Project:

More information

Data Modelling and Databases. Exercise Session 7: Integrity Constraints

Data Modelling and Databases. Exercise Session 7: Integrity Constraints Data Modelling and Databases Exercise Session 7: Integrity Constraints 1 Database Design Textual Description Complete Design ER Diagram Relational Schema Conceptual Modeling Logical Modeling Physical Modeling

More information

sqoop Automatic database import Aaron Kimball Cloudera Inc. June 18, 2009

sqoop Automatic database import Aaron Kimball Cloudera Inc. June 18, 2009 sqoop Automatic database import Aaron Kimball Cloudera Inc. June 18, 2009 The problem Structured data already captured in databases should be used with unstructured data in Hadoop Tedious glue code necessary

More information

CS-245 Database System Principles Winter 2002 Assignment 4

CS-245 Database System Principles Winter 2002 Assignment 4 CS-245 Database System Principles Winter 2002 Assignment 4 Due at the beginning of class on Tuesday, February 19 State all assumptions and show all work. Subscribe to cs245@lists.stanford.edu to receive

More information

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity COS 597A: Principles of Database and Information Systems Relational model continued Understanding how to use the relational model 1 with as weak entity folded into folded into branches: (br_, librarian,

More information

CPSC 421 Database Management Systems. Lecture 10: Embedded SQL

CPSC 421 Database Management Systems. Lecture 10: Embedded SQL CPSC 421 Database Management Systems Lecture 10: Embedded SQL * Some material adapted from R. Ramakrishnan, L. Delcambre, and B. Ludaescher Today s Agenda Quiz Project Part 2 Embedded SQL DDL and DML Notes:

More information

Numara FootPrints Changelog January 26, 2009

Numara FootPrints Changelog January 26, 2009 Numara FootPrints 9.0.3 Changelog January 26, 2009 Address Book The logo in the Address Book always pointed to the Numara Software URL. Address book fields were missing from a number of features in FootPrints

More information

Module 2: Creating Multidimensional Analysis Solutions

Module 2: Creating Multidimensional Analysis Solutions Module 2: Creating Multidimensional Analysis Solutions Overview Developing Analysis Services Solutions Creating Data Sources and Data Source Views Creating a Cube Lesson 1: Developing Analysis Services

More information

4. กก ( Web-based Technology ) (System Development Life Cycle : SDLC) ก ก ก

4. กก ( Web-based Technology ) (System Development Life Cycle : SDLC) ก ก ก 2 ก ก ก ก ก ก ก 1. ก ก ก ก 1.1 ก ก 1.2 ก ก 2. ก ก.NET 3. ก ก ก 4. กก ( Web-based Technology ) 5. ก ก 6. ก ก ก ก ก 1. ก ก ก (System Development Life Cycle: SDLC) ก (System Development Life Cycle : SDLC)

More information

Creating User Defined Metrics

Creating User Defined Metrics Creating User Defined Metrics By: Rob Zoeteweij Date: 04 feb 2010 http://oemgc.wordpress.com This document describes an example of a User Defined Metric Using User Defined Metrics we can extend the events

More information

DATABASE MANAGEMENT SYSTEMS

DATABASE MANAGEMENT SYSTEMS DATABASE MANAGEMENT SYSTEMS Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Departments of IT and Computer Science 2015 2016 1 The ALTER TABLE

More information

Database Logical Design

Database Logical Design Database Logical Design CIS 3730 Designing and Managing Data J.G. Zheng Fall 2010 1 Overview Relational model is a logical model Based on mathematical theories and rules Two ways to design a relational

More information

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530 Translation of ER-diagram into Relational Schema Dr. Sunnie S. Chung CIS430/530 Learning Objectives Define each of the following database terms Relation Primary key Foreign key Referential integrity Field

More information

If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it.

If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it. Page 1 of 5 Working with SQL Server Management Studio SQL Server Management Studio (SSMS) is the client tool you use to both develop T-SQL code and manage SQL Server. The purpose of this section is not

More information

CSE 344 MAY 14 TH ENTITIES

CSE 344 MAY 14 TH ENTITIES CSE 344 MAY 14 TH ENTITIES EXAMS Scores Final grades Concerned? Email about meeting Final Exam 35% of grade ADMINISTRIVIA HW6 Due Wednesday OQ6 Out Wednesday HW7 Out Wednesday E/R + Normalization DATABASE

More information

Danulabs Bookstore task for applicants

Danulabs Bookstore task for applicants Danulabs Bookstore task for applicants Introduction This is a si ple A P task hose purpose is to he k a appli a t s k o ledge of A P, C#, Ja a ript a d CSS. It is also a nice introductory task for people

More information

Introduction to relational databases and MySQL

Introduction to relational databases and MySQL Chapter 3 Introduction to relational databases and MySQL A products table Columns 2017, Mike Murach & Associates, Inc. C3, Slide 1 2017, Mike Murach & Associates, Inc. C3, Slide 4 Objectives Applied 1.

More information

EasyQL Language Reference Manual

EasyQL Language Reference Manual EasyQL Language Reference Manual CS W4115: Programming Languages and Translators Professor Stephen A. Edwards Computer Science Department Fall 2006 Columbia University EasyQL Members: Kangkook Jee (kj2181)

More information

How To Create Complex Stored Procedures In Sql Server 2008 With Examples

How To Create Complex Stored Procedures In Sql Server 2008 With Examples How To Create Complex Stored Procedures In Sql Server 2008 With Examples CLR Stored Procedures are managed codes so it ensures type safety, memory management, etc. It is very useful while executing complex

More information