目次
Trackback URL for this post:
ホームページ データベース mysql チュートリアル OurSQL Episode 191: Common Schema, part 1_MySQL

OurSQL Episode 191: Common Schema, part 1_MySQL

May 31, 2016 am 08:49 AM

This week we start talking about common schema by Shlomi Noach. Ear Candy is some caveats about GTIDs and replication, and At the Movies is using jQuery, AJAX and PHP to insert data into MySQL.

News

In the news, the OurSQL podcast will change to a monthly format after episode 200. We love doing the podcast, but it is very time consuming and production is expensive. We will still bring quality episodes, they will just be spaced further apart.

Common Schema

Common SchemaGoogle Code page

Installation sectionof the common schema documentation.

  • Process Routines- stored routines managing query, session and process information & workflow
    • session_unique_id()
    • query_latptime()
    • query_runtime()
    • this_query()
    • throttle()- some good examples here
  • General Routines- stored routines mostly dealing with checksums
    • crc64()- returns a crc64 checksum of the data given
    • query_checksum()- return a checksum of the results of the query specified
    • random_hash()
    • shorttime_to_seconds- converts human readable "short times" like 1h, 45m, and so on to a number of seconds
  • Query Analysis Routines- takes in the name of a schema and an object (event, routine, SQL statement or view) and returns a summary of the objects the given object involves, the type and schema for each dependent object
    • get_event_dependencies()- for events
    • get_routine_dependencies()- for stored functions and stored procedures
    • get_sql_dependencies()- for SQL statements
    • get_view_dependencies()- for views
    • Example of get_routine_dependencies():

      CALL common_schema.get_routine_dependencies( 'common_schema', 'get_routine_dependencies');

      +-------------+--------------------+-----------+------+

      | schema_name | object_name | object_type | action |

      +-------------+--------------------+-----------+------+

      | common_schema | get_sql_dependencies | procedure | call |

      | mysql | proc | table | select |

      +-------------+--------------------+-----------+------+

      2 rows in set (0.07 sec)

    • Schema Analysis Routines
      • table_exists()
      • table_rotate()- rotate a table in logrotate format
    • Security Routines
      • duplicate_grantee()- create a new user with the same privileges as an existing user
      • grant_access()- grant SELECT and EXECUTE on common_schema items to the user listed
      • match_grantee()- match a specified user@host with an entry in the mysql.user table
        For example, from PROCESSLIST:
        SELECT id, common_schema.mysql_grantee(user, host) FROM information_schema.processlist;
      • mysql_grantee()- return a qualified, valid mysql user from the information given
      • killall()
      • security_audit()- find unsecure accounts
    • Date and Time Routines
      • start_of_hour()
      • start_of_week()
      • start_of_week_sunday()
      • start_of_month()
      • start_of_quarter()
      • start_of_year()
      • is_datetime()
      • easter_day()
    • Charting Routines
      • line_chart()
      • google_line_chart()

      Common Schema risks

      Ear Candy

      In this week's ear candy we discussreplication challenges with GTIDs.

      At the movies

      This week in at the movies, we present a video on how toInsert Data Into MySQL Database using jQuery + AJAX + PHP

      Where you can see us

      Sheeri will be at theJuly Boston MySQL User Groupon Monday, July 14th, where we'll have David Berube talking about "Improving Your Database Designs with Practical Database Theory"..

      Gerry will be at theJuly Seattle MySQL User Groupon Monday, July 14th.

      Sheeri will be attending theTDWI Executive Summitin Boston from Sunday July 20th through Wednesday July 23rd.

      Gerry will be attendingOSCon 2014from Sunday July 20th through Thursday July 24th.

      Feedback

      Facebook group

      Google+ page

      e-mail: podcast at technocation.org

      voicemail using phone/Skype: +1-617-674-2369

      twitter:@oursqlcast

      orTweet about @oursqlcast

      Trackback URL for this post:

      http://technocation.org/trackback/1323

このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

Alter Tableステートメントを使用してMySQLのテーブルをどのように変更しますか? Alter Tableステートメントを使用してMySQLのテーブルをどのように変更しますか? Mar 19, 2025 pm 03:51 PM

この記事では、MySQLのAlter Tableステートメントを使用して、列の追加/ドロップ、テーブル/列の名前の変更、列データ型の変更など、テーブルを変更することについて説明します。

MySQL接続用のSSL/TLS暗号化を構成するにはどうすればよいですか? MySQL接続用のSSL/TLS暗号化を構成するにはどうすればよいですか? Mar 18, 2025 pm 12:01 PM

記事では、証明書の生成と検証を含むMySQL用のSSL/TLS暗号化の構成について説明します。主な問題は、セルフ署名証明書のセキュリティへの影響を使用することです。[文字カウント:159]

MySQLの大きなデータセットをどのように処理しますか? MySQLの大きなデータセットをどのように処理しますか? Mar 21, 2025 pm 12:15 PM

記事では、MySQLで大規模なデータセットを処理するための戦略について説明します。これには、パーティション化、シャード、インデックス作成、クエリ最適化などがあります。

人気のあるMySQL GUIツール(MySQL Workbench、PhpMyAdminなど)は何ですか? 人気のあるMySQL GUIツール(MySQL Workbench、PhpMyAdminなど)は何ですか? Mar 21, 2025 pm 06:28 PM

記事では、MySQLワークベンチやPHPMyAdminなどの人気のあるMySQL GUIツールについて説明し、初心者と上級ユーザーの機能と適合性を比較します。[159文字]

ドロップテーブルステートメントを使用してMySQLにテーブルをドロップするにはどうすればよいですか? ドロップテーブルステートメントを使用してMySQLにテーブルをドロップするにはどうすればよいですか? Mar 19, 2025 pm 03:52 PM

この記事では、ドロップテーブルステートメントを使用してMySQLのドロップテーブルについて説明し、予防策とリスクを強調しています。これは、バックアップなしでアクションが不可逆的であることを強調し、回復方法と潜在的な生産環境の危険を詳述しています。

JSON列にインデックスを作成するにはどうすればよいですか? JSON列にインデックスを作成するにはどうすればよいですか? Mar 21, 2025 pm 12:13 PM

この記事では、クエリパフォーマンスを強化するために、PostgreSQL、MySQL、MongoDBなどのさまざまなデータベースでJSON列にインデックスの作成について説明します。特定のJSONパスのインデックス作成の構文と利点を説明し、サポートされているデータベースシステムをリストします。

外国の鍵を使用して関係をどのように表現しますか? 外国の鍵を使用して関係をどのように表現しますか? Mar 19, 2025 pm 03:48 PM

記事では、外部キーを使用してデータベース内の関係を表すことで、ベストプラクティス、データの完全性、および避けるべき一般的な落とし穴に焦点を当てています。

共通の脆弱性(SQLインジェクション、ブルートフォース攻撃)に対してMySQLを保護するにはどうすればよいですか? 共通の脆弱性(SQLインジェクション、ブルートフォース攻撃)に対してMySQLを保護するにはどうすればよいですか? Mar 18, 2025 pm 12:00 PM

記事では、準備されたステートメント、入力検証、および強力なパスワードポリシーを使用して、SQLインジェクションおよびブルートフォース攻撃に対するMySQLの保護について説明します。(159文字)

See all articles