Cascading inputs Advanced query topics Example – Wildcard filter 1 User inputs.

Slides:



Advertisements
Similar presentations
LIS651 lecture 3 taming PHP Thomas Krichel
Advertisements

Advanced SQL (part 1) CS263 Lecture 7.
Intro to Access 2007 Lindsey Brewer CSSCR September 18, 2009.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
SQL Introduction Standard language for querying and manipulating data Structured Query Language Many standards out there: SQL92, SQL2, SQL3. Vendors support.
What is a Database By: Cristian Dubon.
Tutorial EBSCOadmin User Groups support.ebsco.com.
A comparison of MySQL And Oracle Jeremy Haubrich.
TDPS Wireless v Enhancements E1 - Multi load E2 - Driver time scheduler.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Introduction to Structured Query Language (SQL)
30-Jun-15 SQL A Brief Introduction. SQL SQL is Structured Query Language Some people pronounce SQL as “sequel” Other people insist that only “ess-cue-ell”
U:/msu/course/cse/103 Day 23, Slide 1 Review of Day 22 What query did you use to search for an actor by name? –Return matches.
Database Systems More SQL Database Design -- More SQL1.
Introduction to Structured Query Language (SQL)
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Lesson 31: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Design.
CSE314 Database Systems More SQL: Complex Queries, Triggers, Views, and Schema Modification Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Project Implementation for COSC 5050 Distributed Database Applications Lab3.
10/31/2012ISC239 Isabelle Bichindaritz1 SQL Graphical Queries Design Query By Example.
Analyzing Data For Effective Decision Making Chapter 3.
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
Microsoft ® Access ® 2010 Training Create Queries for a New Database If a yellow security bar appears at the top of the screen in PowerPoint, click Enable.
Data Management Console Synonym Editor
ITCS373: Internet Technology Lecture 5: More HTML.
CS146 References: ORACLE 9i PROGRAMMING A Primer Rajshekhar Sunderraman
M1G Introduction to Database Development 5. Doing more with queries.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Creating Databases Local storage. join & split Classwork: show 1 table application. Share designs for oscars application. Adaptive select. Homework: [Catch.
Component 4: Introduction to Information and Computer Science Unit 6a Databases and SQL.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
[ Part III of The XML seminar ] Presenter: Xiaogeng Zhao A Introduction of XQL.
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
Access Chapter 3-Obtaining Answers to Your Data Questions.
1 Chapter 4: Creating Simple Queries 4.1 Introduction to the Query Task 4.2 Selecting Columns and Filtering Rows 4.3 Creating New Columns with an Expression.
DAY 16: MICROSOFT ACCESS – CHAPTER 2 Madhuri Siddula October 8, 2015.
1 CS 430 Database Theory Winter 2005 Lecture 10: Introduction to SQL.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
CPSC 203 Introduction to Computers Lab 66 By Jie Gao.
CPSC 203 Introduction to Computers T59 & T64 By Jie (Jeff) Gao.
# 1# 1 QueriesQueries How do we ask questions of the data? What is SELECT? What is FROM? What is WHERE? What is a calculated field? Spring 2010 CS105.
CPSC 203 Introduction to Computers Lab 21 By Jie Gao.
Working With Database Library And Helpers. Connecting to your Database First you need to set parameters in you database.php file residing in config folder.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Fall Lab 131 CS105 Lab 13 – Logical Operator Precedence and Joining Tables Announcements: MP 3 released Friday, 11/20 Honors project due: Tuesday,
Perfecto Mobile Automation
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
ADVANCED SQL.  The SQL ORDER BY Keyword  The ORDER BY keyword is used to sort the result-set by one or more columns.  The ORDER BY keyword sorts the.
MySQL Tutorial. Databases A database is a container that groups together a series of tables within a single structure Each database can contain 1 or more.
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
Creating Databases for Web applications Making a table of table information. Reprise on database design. SQL. Classwork/Homework: Projects! Postings.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Presentation 4 Creating Databases Part III (Creating Reports)
More SQL: Complex Queries,
MySQL Subquery Source: Dev.MySql.com
Design Patterns for SSIS Performance
Objectives Query for top values Create a parameter query
Introduction To Codeigniter
Workflow automation concepts and building blocks
Chapter # 7 Introduction to Structured Query Language (SQL) Part II.
Microsoft Office Access 2003
How to Use “Indian Citation Index (ICI)”
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Access: Queries IV Participation Project
Microsoft Excel Basics: Pivot Tables
Presentation transcript:

Cascading inputs Advanced query topics Example – Wildcard filter 1 User inputs

User input – Cascading inputs A high traction feature in 1.1 release, where a field is impacted by the value of another

User input – Cascading inputs  Cascading can be done with various types of fields. Any kind of field can impact a query field.  A field value can change as a result of a selection – When selecting 2 aggregates that have to be different, Selection of the first would clear and refresh the values that are available for selection for the second.

User input – A wildcard field  User input queries may return a very long list of results, which make sifting through inconvenient.  Use-case: –A project qtree quota resize flow –Targeting a list of project volumes to select a specific project qtree from, in order to alter it’s quota  Points for consideration: –Many qtrees in every project volume –How can we know what’s the current quota (Providing that’s interesting)?

User input – A wildcard field  Reducing the project qtree result set: We created a string user-input field, defaulting with “%”, and allowed the user to narrow the result set by doing pattern matching to the qtree name

User input – A wildcard field  The query: SELECT qtree.name FROM storage.qtree qtree, storage.volume volume, storage.array array WHERE qtree.volume_id = volume.id AND volume.name = '${VolumeName}' AND array.name = '${ArrayName}' AND array.id = volume.array_id AND qtree.name <> '-' AND qtree.name LIKE '%${pattern}%'

User input – A wildcard field  For good measure, we created an additional query to handle showing the current qtree quota: SELECT qtree.disk_limit_mb/1024 FROM storage.qtree qtree, storage.volume volume, storage.array array WHERE array.name = '${ArrayName}' AND array.id = volume.array_id AND qtree.volume_id = volume.id AND volume.name = '${VolumeName}' AND qtree.name = '${QtreeName}‘

User input – Informative queries  WFA is using MySQL database. As such it supports some additional useful functions on top of the basic SQL functions. For more, see here:   Functions allow us to create descriptive and informative drop downs that will combine multiple fields into one parameter. These can be used in conjunction with cascading inputs and or functions for breaking up the information inside the flow. It is all based on various delimiters that will be added to enable it.

User input – Informative queries  Use case I – Select HA pairs We were requested to work only with pairs and not with arrays. The query will use the array table and will construct a pair listing by partner arrays with “ – “ as a delimiter. SELECT DISTINCT IF(a1.name > a2.name, CONCAT(a2.name," - ", a1.name), CONCAT(a1.name," - ",a2.name)) FROM STORAGE.array a1 JOIN STORAGE.array a2 ON a1.partner_id = a2.id

User input – Informative queries  Using “ – “ as delimiter will allow us to split the pair information later to the 2 controllers in a return node.  The blanks assure us that the delimiter is indeed singular.  Why do we check if filer1 name is larger than filer2 (lexicographically) ? Because we would like each pair to appear only once. The comparison and “Select distinct” allow that to happen

User input – Informative queries  Use case II – Add sizing info on volumes Basic scenario will be adding the volume size to the name to give a hint on usage. SELECT CONCAT (storage.volume.name, " / (", CEIL(storage.volume.used_size_mb/1024),"/", CEIL(storage.volume.size_mb/1024)," GB)") FROM storage.volume Later, it would be easy to split by “ / “ and take the first part to get the volume name.

User input – Informative queries  Use case III – Add info to cascading queries We want to select the environment, which would directly imply which vfiler we will use. select distinct CONCAT(aproj.name, " - ", aproj.vfiler) from playground.archive_projects aproj order by aproj.name asc Later, we will use this to carve up just the project name from this combo: select aproj.project from playground.archive_projects aproj where aproj.name = LEFT('${Env}', LOCATE(' - ', '${Env}'))

User input – Informative queries Left returns the # of chars of a string ($Env) and would return the left part up to the “-”. Will be MEAG, MR or Test