Homework: Populate and Extract Data from Your Database

Similar documents
Populate and Extract Data from Your Database

MySqlWorkbench Tutorial: Creating Related Database Tables

MySqlWorkbench Tutorial: Creating Related Database Tables

ClassFlow Administrator User Guide

Using the Swiftpage Connect List Manager

Using the Swiftpage Connect List Manager

Integrating QuickBooks with TimePro

Entering an NSERC CCV: Step by Step

Guidance for Applicants: Submitting an application in AAS Ishango Grants Management

CLIC ADMIN USER S GUIDE

VISITSCOTLAND - TOURS MANAGEMENT SYSTEM Manual for Tour Operators

The Login Page Designer

Guidance for Submitting an application or Nomination in AAS Ishango Online System

Adverse Action Letters

Exercise 4: Working with tabular data Exploring infant mortality in the 1900s

Getting Started with the Web Designer Suite

BI Publisher TEMPLATE Tutorial

Proper Document Usage and Document Distribution. TIP! How to Use the Guide. Managing the News Page

Concentrix University Learning Portal FAQ Document

User Guide. Document Version: 1.0. Solution Version:

TRAINING GUIDE. Overview of Lucity Spatial

INSTALLING CCRQINVOICE

Faculty Textbook Adoption Instructions

MyUni Adding Content. Date: 29 May 2014 TRIM Reference: D2013/ Version: 1

Network Rail ARMS - Asbestos Risk Management System. Training Guide for use of the Import Survey Template

ROCK-POND REPORTING 2.1

Copy your Course: Export and Import

Please contact technical support if you have questions about the directory that your organization uses for user management.

Guide for Referees 2018

Municode Website Instructions

Access 2000 Queries Tips & Techniques

To open the event for editing: click on the EDIT link in the far right column of the listing. To view the event: click on the EVENT TITLE.

MOS Access 2013 Quick Reference

PAGE NAMING STRATEGIES

OASIS SUBMISSIONS FOR FLORIDA: SYSTEM FUNCTIONS

Once the Address Verification process is activated, the process can be accessed by employees in one of two ways:

PAY EQUITY HEARINGS TRIBUNAL. Filing Guide. A Guide to Preparing and Filing Forms and Submissions with the Pay Equity Hearings Tribunal

REFWORKS: STEP-BY-STEP HURST LIBRARY NORTHWEST UNIVERSITY

WordPress Overview for School Webmasters

Procurement Contract Portal. User Guide

MICRONET INTERNATIONAL COLLEGE BDTVEC ND in Computer Studies MULTIMEDIA AND WEB DESIGN (MWD) ASSIGNMENT 3 (20%) Due Date: 31st January 2013

COP2800 Homework #3 Assignment Spring 2013

Outlook Web Application (OWA) Basic Training

Managing Your Access To The Open Banking Directory How To Guide

ISTE-608 Test Out Written Exam and Practical Exam Study Guide

A Purchaser s Guide to CondoCerts

SAS Viya 3.2 Administration: Mobile Devices

Creating Relativity Dynamic Objects

BMC Remedyforce Integration with Remote Support

ONTARIO LABOUR RELATIONS BOARD. Filing Guide. A Guide to Preparing and Filing Forms and Submissions with the Ontario Labour Relations Board

Creating Relativity Dynamic Objects

HOW TO REGISTER FOR THE TEAS ASSESSMENT 1. CREATE A NEW ACCOUNT. How to Register for the TEAS Assessment 1

Online Banking for Business USER GUIDE

Systems & Operating Systems

Imagine for MSDNAA Student SetUp Instructions

McGill University School of Computer Science COMP-206. Software Systems. Due: September 29, 2008 on WEB CT at 23:55.

Relius Documents ASP Checklist Entry

Using the Turnpike Materials ProjectSolveSP System (Materials & ProjectSolveSP Admin)

Project Extranet User Guide

If you have any questions that are not covered in this manual, we encourage you to contact us at or send an to

