REST Apis Demo

Total Page:16

File Type:pdf, Size:1020Kb

REST Apis Demo 2/20/18 Lecture 11: Last Two Lectures Finish Web Technologies & Ø Last Thursday: String manipulation & Regular Expressions Ø guest lecture from the amazing Sam Lau Begin SQL Databases Ø reviewed in section and in future labs & HWs Ø Last Tuesday: HTTP, XML, and JSON Ø Pandas web tables support Slides by: Ø Using the browser developer mode Joseph E. Gonzalez ? Ø JSON and basics of XML [email protected] Ø Started HTTP request/response protocol and GET vs POST Ø Didn’t finish REST and web-services … REST – Representational State Transfer REST APIs Ø A way of architecting widely accessible, efficient, and extensible web services (typically using HTTP) Example: GET /website/images Get all images Ø Client-Server: client and server are able to evolve independently POST /website/images Add an image GET /website/images/{id} Get a an image Ø Stateless: The server does not store any of the clients session state PUT /website/images/{id} Update an image DELETE /website/images/{id} Delete an image Ø Cacheable: system should clearly define what functionality can be cached (e.g., GET vs POST requests) Ø Uniform Interface: provide a consistent interface for getting and Client Server updating data in a system Scraping Ethics Ø Don’t violate terms of use for the service or data Ø Scraping can cause result in degraded services for others Ø Many services are optimized for human user access patterns Ø Requests can be parallelized/distributed to saturate server Ø Each query may result in many database requests Ø How to scrape ethically: Demo Ø Used documented REST APIs – read terms of service TwitterAPI_REST_Example.ipynb Ø Examine at robots.txt (e.g., https://en.wikipedia.org/robots.txt) Ø Throttle request rates (sleep) Ø Avoid getting Berkeley (or your organization) blocked from websites & services 1 2/20/18 Databases and SQL Part 1 Slides by: What is a database? Joseph E. Gonzalez & Joseph Hellerstein, ? [email protected] [email protected] Defining Databases Database Management Systems Ø A database is an organized collection of data. Ø Data storage Ø Provide reliable storage to survive system crashes and disk failures Ø Special data-structures to improve performance Ø Data management Ø Configure how data is logically organized and who has access Ø Ensure data consistency properties (e.g., positive bank account values) Ø A database management systems (DBMS) is a software Ø Facilitate access system that stores, manages, and facilitates access to Ø Enable efficient access to the data one or more databases. Ø Supports user defined computation (queries) over data Is Pandas a Database Management System? Why should I use a DBMS? Why can’t I just have my CSV files? Ø Data Storage? Ø DBMSs organize many related sources of information Ø Pandas doesn’t store data, this is managed by the filesystem Ø Data Management? Ø DBMSs enforce guarantees on the data Ø Pandas does support changing the organization of data but doesn’t Ø Can be used to prevent data anomalies manage who can access the data Ø Ensure safe concurrent operations on data Ø Facilitate Access? Ø DBMSs can be scalable Ø Pandas does support rich tools for computation over data Ø Optimized to compute on data that does not fit in memory Ø Parallel computation and optimized data structures Ø Pandas is not generally considered a database management system but it often interacts with DBMSs Ø DBMSs prevent data loss from software/hardware failures 2 2/20/18 Common DBMS Systems https://db-engines.com/en/ranking Widely Used DBMS Technologies Relational database management systems are widely used! Relational Database Management Systems Relational Data Abstraction Ø Relational databases are the traditional DBMS technology Database Management System Relations (Tables) Optimized Data Structures Name Prod Price Sue iPod $200.00 B+Trees Joey sid Bikesname $333.99rating age Ø Logically organize data in relations (tables) Alice 28 Caryuppy $999.009 35.0 31 lubber 8 55.5 Describes relationship: 44 guppy 5 35.0 Page 1 Page 2 Name Prod Price bid bname color Optimized Sales relation: 58 rusty 10 35.0 Name purchased Storage Sue iPod $200.00 101 Interlake blue Page 3 Page 4 Abstraction Page Prod at Price. 102 Interlake red Header Joey Bike $333.99 104 Marine red Page 5 Page 6 Tuple (row) Alice Car $999.00 How is data 103 Clipper green physically Attribute (column) stored? RelationalPhysical Data Data Independence: Abstraction Database management systemsDatabase hide Management how data Systemis Relationsstored from (Tables) end user applicationsOptimized Data Structures Name Prod Price Sueà SystemiPod can$200.00 optimize storage and computationB+Trees Joey sid Bikesname $333.99rating age Alicewithout28 Caryuppy changing$999.009 35.0 applications. 31 lubber 8 55.5 44 guppy 5 35.0 Page 1 Page 2 bid bname Bigcolor Idea in Data StructuresOptimized 58 rusty 10 35.0 In a time long ago … Storage 101 Interlake blue Page 3 Page 4 DataAbstraction Systems & Page 102 Interlake red Header 104 Marine red ComputerPage 5 Page 6 Science 103 Clipper green It wasn’t always like this … 3 2/20/18 Ted Codd and the Relational Model Ø [1969] Relational model: a mathematical Before 1970’s databases abstraction of a database as sets Ø Independence of data from the physical properties of were not routinely organized as tables. stage storage and representation Instead they exposed specialized Ø [1972] Relational Algebra & Calculus: a collection data structures designed for of operations and a way defining logical specific applications. outcomes for data transformations Ø Algebra: beginning of technologies like Pandas Ø Calculus: the foundation of modern SQL Edgar F. “Ted” Codd (1923 - 2003) Turing Award 1981 Relational Database Management Systems Ø Traditionally DBMS referred to relational databases What Ø Logically organize data in relations (tables) Ø Structured Query Language (SQL) to define, manipulate not and compute on data. Ø A common language spoken by many data systems How Ø Some variations and deviations from the standard … Ø Describes logical organization of data as well as computation on data. SQL SQL is a Declarative Language Review of Relational Terminology Ø Declarative: “Say what you want, not how to get it.” Ø Database: Set of Relations (i.e., one or more tables) Ø Declarative Example: I want a table with columns “x” and “y” constructed from tables “A” and ”B” where the values in “y” are greater than 100.00. Ø Relation (Table): Ø Imperative Example: For each record in table “A” find the corresponding Ø Schema: description of columns, their types, and constraints record in table “B” then drop the records where “y” is less than or equal to Ø Instance: data satisfying the schema 100 then return the ”x” and “y” values. Ø Advantages of declarative programming Ø Attribute (Column) Ø Enable the system to find the best way to achieve the result. Ø Often more compact and easier to learn for non-programmers Ø Tuple (Record, Row) Ø Challenges of declarative programming Ø Schema of database is set of schemas of its relations Ø System performance depends heavily on automatic optimization Ø Limited language (not Turing complete) 4 2/20/18 Two sublanguages of SQL Ø DDL – Data Definition Language Ø Define and modify schema Ø DML – Data Manipulation Language Creating Tables & Ø Queries can be written intuitively. SELET * FROM Populating Tables THINGS; CAPITALIZATION IS optional BUT … DATABASE PEOPLE PREFER TO YELL CREATE TABLE … CREATE TABLE Sailors ( sid INTEGER, sname CHAR(20), Columns have Common SQL Types (there are others...) sid sname rating age rating INTEGER, names and types 1 Fred 7 22 age REAL, PRIMARY KEY (sid)); 2 Jim 2 39 Specify Ø CHAR(size): Fixed number of characters 3 Nancy 8 27 Primary Key CREATE TABLE Boats ( column(s) bid INTEGER, Ø TEXT: Arbitrary number of character strings bname CHAR (20), bid bname color color CHAR(10), PRIMARY KEY (bid)); Specify Ø INTEGER & BIGINT: Integers of various sizes 101 Nina red Foreign Key 102 Pinta blue relationships Ø REAL & DOUBLE PRECISION: Floating point numbers 103 Santa Maria red CREATE TABLE Reserves ( sid INTEGER, bid INTEGER, Ø DATE & DATETIME: Date and Date+Time formats day DATE, PRIMARY KEY (sid, bid, day), sid bid day FOREIGN KEY (sid) REFERENCES Sailors, FOREIGN KEY (bid) REFERENCES Boats); 1 102 9/12 See documentation for database system (e.g., Postgres) 2 102 9/13 Semicolon at end of command More Creating Tables Inserting Records into a Table INSERT INTO students (name, gpa, age, dept, gender) ß Optional CREATE TABLE students( VALUES name TEXT PRIMARY KEY, ('Sergey Brin', 2.8, 40, 'CS', 'M'), gpa REAL CHECK (gpa >= 0.0 and gpa <= 4.0), ('Danah Boyd', 3.9, 35, 'CS', 'F'), age INTEGER, Ø ('Bill Gates', 1.0, 60, 'CS', 'M'), Fields must be entered in dept TEXT, ('Hillary Mason', 4.0, 35, 'DATASCI', 'F'), order (record) gender CHAR); Ø ('Mike Olson', 3.7, 50, 'CS', 'M'), Comma between records Ø ('Mark Zuckerberg', 4.0, 30, 'CS', 'M'), Must use the single quote Imposing Integrity (‘Sheryl Sandberg', 4.0, 47, 'BUSINESS', 'F'), (’) for strings. Constraints ('Susan Wojcicki', 4.0, 46, 'BUSINESS', 'F'), ('Marissa Meyer', 4.0, 45, 'BUSINESS', 'F'); Useful to ensure data quality… -- This is a comment. -- Does the order matter? No 5 2/20/18 Deleting and Modifying Records Deleting and Modifying Records Ø Records are deleted by specifying a condition: Ø What is wrong with the following DELETE FROM students UPDATE students WHERE LOWER(name) = 'sergey brin' SET gpa = 1.0 + gpa String Function WHERE dept = ‘CS’; Ø Modifying records UPDATE students CREATE TABLE students( name TEXT PRIMARY KEY, SET gpa = 1.0 + gpa gpa FLOAT CHECK (gpa >= 0.0 and gpa <= 4.0), WHERE dept = ‘CS’; age INTEGER, dept TEXT, Ø Notice that there is no way to modify records by location gender CHAR); Update would violate Integrity Constraints SQL DML: Basic Single-Table Queries SELECT [DISTINCT] <column expression list> FROM <single table> [WHERE <predicate>] [GROUP BY <column list> [HAVING <predicate>] ] Querying Tables [ORDER BY <column list>]; Ø Elements of the basic select statement Ø [Square brackets] are optional expressions.
Recommended publications
  • Select Items from Proc.Sql Where Items>Basics
    Advanced Tutorials SELECT ITEMS FROM PROC.SQL WHERE ITEMS> BASICS Alan Dickson & Ray Pass ASG. Inc. to get more SAS sort-space. Also, it may be possible to limit For those of you who have become extremely the total size of the resulting extract set by doing as much of comfortable and competent in the DATA step, getting into the joining/merging as close to the raw data as possible. PROC SQL in a big wrJ may not initially seem worth it Your first exposure may have been through a training class. a 3) Communications. SQL is becoming a lingua Tutorial at a conference, or a real-world "had-to" situation, franca of data processing, and this trend is likely to continue such as needing to read corporate data stored in DB2, or for some time. You may find it easier to deal with your another relational database. So, perhaps it is just another tool systems department, vendors etc., who may not know SAS at in your PROC-kit for working with SAS datasets, or maybe all, ifyou can explain yourself in SQL tenus. it's your primary interface with another environment 4) Career growth. Not unrelated to the above - Whatever the case, your first experiences usually there's a demand for people who can really understand SQL. involve only the basic CREATE TABLE, SELECT, FROM, Its apparent simplicity is deceiving. On the one hand, you can WHERE, GROUP BY, ORDER BY options. Thus, the do an incredible amount with very little code - on the other, tendency is frequently to treat it as no more than a data extract you can readily generate plausible, but inaccurate, results with tool.
    [Show full text]
  • Database Foundations 6-8 Sorting Data Using ORDER BY
    Database Foundations 6-8 Sorting Data Using ORDER BY Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Roadmap Data Transaction Introduction to Structured Data Definition Manipulation Control Oracle Query Language Language Language (TCL) Application Language (DDL) (DML) Express (SQL) Restricting Sorting Data Joining Tables Retrieving Data Using Using ORDER Using JOINS Data Using WHERE BY SELECT You are here DFo 6-8 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3 Sorting Data Using ORDER BY Objectives This lesson covers the following objectives: • Use the ORDER BY clause to sort SQL query results • Identify the correct placement of the ORDER BY clause within a SELECT statement • Order data and limit row output by using the SQL row_limiting_clause • Use substitution variables in the ORDER BY clause DFo 6-8 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4 Sorting Data Using ORDER BY Using the ORDER BY Clause • Sort the retrieved rows with the ORDER BY clause: – ASC: Ascending order (default) – DESC: Descending order • The ORDER BY clause comes last in the SELECT statement: SELECT last_name, job_id, department_id, hire_date FROM employees ORDER BY hire_date ; DFo 6-8 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5 Sorting Data Using ORDER BY Sorting • Sorting in descending order: SELECT last_name, job_id, department_id, hire_date FROM employees 1 ORDER BY hire_date DESC ; • Sorting by column alias: SELECT employee_id, last_name, salary*12 annsal 2 FROM employees ORDER BY annsal ; DFo 6-8 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6 Sorting Data Using ORDER BY Sorting • Sorting by using the column's numeric position: SELECT last_name, job_id, department_id, hire_date FROM employees 3 ORDER BY 3; • Sorting by multiple columns: SELECT last_name, department_id, salary FROM employees 4 ORDER BY department_id, salary DESC; DFo 6-8 Copyright © 2015, Oracle and/or its affiliates.
    [Show full text]
  • How Mysql Handles ORDER BY, GROUP BY, and DISTINCT
    How MySQL handles ORDER BY, GROUP BY, and DISTINCT Sergey Petrunia, [email protected] MySQL University Session November 1, 2007 Copyright 2007 MySQL AB The World’s Most Popular Open Source Database 1 Handling ORDER BY • Available means to produce ordered streams: – Use an ordered index • range access – not with MyISAM/InnoDB's DS-MRR – not with Falcon – Has extra (invisible) cost with NDB • ref access (but not ref-or-null) results of ref(t.keypart1=const) are ordered by t.keypart2, t.keypart3, ... • index access – Use filesort Copyright 2007 MySQL AB The World’s Most Popular Open Source Database 2 Executing join and producing ordered stream There are three ways to produce ordered join output Method EXPLAIN shows Use an ordered index Nothing particular Use filesort() on 1st non-constant table “Using filesort” in the first row Put join result into a temporary table “Using temporary; Using filesort” in the and use filesort() on it first row EXPLAIN is a bit counterintuitive: id select_type table type possible_keys key key_len ref rows Extra Using where; 1 SIMPLE t2 range a a 5 NULL 10 Using temporary; Using filesort 1 SIMPLE t2a ref a a 5 t2.b 1 Using where Copyright 2007 MySQL AB The World’s Most Popular Open Source Database 3 Using index to produce ordered join result • ORDER BY must use columns from one index • DESC is ok if it is present for all columns • Equality propagation: – “a=b AND b=const” is detected – “WHERE x=t.key ORDER BY x” is not • Cannot use join buffering – Use of matching join order disables use of join buffering.
    [Show full text]
  • Database SQL Call Level Interface 7.1
    IBM IBM i Database SQL call level interface 7.1 IBM IBM i Database SQL call level interface 7.1 Note Before using this information and the product it supports, read the information in “Notices,” on page 321. This edition applies to IBM i 7.1 (product number 5770-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. © Copyright IBM Corporation 1999, 2010. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents SQL call level interface ........ 1 SQLExecute - Execute a statement ..... 103 What's new for IBM i 7.1 .......... 1 SQLExtendedFetch - Fetch array of rows ... 105 PDF file for SQL call level interface ....... 1 SQLFetch - Fetch next row ........ 107 Getting started with DB2 for i CLI ....... 2 SQLFetchScroll - Fetch from a scrollable cursor 113 | Differences between DB2 for i CLI and embedded SQLForeignKeys - Get the list of foreign key | SQL ................ 2 columns .............. 115 Advantages of using DB2 for i CLI instead of SQLFreeConnect - Free connection handle ... 120 embedded SQL ............ 5 SQLFreeEnv - Free environment handle ... 121 Deciding between DB2 for i CLI, dynamic SQL, SQLFreeHandle - Free a handle ...... 122 and static SQL ............. 6 SQLFreeStmt - Free (or reset) a statement handle 123 Writing a DB2 for i CLI application ....... 6 SQLGetCol - Retrieve one column of a row of Initialization and termination tasks in a DB2 for i the result set ............ 125 CLI application ............ 7 SQLGetConnectAttr - Get the value of a Transaction processing task in a DB2 for i CLI connection attribute .........
    [Show full text]
  • Firebird 3 Windowing Functions
    Firebird 3 Windowing Functions Firebird 3 Windowing Functions Author: Philippe Makowski IBPhoenix Email: pmakowski@ibphoenix Licence: Public Documentation License Date: 2011-11-22 Philippe Makowski - IBPhoenix - 2011-11-22 Firebird 3 Windowing Functions What are Windowing Functions? • Similar to classical aggregates but does more! • Provides access to set of rows from the current row • Introduced SQL:2003 and more detail in SQL:2008 • Supported by PostgreSQL, Oracle, SQL Server, Sybase and DB2 • Used in OLAP mainly but also useful in OLTP • Analysis and reporting by rankings, cumulative aggregates Philippe Makowski - IBPhoenix - 2011-11-22 Firebird 3 Windowing Functions Windowed Table Functions • Windowed table function • operates on a window of a table • returns a value for every row in that window • the value is calculated by taking into consideration values from the set of rows in that window • 8 new windowed table functions • In addition, old aggregate functions can also be used as windowed table functions • Allows calculation of moving and cumulative aggregate values. Philippe Makowski - IBPhoenix - 2011-11-22 Firebird 3 Windowing Functions A Window • Represents set of rows that is used to compute additionnal attributes • Based on three main concepts • partition • specified by PARTITION BY clause in OVER() • Allows to subdivide the table, much like GROUP BY clause • Without a PARTITION BY clause, the whole table is in a single partition • order • defines an order with a partition • may contain multiple order items • Each item includes
    [Show full text]
  • Aggregate Order by Clause
    Aggregate Order By Clause Dialectal Bud elucidated Tuesdays. Nealy vulgarizes his jockos resell unplausibly or instantly after Clarke hurrah and court-martial stalwartly, stanchable and jellied. Invertebrate and cannabic Benji often minstrels some relator some or reactivates needfully. The default order is ascending. Have exactly match this assigned stream aggregate functions, not work around with security software development platform on a calculation. We use cookies to ensure that we give you the best experience on our website. Result output occurs within the minimum time interval of timer resolution. It is not counted using a table as i have group as a query is faster count of getting your browser. Let us explore it further in the next section. If red is enabled, when business volume where data the sort reaches the specified number of bytes, the collected data is sorted and dumped into these temporary file. Kris has written hundreds of blog articles and many online courses. Divides the result set clock the complain of groups specified as an argument to the function. Threat and leaves only return data by order specified, a human agents. However, this method may not scale useful in situations where thousands of concurrent transactions are initiating updates to derive same data table. Did you need not performed using? If blue could step me first what is vexing you, anyone can try to explain it part. It returns all employees to database, and produces no statements require complex string manipulation and. Solve all tasks to sort to happen next lesson. Execute every following query access GROUP BY union to calculate these values.
    [Show full text]
  • Hive Where Clause Example
    Hive Where Clause Example Bell-bottomed Christie engorged that mantids reattributes inaccessibly and recrystallize vociferously. Plethoric and seamier Addie still doth his argents insultingly. Rubescent Antin jibbed, his somnolency razzes repackages insupportably. Pruning occurs directly with where and limit clause to store data question and column must match. The ideal for column, sum of elements, the other than hive commands are hive example the terminator for nonpartitioned external source table? Cli to hive where clause used to pick tables and having a column qualifier. For use of hive sql, so the source table csv_table in most robust results yourself and populated using. If the bucket of the sampling is created in this command. We want to talk about which it? Sql statements are not every data, we should run in big data structures the. Try substituting synonyms for full name. Currently the where at query, urban private key value then prints the where hive table? Hive would like the partitioning is why the. In hive example hive data types. For the data, depending on hive will also be present in applying the example hive also widely used. The electrician are very similar to avoid reading this way, then one virtual column values in data aggregation functionalities provided below is sent to be expressed. Spark column values. In where clause will print the example when you a script for example, it will be spelled out of subquery must produce such hash bucket level of. After copy and collect_list instead of the same type is only needs to calculate approximately percentiles for sorting phase in keyword is expected schema.
    [Show full text]
  • SQL from Wikipedia, the Free Encyclopedia Jump To: Navigation
    SQL From Wikipedia, the free encyclopedia Jump to: navigation, search This article is about the database language. For the airport with IATA code SQL, see San Carlos Airport. SQL Paradigm Multi-paradigm Appeared in 1974 Designed by Donald D. Chamberlin Raymond F. Boyce Developer IBM Stable release SQL:2008 (2008) Typing discipline Static, strong Major implementations Many Dialects SQL-86, SQL-89, SQL-92, SQL:1999, SQL:2003, SQL:2008 Influenced by Datalog Influenced Agena, CQL, LINQ, Windows PowerShell OS Cross-platform SQL (officially pronounced /ˌɛskjuːˈɛl/ like "S-Q-L" but is often pronounced / ˈsiːkwəl/ like "Sequel"),[1] often referred to as Structured Query Language,[2] [3] is a database computer language designed for managing data in relational database management systems (RDBMS), and originally based upon relational algebra. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control. SQL was one of the first languages for Edgar F. Codd's relational model in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks"[4] and became the most widely used language for relational databases.[2][5] Contents [hide] * 1 History * 2 Language elements o 2.1 Queries + 2.1.1 Null and three-valued logic (3VL) o 2.2 Data manipulation o 2.3 Transaction controls o 2.4 Data definition o 2.5 Data types + 2.5.1 Character strings + 2.5.2 Bit strings + 2.5.3 Numbers + 2.5.4 Date and time o 2.6 Data control o 2.7 Procedural extensions * 3 Criticisms of SQL o 3.1 Cross-vendor portability * 4 Standardization o 4.1 Standard structure * 5 Alternatives to SQL * 6 See also * 7 References * 8 External links [edit] History SQL was developed at IBM by Donald D.
    [Show full text]
  • Relational Calculus Introduction • Contrived by Edgar F
    Starting with SQL Server and Azure SQL Database Module 5: Introducing the relational model Lessons • Introduction to the relational model • Domains • Relational operators • Relational algebra • Relational calculus Introduction • Contrived by Edgar F. Codd, IBM, 1969 • Background independent • A simple, yet rigorously defined concept of how users perceive data – The relational model represents data in the form of two- dimension tables, i.e. relations – Each table represents some real-world entity (person, place, thing, or event) about which information is collected – Information principle: all information is stored in relations A Logical Point of View • A relational database is a collection of tables – The organization of data into relational tables is known as the logical view of the database – The way the database software physically stores the data on a computer disk system is called the internal view – The internal view differs from product to product – Interchangeability principle: a physical relation can always be replaced by a virtual one (e.g., a view can replace a table) Tuples • A tuple is a set of ordered triples of attributes – A triple consists of attribute name, attribute type and attribute value – Every attribute of a tuple contains exactly one value of appropriate type – The order of the attributes is insignificant • Every attribute must have unique name – A subset of attributes of tuple is a tuple Relations • A relation is a variable consisting of a set of tuples – The order of the attributes is insignificant – Every attribute
    [Show full text]
  • Overview of SQL:2003
    OverviewOverview ofof SQL:2003SQL:2003 Krishna Kulkarni Silicon Valley Laboratory IBM Corporation, San Jose 2003-11-06 1 OutlineOutline ofof thethe talktalk Overview of SQL-2003 New features in SQL/Framework New features in SQL/Foundation New features in SQL/CLI New features in SQL/PSM New features in SQL/MED New features in SQL/OLB New features in SQL/Schemata New features in SQL/JRT Brief overview of SQL/XML 2 SQL:2003SQL:2003 Replacement for the current standard, SQL:1999. FCD Editing completed in January 2003. New International Standard expected by December 2003. Bug fixes and enhancements to all 8 parts of SQL:1999. One new part (SQL/XML). No changes to conformance requirements - Products conforming to Core SQL:1999 should conform automatically to Core SQL:2003. 3 SQL:2003SQL:2003 (contd.)(contd.) Structured as 9 parts: Part 1: SQL/Framework Part 2: SQL/Foundation Part 3: SQL/CLI (Call-Level Interface) Part 4: SQL/PSM (Persistent Stored Modules) Part 9: SQL/MED (Management of External Data) Part 10: SQL/OLB (Object Language Binding) Part 11: SQL/Schemata Part 13: SQL/JRT (Java Routines and Types) Part 14: SQL/XML Parts 5, 6, 7, 8, and 12 do not exist 4 PartPart 1:1: SQL/FrameworkSQL/Framework Structure of the standard and relationship between various parts Common definitions and concepts Conformance requirements statement Updates in SQL:2003/Framework reflect updates in all other parts. 5 PartPart 2:2: SQL/FoundationSQL/Foundation The largest and the most important part Specifies the "core" language SQL:2003/Foundation includes all of SQL:1999/Foundation (with lots of corrections) and plus a number of new features Predefined data types Type constructors DDL (data definition language) for creating, altering, and dropping various persistent objects including tables, views, user-defined types, and SQL-invoked routines.
    [Show full text]
  • Real Federation Database System Leveraging Postgresql FDW
    PGCon 2011 May 19, 2011 Real Federation Database System leveraging PostgreSQL FDW Yotaro Nakayama Technology Research & Innovation Nihon Unisys, Ltd. The PostgreSQL Conference 2011 ▍Motivation for the Federation Database Motivation Data Integration Solution view point ►Data Integration and Information Integration are hot topics in these days. ►Requirement of information integration has increased in recent year. Technical view point ►Study of Distributed Database has long history and the background of related technology of Distributed Database has changed and improved. And now a days, the data moves from local storage to cloud. So, It may be worth rethinking the technology. The PostgreSQL Conference 2011 1 All Rights Reserved,Copyright © 2011 Nihon Unisys, Ltd. ▍Topics 1. Introduction - Federation Database System as Virtual Data Integration Platform 2. Implementation of Federation Database with PostgreSQL FDW ► Foreign Data Wrapper Enhancement ► Federated Query Optimization 3. Use Case of Federation Database Example of Use Case and expansion of FDW 4. Result and Conclusion The PostgreSQL Conference 2011 2 All Rights Reserved,Copyright © 2011 Nihon Unisys, Ltd. ▍Topics 1. Introduction - Federation Database System as Virtual Data Integration Platform 2. Implementation of Federation Database with PostgreSQL FDW ► Foreign Data Wrapper Enhancement ► Federated Query Optimization 3. Use Case of Federation Database Example of Use Case and expansion of FDW 4. Result and Conclusion The PostgreSQL Conference 2011 3 All Rights Reserved,Copyright ©
    [Show full text]
  • SQL to Hive Cheat Sheet
    We Do Hadoop Contents Cheat Sheet 1 Additional Resources 2 Query, Metadata Hive for SQL Users 3 Current SQL Compatibility, Command Line, Hive Shell If you’re already a SQL user then working with Hadoop may be a little easier than you think, thanks to Apache Hive. Apache Hive is data warehouse infrastructure built on top of Apache™ Hadoop® for providing data summarization, ad hoc query, and analysis of large datasets. It provides a mechanism to project structure onto the data in Hadoop and to query that data using a SQL-like language called HiveQL (HQL). Use this handy cheat sheet (based on this original MySQL cheat sheet) to get going with Hive and Hadoop. Additional Resources Learn to become fluent in Apache Hive with the Hive Language Manual: https://cwiki.apache.org/confluence/display/Hive/LanguageManual Get in the Hortonworks Sandbox and try out Hadoop with interactive tutorials: http://hortonworks.com/sandbox Register today for Apache Hadoop Training and Certification at Hortonworks University: http://hortonworks.com/training Twitter: twitter.com/hortonworks Facebook: facebook.com/hortonworks International: 1.408.916.4121 www.hortonworks.com We Do Hadoop Query Function MySQL HiveQL Retrieving information SELECT from_columns FROM table WHERE conditions; SELECT from_columns FROM table WHERE conditions; All values SELECT * FROM table; SELECT * FROM table; Some values SELECT * FROM table WHERE rec_name = “value”; SELECT * FROM table WHERE rec_name = "value"; Multiple criteria SELECT * FROM table WHERE rec1=”value1” AND SELECT * FROM
    [Show full text]