Nosql Database Comparison: Bigtable, Cassandra and Mongodb

Total Page:16

File Type:pdf, Size:1020Kb

Nosql Database Comparison: Bigtable, Cassandra and Mongodb Running Head: NOSQL DATABASE COMPARISON: BIGTABLE, CASSANDRA AND MONGODB NoSQL Database Comparison: Bigtable, Cassandra and MongoDB CJ Campbell Brigham Young University October 16, 2015 1 NOSQL DATABASE COMPARISON: BIGTABLE, CASSANDRA AND MONGODB INTRODUCTION THE SYSTEMS Google Bigtable History Data model & operations Physical Storage ACID properties Scalability Apache Cassandra History Data model & operations Physical Storage ACID properties Scalability MongoDB History Data model & operations Physical Storage ACID properties Scalability Differences Conclusion References 2 NOSQL DATABASE COMPARISON: BIGTABLE, CASSANDRA AND MONGODB Introduction As distributed systems are adopted and grown to scale, the need for scalable database solutions which meet the application’s exact need has become increasingly important. In the early days of computing, databases were almost entirely relational. Today, new breeds of database have emerged, called NoSQL databases. They are a common element in the grand design for most distributed software platforms. Each database is suited to a slightly different purpose from its peers. This paper discusses the features, similarities, and differences of three NoSQL databases: Google Bigtable, Apache Cassandra, and MongoDB. The Systems In this section, each of the three NoSQL databases are analyzed in-depth, starting with Google Bigtable, then Apache Cassandra, and finally MongoDB. Analysis includes their history, data model, accepted operations, physical storage schema, ACID properties, and scalability. Google Bigtable History. Bigtable was designed within Google to meet their internal data ​ processing needs at scale. It began development in 2004 as part of their effort to handle large amounts of data across applications such as web indexing, Google Earth, Google Finance and more (Google, Inc., 2006). It first went into production use in April 2005. In May 2015, Google released a public version of Bigtable called Cloud Bigtable as part of the Google Cloud Platform (O'Connor, 2015). Data model & operations. Bigtable offers semi-structured data. At a high-level ​ view, it is a key-value store. Diving deeper, the value is a set of columns which can be unique for each row, as in a jagged array. Columns are grouped together in “column families” which allows for iterating across similar data and backend efficiency. Cells can contain multiple versions of the same data, indexed by timestamp, with a configurable limit to keep only recent entries. Data is sorted in lexicographic order by row key, which allows users to exploit key selection for good data locality, thereby increasing performance. Physical Storage. Google’s 2006 Bigtable paper describes its file structure as, “a ​ sparse, distributed, persistent multidimensional sorted map.” Data is stored on Google 3 NOSQL DATABASE COMPARISON: BIGTABLE, CASSANDRA AND MONGODB File System (GFS) in the SSTable file format, which is optimized for reads/writes on ​ ​ similarly-keyed data. ACID properties. Data reads and writes are atomic on a per-row basis, regardless ​ of how many columns that row contains. Atomic actions are not available across multiple rows. Scalability. The introduction to Google’s Bigtable paper claims the ability to ​ “reliably scale to petabytes of data and thousands of machines.” It can be configured to optimize for different needs, such as availability or low latency. An example of configuring this is the ability to read from memory instead of hard-disk. Apache Cassandra History. The Cassandra project was created around 2008 by Avinash Lakshman ​ and Prashant Malik. It is named after a mythological Greek prophet. Some reports online claim that the name is in opposition to Oracle’s database (The meaning behind the name of Apache Cassandra, 2013). The purpose of its creation was to power the inbox search feature for Facebook. The Cassandra project was open-sourced on Google code on July 2008, became an Apache Incubator project in 2009 and finally graduated to a top-level Apache project in 2010. While the open community continued to embrace Cassandra, Facebook actually tapered its usage. In 2010 Facebook released a new version of messaging which used HBase instead of Cassandra because they found the model “to be a difficult pattern to reconcile for our new Messages infrastructure” (Muthukkaruppan, 2010). Despite being abandoned by its parent project, Cassandra is ranked the most popular wide column store, and eighth-most popular database overall as of October 2015 (DB-Engines Ranking, 2015). Data model & operations. Cassandra’s data model has evolved over time. It ​ began with column families and super column families. Only three data operations were initially available: insert, get and delete. The original design is completely unrecognizable ​ ​ ​ ​ in the Cassandra of 2015 (Ellis, n.d.). Today’s model looks more like a collection of denormalized non-relational tables, with a query language similar to relational databases. This provides a speed increase because there is no need to join across tables, although it comes at the price of data duplication. Tables can be updated live without locking or downtime (Datastax, 2015). Physical Storage. Data is stored across a cluster using a consistent hashing ring. ​ Cassandra uses virtual nodes to rearrange data for load balancing. Therefore, adding or 4 NOSQL DATABASE COMPARISON: BIGTABLE, CASSANDRA AND MONGODB removing a node only affects its immediate neighbors (Ellis, n.d.). The nodes to which data is initially assigned are called “coordinators.” They can be configured to replicate N copies of the data across the cluster, with additional configurations for locality-awareness. This ring allows the cluster to operate without any single point of failure. Data is stored on filesystem. It is optimized for fast reads at the cost of slower writes. Changes are written to a local commit log, which then goes into a memory cache. At a dynamically-calculated threshold, data in memory dumps to hard disk. ACID properties. Communication within a cluster is based on the gossip protocol, ​ an eventual consistency model. This means that like most distributed database systems, Cassandra is built for high availability and partitioning with eventual consistency. A useful feature, however, is that this consistency is configurable to meet specific use cases. Operations on a single node are ACID compliant, though not across the cluster. For transactional writes, Cassandra uses of a modified Paxos consensus protocol. This of course costs performance, and should only be used for transactionally-sensitive operations (Ellis, Lightweight transactions in Cassandra 2.0, 2013). Scalability. The distributed structure of Cassandra makes it a viable option for ​ globally-replicated data. In 2011, Netflix performed a benchmarking test and reported that it is linearly-scalable (Cockroft & Sheahan, 2011). The University of Toronto performed a similar test in 2012 with similar results, explaining that “this comes at the price of high write and read latencies” (Rabl, et al.). Cassandra’s feature-richness is its own cost, however. Though the database itself is riddled with powerful tooling and configurability. As the complexity of the system increases, the learning curve also increases. Thus, the user base that can support Cassandra is smaller than other databases, and the availability of maintenance staff is ever-important. MongoDB History. MongoDB was created by 10gen in 2007 as the data layer to their ​ platform as a service called Babble. The database got its name from the word “humongous” (History of MongoDB, n.d.). The market didn’t take to Babble very well, and so in 2009 the project was open sourced. By August of 2013, the project had become the central focus of 10gen’s development, so much that the company changed its name to MongoDB (Harris, 2013). Since then, it has become the world’s most popular NoSQL database (DB-Engines Ranking, 2015). 5 NOSQL DATABASE COMPARISON: BIGTABLE, CASSANDRA AND MONGODB Data model & operations. MongoDB was developed in a javascript-oriented ​ environment, and it shows in its data structure. It is classified as a document store, or document-oriented database. These provide the same lookup functionality as a key-value store, but also provide visibility into the stored documents (MongoDB, 2015). Data is stored in BSON, or Binary JSON, which is just what you’d think: an optimized structure for JSON. In everyday usage, it looks almost exactly like JSON to developers. Because JSON usage is so widespread, MongoDB’s learning curve is small compared to other databases. This opens the api for querying, filtering and sorting based on values within the document, modifying individual document values, and MapReduce and aggregation functions. Documents are partitioned into collections in MongoDB as rows are partitioned into tables in a relational store. Documents in a collection should contain similar data and have the same structure, though this is not enforced. Physical Storage. The size of BSON objects is limited to 16MB. Just as documents ​ can be queried by inner value, they can also be indexed. The administrator can define a sharding key to increase data locality, which optimizes aggregation functions (Suter, 2012). ACID properties. Operations are atomic on a document-level. This means that ​ data which must be atomic must be within a single document. Atomic transactions are not possible across multiple documents. Scalability. MongoDB automatically manages horizontal scaling across shards. As ​ a node is
Recommended publications
  • Download File
    Annex 2: List of tested and analyzed data sharing tools (non-exhaustive) Below are the specifications of the tools surveyed, as to February 2015, with some updates from April 2016. The tools selected in the context of EU BON are available in the main text of the publication and are described in more details. This list is also available on the EU BON Helpdesk website, where it will be regularly updated as needed. Additional lists are available through the GBIF resources page, the DataONE software tools catalogue, the BioVel BiodiversityCatalogue and the BDTracker A.1 GBIF Integrated Publishing Toolkit (IPT) Main usage, purpose, selected examples The Integrated Publishing Toolkit is a free open source software tool written in Java which is used to publish and share biodiversity data sets and metadata through the GBIF network. Designed for interoperability, it enables the publishing of content in databases or text files using open standards, namely, the Darwin Core and the Ecological Metadata Language. It also provides a 'one-click' service to convert data set metadata into a draft data paper manuscript for submission to a peer-reviewed journal. Currently, the IPT supports three core types of data: checklists, occurrence datasets and sample based data (plus datasets at metadata level only). The IPT is a community-driven tool. Core development happens at the GBIF Secretariat but the coding, documentation, and internationalization are a community effort. New versions incorporate the feedback from the people who actually use the IPT. In this way, users can help get the features they want by becoming involved. The user interface of the IPT has so far been translated into six languages: English, French, Spanish, Traditional Chinese, Brazilian Portuguese, Japanese (Robertson et al, 2014).
    [Show full text]
  • System and Organization Controls (SOC) 3 Report Over the Google Cloud Platform System Relevant to Security, Availability, and Confidentiality
    System and Organization Controls (SOC) 3 Report over the Google Cloud Platform System Relevant to Security, Availability, and Confidentiality For the Period 1 May 2020 to 30 April 2021 Google LLC 1600 Amphitheatre Parkway Mountain View, CA, 94043 650 253-0000 main Google.com Management’s Report of Its Assertions on the Effectiveness of Its Controls Over the Google Cloud Platform System Based on the Trust Services Criteria for Security, Availability, and Confidentiality We, as management of Google LLC ("Google" or "the Company") are responsible for: • Identifying the Google Cloud Platform System (System) and describing the boundaries of the System, which are presented in Attachment A • Identifying our service commitments and system requirements • Identifying the risks that would threaten the achievement of its service commitments and system requirements that are the objectives of our System, which are presented in Attachment B • Identifying, designing, implementing, operating, and monitoring effective controls over the Google Cloud Platform System (System) to mitigate risks that threaten the achievement of the service commitments and system requirements • Selecting the trust services categories that are the basis of our assertion We assert that the controls over the System were effective throughout the period 1 May 2020 to 30 April 2021, to provide reasonable assurance that the service commitments and system requirements were achieved based on the criteria relevant to security, availability, and confidentiality set forth in the AICPA’s
    [Show full text]
  • F1 Query: Declarative Querying at Scale
    F1 Query: Declarative Querying at Scale Bart Samwel John Cieslewicz Ben Handy Jason Govig Petros Venetis Chanjun Yang Keith Peters Jeff Shute Daniel Tenedorio Himani Apte Felix Weigel David Wilhite Jiacheng Yang Jun Xu Jiexing Li Zhan Yuan Craig Chasseur Qiang Zeng Ian Rae Anurag Biyani Andrew Harn Yang Xia Andrey Gubichev Amr El-Helw Orri Erling Zhepeng Yan Mohan Yang Yiqun Wei Thanh Do Colin Zheng Goetz Graefe Somayeh Sardashti Ahmed M. Aly Divy Agrawal Ashish Gupta Shiv Venkataraman Google LLC [email protected] ABSTRACT 1. INTRODUCTION F1 Query is a stand-alone, federated query processing platform The data processing and analysis use cases in large organiza- that executes SQL queries against data stored in different file- tions like Google exhibit diverse requirements in data sizes, la- based formats as well as different storage systems at Google (e.g., tency, data sources and sinks, freshness, and the need for custom Bigtable, Spanner, Google Spreadsheets, etc.). F1 Query elimi- business logic. As a result, many data processing systems focus on nates the need to maintain the traditional distinction between dif- a particular slice of this requirements space, for instance on either ferent types of data processing workloads by simultaneously sup- transactional-style queries, medium-sized OLAP queries, or huge porting: (i) OLTP-style point queries that affect only a few records; Extract-Transform-Load (ETL) pipelines. Some systems are highly (ii) low-latency OLAP querying of large amounts of data; and (iii) extensible, while others are not. Some systems function mostly as a large ETL pipelines. F1 Query has also significantly reduced the closed silo, while others can easily pull in data from other sources.
    [Show full text]
  • Containers at Google
    Build What’s Next A Google Cloud Perspective Thomas Lichtenstein Customer Engineer, Google Cloud [email protected] 7 Cloud products with 1 billion users Google Cloud in DACH HAM BER ● New cloud region Germany Google Cloud Offices FRA Google Cloud Region (> 50% latency reduction) 3 Germany with 3 zones ● Commitment to GDPR MUC VIE compliance ZRH ● Partnership with MUC IoT platform connects nearly Manages “We found that Google Ads has the best system for 50 brands 250M+ precisely targeting customer segments in both the B2B with thousands of smart data sets per week and 3.5M and B2C spaces. It used to be hard to gain the right products searches per month via IoT platform insights to accurately measure our marketing spend and impacts. With Google Analytics, we can better connect the omnichannel customer journey.” Conrad is disrupting online retail with new Aleš Drábek, Chief Digital and Disruption Officer, Conrad Electronic services for mobility and IoT-enabled devices. Solution As Conrad transitions from a B2C retailer to an advanced B2B and Supports B2C platform for electronic products, it is using Google solutions to grow its customer base, develop on a reliable cloud infrastructure, Supports and digitize its workplaces and retail stores. Products Used 5x Mobile-First G Suite, Google Ads, Google Analytics, Google Chrome Enterprise, Google Chromebooks, Google Cloud Translation API, Google Cloud the IoT connections vs. strategy Vision API, Google Home, Apigee competitors Industry: Retail; Region: EMEA Number of Automate Everything running
    [Show full text]
  • Beginning Java Google App Engine
    apress.com Kyle Roche, Jeff Douglas Beginning Java Google App Engine A book on the popular Google App Engine that is focused specifically for the huge number of Java developers who are interested in it Kyle Roche is a practicing developer and user of Java technologies and the Google App Engine for building Java-based Cloud applications or Software as a Service (SaaS) Cloud Computing is a hot technology concept and growing marketplace that drives interest in this title as well Google App Engine is one of the key technologies to emerge in recent years to help you build scalable web applications even if you have limited previous experience. If you are a Java 1st ed., 264 p. programmer, this book offers you a Java approach to beginning Google App Engine. You will explore the runtime environment, front-end technologies like Google Web Toolkit, Adobe Flex, Printed book and the datastore behind App Engine. You'll also explore Java support on App Engine from end Softcover to end. The journey begins with a look at the Google Plugin for Eclipse and finishes with a 38,99 € | £35.49 | $44.99 working web application that uses Google Web Toolkit, Google Accounts, and Bigtable. Along [1]41,72 € (D) | 42,89 € (A) | CHF the way, you'll dig deeply into the services that are available to access the datastore with a 52,05 focus on Java Data Objects (JDO), JDOQL, and other aspects of Bigtable. With this solid foundation in place, you'll then be ready to tackle some of the more advanced topics like eBook integration with other cloud platforms such as Salesforce.com and Google Wave.
    [Show full text]
  • Migrating Your Databases to Managed Services on Google Cloud Table of Contents
    White paper June 2021 Migrating your databases to managed services on Google Cloud Table of Contents Introduction 3 Why choose cloud databases 3 The benefits of Google Cloud’s managed database services 5 Maximum compatibility for your workloads 6 For Oracle workloads: Bare Metal Solution for Oracle 8 For SQL Server workloads: Cloud SQL for SQL Server 10 For MySQL workloads: Cloud SQL for MySQL 12 For PostgreSQL workloads: Cloud SQL for PostgreSQL 14 For Redis and Memcached workloads: Memorystore 16 For Redis: Redis Enterprise Cloud 17 For Apache HBase workloads: Cloud Bigtable 19 For MongoDB workloads: MongoDB Atlas 20 For Apache Cassandra workloads: Datastax Astra 22 For Neo4j workloads: Neo4j Aura 23 For InfluxDB workloads: InfluxDB Cloud 25 Migrations that are simple, reliable, and secure 27 Assessing and planning your migration 27 Google Cloud streamlines your migrations 28 Google Cloud services and tools 28 Self-serve migration resources 28 Database migration technology partners 29 Google Professional Services 29 Systems integrators 29 Get started today 29 3 Introduction This paper is for technology decision makers, developers, architects, and DBAs. It focuses on modernizing database deployments with database services on Google Cloud. These services prioritize compatibility and simplicity of management, and include options for Oracle, SQL Server, MySQL, PostgreSQL, Redis, MongoDB, Cassandra, Neo4j, and other popular databases. To transform your business applications, consider Google Cloud native databases. For strategic applications that don’t go down, need on-demand and unlimited scalability, advanced security, and accelerated application development, Google provides the same cloud native database services that power thousands of applications at Google, including services like Google Search, Gmail, and YouTube with billions of users across the globe.
    [Show full text]
  • A Bridge to the Cloud Damien Contreras ダミアン コントレラ Customer Engineer Specialist, Data Analytics, Google Cloud アジェンダ
    A bridge to the Cloud Damien Contreras ダミアン コントレラ Customer Engineer Specialist, Data Analytics, Google Cloud アジェンダ 1 2 4 5 6 はじめに 移行する前の DWHの移行 GCP と連動 データの表示 準備 について はじめに 01 移行する前に| データウェアハウスの欠点 リアルタイムの負担は受 データ増加 けられない コスト データ形式対応外 セルフサービス分析 が難 しい ベンダーロックイン の心 スタースキーマとディメン 配 表ションとファクト表に合わ せる 移行する前に | データレイクの欠点 コスト クラスターのリソースの バージョンアップ バランス 複数のデータレイクが構築 パートナー、人材採用が困 される 難 移行する前に | Google Cloud の価値 コストパフォーマン 弾力性のある構 セキュリティー スが良い サイロはない サーバーレスでNo-ops ANSI SQL-2011 移行をする前に考 えること 02 Partners Cloud plan & cloud deploy 移行する前に | 社内にスキルはない場合 グーグルの支援 パートナーと BigQuery のスター Google リソースが ターパック 協力し合う https://cloud.google.com/partner s/?hl=ja 移行する前に | TCO & ROI アンケートを記入するだけ で 総所有コストのも計算 移行する前に | クラウドで構築 サイロ化に 2 3 なっている 1 データセット データと関連データの Proof of 基盤を構築 発見 Concept 誰でも ML を 使えれるよう 6 5 4 に 機械学習 ソースデータを 周りのシステム 移行 と通信用のツー ルの構築 DWH の移行について03 移行する前に | DWH移行対応 t n r m h o s v b ? Teradata IBM AWS Azure SQL Hadoop Oracle Snowfake Verica SAP BW その他 Netezza Redshif BigQuery t Teradata IBM Netezza から 13 IBM Netezza | アーキテクチャ FPGA CPU メモリー NZSQLコマンド:DML, データダンプ Host FPGA CPU (Linux JDBCコネクター:SQLクエリ メモリー サー バ) FPGA CPU Symmetric Multiprocessing メモリー (SMP)複数のマイクロプロセッサ Disk S-Blade Network Enclosure fabric AMPP Massively Parallel Processing Architecture (MPP) 大量な並行処理 IBM Netezza | データタイプ IBM Netezza の 31 タイプを全部 BigQuery でマッピングが出来ます IBM Netezza BigQuery VARCHAR STRING BOOLEANま BigQuery : TRUE / FALSE BOOL たBOOL Netezza : True / False, 1 / 0, yes / no, on / of TIME / TIMETZ / TIME BigQuery : の TIME でタイムゾーンはない TIME_WITH_TI ME_ZONE ARRAY Netezza : VARCHARのデータタイプに保存 IBM
    [Show full text]
  • Google Cloud Security Whitepapers
    1 Google Cloud Security Whitepapers March 2018 Google Cloud Encryption at Rest in Encryption in Transit in Application Layer Infrastructure Security Google Cloud Google Cloud Transport Security Design Overview in Google Cloud 2 Table of Contents Google Cloud Infrastructure Security Design Overview . 3 Encryption at Rest in Google Cloud . 23 Encryption in Transit in Google Cloud . 43 Application Layer Transport Security in Google Cloud . 75 3 A technical whitepaper from Google Cloud 4 Table of Contents Introduction . 7 Secure Low Level Infrastructure . 8 Security of Physical Premises Hardware Design and Provenance Secure Boot Stack and Machine Identity Secure Service Deployment . 9 Service Identity, Integrity, and Isolation Inter-Service Access Management Encryption of Inter-Service Communication Access Management of End User Data Secure Data Storage . 14 Encryption at Rest Deletion of Data Secure Internet Communication . 15 Google Front End Service Denial of Service (DoS) Protection User Authentication Operational Security . 17 Safe Software Development Keeping Employee Devices and Credentials Safe Reducing Insider Risk Intrusion Detection 5 Securing the Google Cloud Platform (GCP) . .. 19 Conclusion . 21 Additional Reading . 22 The content contained herein is correct as of January 2017, and represents the status quo as of the time it was written. Google’s security policies and systems may change going forward, as we continually improve protection for our customers. 6 CIO-level summary • Google has a global scale technical infrastructure designed to provide security through the entire information processing lifecycle at Google. This infrastructure provides secure deployment of services, secure storage of data with end user privacy safeguards, secure communications between services, secure and private communication with customers over the internet, and safe operation by administrators.
    [Show full text]
  • Ray Cromwell
    Building Applications with Google APIs Ray Cromwell Monday, June 1, 2009 “There’s an API for that” • code.google.com shows 60+ APIs • full spectrum (client, server, mobile, cloud) • application oriented (android, opensocial) • Does Google have a Platform? Monday, June 1, 2009 Application Ecosystem Client REST/JSON, GWT, Server ProtocolBuffers Earth PHP Java O3D App Services Media Docs Python Ruby Utility Blogger Spreadsheets Maps/Geo JPA/JDO/Other Translate Base Datastore GViz Social MySQL Search OpenSocial Auth FriendConnect $$$ ... GData Contacts AdSense Checkout Monday, June 1, 2009 Timefire • Store and Index large # of time series data • Scalable Charting Engine • Social Collaboration • Story Telling + Video/Audio sync • Like “Google Maps” but for “Time” Monday, June 1, 2009 Android Version 98% Shared Code with Web version Monday, June 1, 2009 Android • Full API stack • Tight integration with WebKit browser • Local database, 2D and 3D APIs • External XML UI/Layout system • Makes separating presentation from logic easier, benefits code sharing Monday, June 1, 2009 How was this done? • Google Web Toolkit is the Foundation • Target GWT JRE as LCD • Use Guice Dependency Injection for platform-specific APIs • Leverage GWT 1.6 event system Monday, June 1, 2009 Example App Code Device/Service JRE interfaces Guice Android Browser Impl Impl Android GWT Specific Specific Monday, June 1, 2009 Shared Widget Events interface HasClickHandler interface HasClickHandler addClickHandler(injectedHandler) addClickHandler(injectedHandler) Gin binds GwtHandlerImpl
    [Show full text]
  • Before We Start…
    Before we start… This is the Introduction to Databases Design and Implementation workshop • Download material: dartgo.org/db-design • Poll / Interactive questions: dartgo.org/poll • Optional software: https://dev.mysql.com/downloads/workbench/ • More info: rc.dartmouth.edu Introduction to Database Design and Implementation Christian Darabos, Ph.D. [email protected] Slides download: dartgo.org/db-design Overview • introduction to Databases and this workshop • development/production environments • tools (admin, browse, query, etc.) • DB design, UML and case study (http://www.datanamic.com/support/lt-dez005-introduction-db-model ing.html) • port model into MySQL Workbench Right-click > Open link in new window To keep open slides and poll dartgo.org/poll Research Computing Introduction • Research Computing service offering • Definition of a Relational Database • Overview of this workshop Right-click > Open link in new window To keep open slides and poll dartgo.org/poll Definition of a Relational Database (SQL) • a database type structured to recognize relations among stored items of information • designed to store text, dates/times, integers, floating-point number • implemented as a series of tables Mental Model • Think of a database as a set of spreadsheets • Each spreadsheet (or table) represents a type of entity (person, object, concept, etc.) • Better than Excel because it also models the relationship between the entities Why use a Relational Database • concurrent (simultaneous) read and write • powerful selecting, filtering and sorting cross-referencing tables • large quantity of structured storage and standardized distribution • minimize post-processing (simple analytics tools pre-implemented) • automate using any scripting and programming languages (R, Matlab, Python, C++, Java, PHP) • web-proof SQL vs.
    [Show full text]
  • Web2py Dojo @Pycon 2009 Goal
    web2py Dojo @PyCon 2009 Goal • Write an application that allows you to post news (in markdown syntax), attach and link documents to news, restrict access, provides login, logout, registration, and exposes the posted news as multiple services. • 29 (models) + 47 (controllers) + 45 (views) = 121 total lines of code • type only stuff in blue Part 0 • Download “web2py 1.59” from http://www.web2py.com • Start it with: $ python web2py.py • Create an application called “news” Part 1 • Create a table “news_item” with fields: • title • body • posted_on FILE: applications/news/models/db.py try: from gluon.contrib.gql import * except: db = SQLDB('sqlite://storage.db') # connect to SQLite else: db = GQLDB() # connect to Google BigTable session.connect(request, response, db=db) db.define_table('news_item', db.Field('title',length = 128), db.Field('body','text'), db.Field('posted_on','datetime')) Part 1 • Create a table “document” with fields • news_id which references news_item • name • uploaded file FILE: applications/news/models/db.py try: from gluon.contrib.gql import * except: db = SQLDB('sqlite://storage.db') # connect to SQLite else: db = GQLDB() # connect to Google BigTable session.connect(request, response, db=db) db.define_table('news_item', db.Field('title',length = 128), db.Field('body','text'), db.Field('posted_on','datetime')) db.define_table('document', db.Field('news_id',db.news_item), db.Field('name',length = 128), db.Field('file','upload')) Try appadmin • http://127.0.0.1:8000/news/appadmin • Try insert some records • Try select some
    [Show full text]
  • Bigquery Table Date Range Standard Sql
    Bigquery Table Date Range Standard Sql Comminative West literalise obstreperously and foul, she excavated her Mormons grin edgily. Mike dismantling chastely if seraphical Douggie literalizes or anele. Rustin ballyragged her spectacle granularly, she insheathed it peremptorily. Csv exports the date range variables can override widget css code here in a new section below query and batch your email is highly useful and Photo credit Georgetown University. The these of rows of data under this table. Out of crew, the cookies that are categorized as bone are stored on your browser as they are essential for office working of basic functionalities of the website. Solution if running build steps in a Docker container. It is wide for concurrent use. Only used when character data. The WHERE statements in this view proper care of badly defined rows in sole source files. Will also friendly to visible with numerous sample datase. Try turning detect schema and format options automatically. The bypass of building query depends on the loom of bytes read and the glory BEFORE applying the dictionary clause. If you counsel your drive or bush the maiden, the computed values for this function are updated. Service catalog for admins managing internal enterprise solutions. The leaving date falls on a Monday and the purchase date falls on a Sunday. The returned Extractor may optionally be further configured before nor Run method is called. Extracts the DATE though a DATETIME expression. The default value comes from your pipeline options object. Get an iterator to iterate through you set specific table rows. Unfortunately he sin not received a crime either.
    [Show full text]