こんにちは!バクラク事業部 Platform Engineering 部 DevOps チームの id:sadayoshi_tadaです。 7月はエンジニアブログがたくさん出る #ベッテク月間です。今後も記事が出ますので、どんな記事がでるのかこちらのカレンダーからよければチェックしてみてください!7/2にSRE Lounge#17にて開発者が安心して実行可能なSQL実行基盤の取り組みという発表させていただきました。この記事では当該発表で時間の関係で触れきれなかった内容や補足を行っていきます。 従来のデータベースのデータ変更における課題 課題に対する解決策の検討 Bytebaseの利用にかかるコスト Bytebaseの導入及びデータ変更のフロー整備 データ変更のフロー整備 Bytebase導入後の変化 データ変更オペレーション上の課題 まとめ 最後に 従来のデータベースのデータ変更における課
In this post we'll build a database in 400 lines of code with basic support for five standard SQL transaction levels: Read Uncommitted, Read Committed, Repeatable Read, Snapshot Isolation and Serializable. We'll use multi-version concurrency control (MVCC) and optimistic concurrency control (OCC) to accomplish this. The goal isn't to be perfect but to explain the basics in a minimal way. You don't
Every SQL statement is limited to return a single, possibly denormalized, table. This design decision has far reaching consequences. (1.) for databases users in terms of slow query performance, long query result transfer times, usability-issues of SQL in web applications and object-relational mappers. In addition, (2.) for database architects it has consequences when designing query optimizers lea
3行まとめ テーブルの撤退時にはテーブルの参照回数を見ることが多いと思いますが、テーブル単独の参照回数を見るだけだと不十分なことが多いです 派生先のテーブルの参照回数まで考慮すると、テーブルが撤退できるか安全に判断することができます リネージ上の親子関係をWITH RECURSIVEで考慮しながら、累積参照回数をSQLで導出できるようにし、安全にテーブル撤退を判断できるようにしました 3行まとめ 背景: テーブルの撤退にはテーブル単独の参照回数を見るだけだと不十分 アイディア: 累積参照回数を計算する 実装 テーブル間の親子関係を抽出する WITH RECURSIVEでテーブルの親子関係を辿る テーブルの親子関係を考慮しながら、累積参照回数を計算する まとめ 背景: テーブルの撤退にはテーブル単独の参照回数を見るだけだと不十分 データエンジニアやアナリティクスエンジニアの仕事をしていると、
Team82 Research {JS-ON: Security-OFF}: Abusing JSON-Based SQL to Bypass WAF Executive SummaryTeam82 has developed a generic bypass of industry-leading web application firewalls (WAF). The attack technique involves appending JSON syntax to SQL injection payloads that a WAF is unable to parse. Major WAF vendors lacked JSON support in their products, despite it being supported by most database engine
The Database Cookbook For Developers You don't know SQL. Aside from basic CRUD statements, you haven't used any advanced database features. This free ebook will share many recipes to make development faster by using a lot of stuff you probably never heard of. Your database knowledge is outdated Your Tech Stack has changed dramatically in the past 20 years: Some technologies are now state-of-the-ar
We announced Cloudflare Workers in 2017, giving developers access to compute on our network. We were excited about the possibilities this unlocked, but we quickly realized — most real world applications are stateful. Since then, we’ve delivered KV, Durable Objects, and R2, giving developers access to various types of storage. Today, we're excited to announce D1, our first SQL database. While the w
1. sqldef とは sqldef は "The easiest idempotent MySQL/PostgreSQL/SQLite3/SQL Server schema management by SQL." と謳っているDBスキーマ変更管理ツールです。 通常の開発において DDL 文を管理する場合、環境を1から作るように CREATE TABLE 文など新規作成 DDL 文を準備すると共に、既に作成済みの環境でテーブルを変更するために ALTER TABLE 文など差分適用 DDL 文を準備する必要があります。この2種類の DDL 文を二重管理しないといけないというのは DBA にとっては頭の悩ましい問題でした。(差分適用 DDL 文のみ準備し、1から環境を作る場合も全ての変更を適用するという手もありますが…) sqldef を利用すると、変更適用先 DB の現在の状況と新規作成
TLDR The relational model is great: A shared universal data model allows cooperation between programs written in many different languages, running on different machines and with different lifespans. Normalization allows updating data without worrying about forgetting to update derived data. Physical data independence allows changing data-structures and query plans without having to change all of y
People who work with me tend to realize that I have Opinions about databases, and SQL databases in particular. Last week, I wrote about a Postgres debugging story and tweeted about AWS’ policy ban on internal use of SQL databases, and had occasion to discuss and debate some of those feelings on Twitter; this article is an attempt to write up more of them into a single place I can refer to. I belie
The questions we often hear are "Why create a new query language?" and "What's wrong with SQL?". This post contains answers to both. Before we begin, let's overview some of the history of how the relational model came to be, and how SQL was created. The relational model was introduced by Edgar F. Codd in a seminal 1970 paper "A Relational Model of Data for Large Shared Data Banks" [4]. There, Codd
Initially, I wasn’t sure whether to write about this migration project, but when I randomly asked if people would be interested, the response was overwhelming. This was a long, kind of boring, very repetitive, and at times incredibly frustrating project, but I learned a lot, and maybe someone else will learn from this too. There may be far better ways to move this amount of data. In the path I wen
@tkanayama_です。「SQLアンチパターン *1」 という本を読みました。「ポケモンを題材に因果推論を実践してみる」のように、仮想的なストーリ上で実際に使ってみた感を出すことにより、自分の記憶に定着させることを狙います。 前提として、何をアンチパターンとするかは状況(ベンダーフリーである必要があるかどうか、どの程度の頻度で更新されるか・・・など)によって大きく異なるので、下記で紹介するアンチパターンは実は状況によっては問題にならないケースもあるかと思います。この投稿はあくまで「SQLアンチパターン」に忠実に従うことが目的です。 www.oreilly.co.jp 追記 登場人物 ストーリー フシギダネへの対応 ヤミカラスへの対応 ディグダへの対応 誤登録でポケモントレーナーになってしまったユーザーの削除 最後に 謝辞 追記 このブログを公開後、「外部キー制約はレコードロック周りのト
Distributed SQL database in Rust, built from scratch as an educational project. Main features: Raft distributed consensus engine for linearizable state machine replication. ACID transaction engine with MVCC-based snapshot isolation. Pluggable storage engine with BitCask and in-memory backends. Iterator-based query engine with heuristic optimization and time-travel support. SQL interface including
リレーショナルデータベースが話題に挙がるとき、私は何かが足りないと思わずにはいられません。データベースはあらゆるところで使われており、その種類も、小規模で便利なSQLiteからパワフルなTeradataまで様々です。しかし、それがどういう仕組みで機能しているかを説明したものとなると、その数はごくわずかではないでしょうか。例えば「リレーショナルデータベース 仕組み」などで検索してみてください。ヒット数の少なさを実感できると思います。さらにそれらの記事は短いものがほとんどです。逆に、近年流行している技術(ビッグデータ、NoSQL、JavaScriptなど)を検索した場合、それらの機能を詳しく説明した記事はたくさん見つかると思います。 リレーショナルデータベースは、もはや大学の授業や研究論文、専門書などでしか扱われないような古くて退屈な技術なのでしょうか? 私は開発者として、理解していないものを
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く