Your Project Plan and Smartsheet

You may receive a total of two GSA graduate student grants in your entire academic career, regardless of what program you are currently enrolled in.

Apply IU Admin Center

Announcing Veco AuditMate from Eurolink Technology Ltd

HireRight: Step-by-Step Guide

Laboratory #13: Trigger

Type: System Enhancements ID Number: SE 93. Subject: Changes to Employee Address Screens. Date: June 29, 2012

Ad Hoc: Ad Hoc Reporting

TRAINING GUIDE. Lucity Mobile

Class Roster. Curriculum Class Roster Step-By-Step Procedure

Pages of the Template

Network Rail ARMS - Asbestos Risk Management System. Training Guide for use of the Import Asset Template

SmartPass User Guide Page 1 of 50

Secure File Transfer Protocol (SFTP) Interface for Data Intake User Guide

How to use DCI Contract Alerts

BMC Remedyforce Integration with Bomgar Remote Support

ClubRunner. Volunteers Module Guide

Scroll down to New and another menu will appear. Select Folder and a new

OATS Registration and User Entitlement Guide

RISKMAN REFERENCE GUIDE TO USER MANAGEMENT (Non-Network Logins)

Employee Self Service (ESS) Quick Reference Guide ESS User

Quick Reference Guide User Permissions & Roles - Buyers. Table of Contents

STANLEY Healthcare University Training & Certification Portal. Quick Reference Guide

CREATING A DONOR ACCOUNT

Create your Applicant Area

TRACK CHAIRS CREATING INVITED SESSIONS AND INVITING SESSION ORGANIZER(S)

Frequently Asked Questions Read and follow all instructions for success!

Agent Online. User Manual

Creating Relativity Dynamic Objects

Graduate Application Review Process Documentation

User Guide. ACE Data Source. OnCommand Workflow Automation (WFA) Abstract PROFESSIONAL SERVICES

Click Sign In button. Click Register Employer. Click Forgot Username and/or Password to Create a unique user ID and password.

Qualtrics Instructions

Marian Online 2 Instructor Manual 12

Date: October User guide. Integration through ONVIF driver. Partner Self-test. Prepared By: Devices & Integrations Team, Milestone Systems

AASHTOWare BrDR Support Center JIRA Getting Started Guide

Because of security on the site, you cannot create a bookmark through the usual means. In order to create a bookmark that will work consistently:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

INFocus Health Screenings Report

The Reporting Tool. An Overview of HHAeXchange s Reporting Tool

Transcription:

Hmewrk: Ppulate and Extract Data frm Yur Database 1. Overview In this hmewrk, yu will: 1. Check/revise yur data mdel and/r marketing material frm last week's hmewrk- this material will later becme the cntent f yur hme page. Yur data mdel must meet all the requirements (f last hmewrk) and yur prpsed web applicatin makes sense (can prvide the functinality yu claim) using the data mdel yu designed. 2. Using MySql Wrkbench, yu will create yur 4 database tables either directly using the MySQL Wrkbench UI (yu can use the MySQL Wrkbench SQL Tutrial fr this) r by generating a SQL CREATE script frm the data mdeling tl (there s infrmatin abut hw t d this at the end f the MySQL Wrkbench Data Mdel Tutrial) 3. Ppulate all fur f yur database tables with data. 4. Generate several SQL select statements. 5. Create a wrd dcument that shws all yur wrk. 6. Submit the wrd dcument, the final data mdel (.mwb file), and a PDF f the final data mdel (which will be published t yur web site in the next hmewrk). Page 1

