目錄
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 Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解鎖Myrise中的所有內容
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

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 GUI工具(例如MySQL Workbench,PhpMyAdmin)是什麼? 哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什麼? Mar 21, 2025 pm 06:28 PM

文章討論了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比較了它們對初學者和高級用戶的功能和適合性。[159個字符]

您如何處理MySQL中的大型數據集? 您如何處理MySQL中的大型數據集? Mar 21, 2025 pm 12:15 PM

文章討論了處理MySQL中大型數據集的策略,包括分區,碎片,索引和查詢優化。

說明InnoDB全文搜索功能。 說明InnoDB全文搜索功能。 Apr 02, 2025 pm 06:09 PM

InnoDB的全文搜索功能非常强大,能够显著提高数据库查询效率和处理大量文本数据的能力。1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

如何使用Drop Table語句將表放入MySQL中? 如何使用Drop Table語句將表放入MySQL中? Mar 19, 2025 pm 03:52 PM

本文討論了使用Drop Table語句在MySQL中放下表,並強調了預防措施和風險。它強調,沒有備份,該動作是不可逆轉的,詳細介紹了恢復方法和潛在的生產環境危害。

您如何用外國鑰匙代表關係? 您如何用外國鑰匙代表關係? Mar 19, 2025 pm 03:48 PM

文章討論了使用外國密鑰來代表數據庫中的關係,重點是最佳實踐,數據完整性和避免的常見陷阱。

如何在JSON列上創建索引? 如何在JSON列上創建索引? Mar 21, 2025 pm 12:13 PM

本文討論了在PostgreSQL,MySQL和MongoDB等各個數據庫中的JSON列上創建索引,以增強查詢性能。它解釋了索引特定的JSON路徑的語法和好處,並列出了支持的數據庫系統。

See all articles