2. Hmewrk Requirements 1. Yur Data Mdel shall: meet the check list f the last hmewrk (e.g., data types, PKs, FKs, the nullable nn-character fields that are required, etc.). have NO SQL keywrds as table names nr field names (Ggle t see list f SQL keywrds, but can't use these fr sure: user, rle, passwrd, state, date). be able t supprt the functinality described/marketed in yur hme page cntent (yur web app cannt deliver data unless that data is stred in yur database). If yur data mdel frm last hmewrk des nt meet the requirements abve, fix it and/r mdify yur hme page cntent. Yu are free t ttally red yur idea frm hmewrk 1, but the new data mdel and hme page cntent must meet the abve requirements. 2. Yur database shall cntain the fllwing realistic lking data: a. 2-3 recrds in yur user_rle table, ne f which will be the rle: ADMIN. b. 4-6 recrds in yur web_user table. c. 4-6 recrds in yur ther table d. 10-15 recrds in yur assciative table. Nte: yu have t enter yur data in rder. Fr example, yu cannt enter web_user recrds befre entering user_rle recrds because there is a reference (freign key) frm web_user t user_rle. The same is true fr the assciative table - its data must be entered after yu enter web_user data and after yu enter data int yur "ther" table. Page 2

3. Execute a SELECT statement fr each f the fllwing (and paste screen capture int wrd dc see submissin instructins fr specifics n hw yu are t d this): a. List all f the clumns f all recrds f yur ther table, rdering the clumns in a way that yu think users wuld like t view the data (dn't use "select *"). Srt the data by the first clumn. b. Shw all the recrds frm the web_user table jined with the user_rle table. Shw the rle name first, then the rle id, then the email address, fllwed by all the rest f the clumns f yur user table (rdered in a way yu think users wuld like t view the data shw the rle id nce, nt twice.) Order the result set by rle name, then email address (as a secndary srt). Include all recrds. There shuld be as many rws in yur result set as yu have recrds in yur user table. If yu have a lt mre (and see duplicatin), yu have frgtten the WHERE clause that jins the tw tables tgether. c. Jin yur assciative table with yur ther table. Include all the clumns except PK and FK (id) clumns. Order the clumns in a way yu think users wuld like t see them (nt "select *"). Order the result set by the first tw r three clumns. There shuld be as many rws in yur result set as there are recrds in yur assciative table. d. Jin yur assciative table with yur ther table and with yur user table. Include all the clumns except PK and FK (id) clumns. Order the clumns in a way yu think users wuld like t see them. Order the result set by the first tw r three clumns. There shuld be as many rws in yur result set as there are recrds in yur assciative table. Hint: yu need tw cnditins in yur WHERE clause, ne fr each PK/FK relatinship. e. Jin yur assciative table with yur ther table and with yur user table and with yur rle table. Include all the clumns except PK and FK (id) clumns. Order the clumns in a way yu think users wuld like t see them. Order the result set by the first tw r three clumns. There shuld be as many rws in yur result set as there are recrds in yur assciative table. Hint: yu need THREE cnditins in yur WHERE clause, ne fr each PK/FK relatinship that exists between the tables yu have included in yur SELECT statement. f. Mdify yur SELECT STATEMENT frm item e, adding a cnditin t yur WHERE s that yu see nly the data frm ne web_user (WHERE clause specifying a particular web_user_id). Select a user such that yur result set has at least 2 recrds in it. g. Mdify yur SELECT STATEMENT frm item e, s that yur WHERE clause specifies a criteria frm yur web_user table, a criteria frm yur ther table, and a criteria frm yur assciative table. Smewhere in yur SELECT statement, use the LIKE keywrd and % wildcard match. Cme up with cnditins such that yur result set has at least 2 recrds in it. Example f using LIKE: SELECT * FROM tablea, tableb WHERE tableb.tablea_id = tablea.tablea_id AND tableb.name LIKE '%temple%' Page 3

3. Submissin Requirements Attach the fllwing then submit int the Canvas HW assignment: The final data mdel (which yu may have altered r fixed frm last week s hmewrk).mwb file. PDF f final data mdel (File Exprt Print t File). Yu will publish in next week s hmewrk t yur web site. A dcument that cntains the inf described belw. Include yur last name in the file name f this dcument. Use landscape and narrw margins (the screen captures fr the SQL select statements will be pretty big). 1. Yur name. 2. Heading "Web Site Title" fllwed by the title yu plan t give yur web applicatin. 3. Heading "Marketing Material" fllwed by 1-2 paragraphs that attempt t entice peple t becme registered users and/r viewers f yur web site. This will becme the basis fr the cntent area f yur hme page. In yur paragraphs, d nt explain t me what yur web site will be able t d, write text that will entice users t visit yur site. 4. Heading "Data Mdel" fllwed by a screen capture f yur data mdel (created in MySQLWB). One way t get a screen capture is t press Alt-PrtSc (cpies active windw int the clipbard), paste int MsPaint (r any ther image editr), then cpy just the part f interest int yur wrd/rtf dcument (if yu paste the whle screen, it's t hard t read). Or use snippet tl. 5. Heading "Table Designs" fllwed by (fr each f yur fur tables) a screen capture f the table design and freign key tab f the table's design (if the table has a freign key). 6. Heading "SELECT Statements" (as specified abve). Fr each select statement: Cpy/paste the descriptin f the SQL statement (frm this dc). Paste a screen capture f the SQL query windw (we need the screen capture s we can be sure that yur SQL ran prperly). The screen capture shall include: tp area: syntactically crrect SQL (n red/errr messages), middle area: all rws and all clumns f result set, bttm area (Actin Output): cnfirmatin message with number f rws returned (right click the green checkbx - clear befre running the SQL that yu are screen capturing). Page 4

4. Hmewrk Grading 1. Prfessinalism: When yu answer the questins abut yur prpsed web applicatin, especially the last questin which asks fr marketing material, we are lking fr quality that wuld be acceptable by a real cmpany that might be paying yu t create their web site. 2. Check list: We will check that yur data mdel meets all f the requirements listed in hmewrk 1 (requirements such as data type, PK, FK, null-able, unique). This is very imprtant, since yu will lse pints in many future hmewrks and the prject if yur data mdel is nt as specified. 3. Cnsistency: Yur data mdel has t be able t supprt the functinality that yu say yur web applicatin will ffer. 4. Originality f Prject and Data Mdel: As in mst hmewrk assignments, pints will be deducted if yur answer is t similar t the sample r sample(s) prvided. In this case, I gave yu a lt f prject ideas, s it s OK if yur web applicatin prpsal is similar t ne f them. Hwever, yur data mdel cannt be verly similar t the cncert/band/venue example I prvided. It als cannt be verly similar t any ther student in the class. 5. Realistic Data: Yu were asked t enter realistic data s that yur web applicatin lks gd when it begins t display data n its pages. 6. SELECT Statements: The select statements must be syntactically crrect and prduce the required results. The screen captures need t be readable and verifiable as described in the submissin sectin. 5. Suggested apprach 1. Self check yur data mdel and functinality/marketing material. 2. Find a classmate r tw and d mutual review f data mdel / functinality. 3. Create yur database tables ne f tw ways: Create tables using the MySQL Wrkbench User Interface (essentially entering in the same table design as yu did fr yur data mdel frm last week s hmewrk). Yu can learn hw t d this frm the MySQL Wrkbench SQL tutrial. Generate a SQL CREATE script frm yur data mdel frm last week. a) Instructins fr this are at the end f the MySQL WB Data Mdel Tutrial but it is: File Exprt Frward Engineer SQL CREATE script. b) Frm the generated CREATE script, remve the database schema name `mydb.` where it exists as prefix t table names. c) Make sure yur database schema is set as the default schema d) Paste the mdified CREATE script int a Query windw and run the script. Yur tables shuld be created alng with all the clumn attributes, PKs and FKs. 4. Ppulate yur database with realistic lking data. If yu find ut that yu need t mdify PKs/FKs after yu have data in yur tables, yu will prbably have t delete all r sme f the data befre yu can make the PK/FK design changes. The database management system will NOT allw yu t add a rule (cnstraint) if there is already data that vilates that rule. 5. Start wrking n the SQL select statements and getting the screen captures. Page 5