生物資訊程式語言應用 Part 7 Database Management by PHP. 2 Database Management and data presentation Database : MySqlMySql Tools : phpmyadminphpmyadmin Step 1 :

Slides:



Advertisements
Similar presentations
Updating Databases With Open SQL
Advertisements

Chapter Programming in C
The Collections Keeper A collections management system Brian J. Mullen.
FCU, Department of ECE, IC Design Research Lab. TEL: # 4945 Pre-SIm , Post-Sim.
Software Engineering for Digital Home 單元 2 :軟體處理程序與需求分析 2-3 需求工程處理程序 Presenter: Away.
學習C++的基本語法 認識關鍵字與識別字的不同 學習程式碼偵錯的流程 學習如何提高程式的可讀性
:Word Morphing ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10508:word morphing 解題者:楊家豪 解題日期: 2006 年 5 月 21 日 題意: 第一行給你兩個正整數, 第一個代表下面會出現幾個字串,
Reference, primitive, call by XXX 必也正名乎 誌謝 : 部份文字取於前輩 TAHO 的文章.
Reference, primitive, call by XXX 必也正名乎 誌謝 : 部份文字取於前輩 TAHO 的文章 CS340100, NTHU Yoshi.
第一章 變數、常數及資料型態. 變數 C 程式語言的變數名稱 第一個字必須是英文字母或底線 (_) 之後可以是數字, 英文字母或底線 (_) 不可以是保留字 例: Num (Ο) _score (Ο) C&C (X) 8num (X)
JAVA 程式設計與資料結構 第二章 JAVA 程式基本概念及操作. 第一個程式 /* * 這是第一個程式 (FirstP.java) */ class FirstP{ public static void main(String args[]){ System.out.println("Whatever.
例外處理. 內 容 大 綱 例外的產生 捕捉例外 丟出例外 例外的產生 (1/4) 一般常見的執行時期錯誤包括整數除法分母為 0(divide by zero) ,陣列索引值越限 (array index out of range) ,輸入輸出錯誤 (I/O error) 、檔案 不存在或無法存取.
JAVA 程式設計與資料結構 第十四章 Linked List. Introduction Linked List 的結構就是將物件排成一列, 有點像是 Array ,但是我們卻無法直接經 由 index 得到其中的物件 在 Linked List 中,每一個點我們稱之為 node ,第一個 node.
程式註解說明. 2 程式註解格式 塊狀註解 對檔案、 class 、 method 、資料結構、一段程式 …. 等程式區塊 做說明。 第一行的開頭必需為 “/*” 且沒有其他文字,最後一行的開頭 必需以 “*/” 做為結束,在中間每一行的開頭都必需是一個 “*” 。 單行註解 佔據一整行的說明。 以.
第十二章 常用的數學函數. 數字函數 此類函數主要是一些常用的數學函數 定義在 標頭檔 C 提供之數學函數 pow(), sqrt(), exp() log(), log10() ceil(), floor() fabs(), ldexp() fmod(), modf()
JAVA 程式設計與資料結構 第十章 GUI Introdution III. File Chooser  File Chooser 是一個選擇檔案的圖形介面, 無論我們是要存檔還是要開啟檔案,使 用這個物件都會讓我們覺得容易且舒適。
Introduction to Java Programming Lecture 5: Using Java Classes : String & Math Spring 2009.
Introduction to pointers in C/C++. Pointers 特殊變數 存放變數在記憶體中的位址 MinGW C++ 中佔用 4 bytes 間接定址取執法 位址 指標變數 變數內容 變數.
Introduction to Java Programming Lecture 15 Objects and Classes.
顯示訊息 MsgBox 函數 將訊息顯示在對話方塊中,等使用者按下按鈕,並傳回一 Integer 來指示使用者按下的是那一個鈕。 語法
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
7 陣列與搜尋 7.1 陣列 一般資料變數 宣告一維陣列 起始一維陣列 7-4
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 參 資料蒐集的方法.
: Problem A : MiniMice ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11411: Problem A : MiniMice 解題者:李重儀 解題日期: 2008 年 9 月 3 日 題意:簡單的說,題目中每一隻老鼠有一個編號.
國立聯合大學 資訊管理學系 陳士杰老師 SQL*Plus 與 iSQL*Plus 簡介. 國立聯合大學 資訊管理學系 資料庫系統課程 ( 陳士杰 ) 2 啟動 SQL*Plus 與 iSQL*Plus 方式 Windows 平台.
資料結構實習-一 參數傳遞.
研究資料的分析. 資料分析的基本策略  General data analysis strategies 1.Sketching ideas 2.Taking notes 3.Summarize field nores 4.Getting feedback on ideas 5.Working with.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2008.
JAVA 程式設計與資料結構 第二十章 Searching. Sequential Searching Sequential Searching 是最簡單的一種搜尋法,此演 算法可應用在 Array 或是 Linked List 此等資料結構。 Sequential Searching 的 worst-case.
資料結構實習-二.
Windows Processing Design1 Chapter 1 C/C++ 概論 畫面輸出與鍵盤輸入 程式流程 程式流程的迴圈 函數的基礎 指標與陣列 字串 類別 利用 BCB 開發程式.
Chapter 2. Recurrence Relations (遞迴關係)
資料結構實習-十 Binary Tree Traversal.
廣電新聞播報品質電腦化 評估系統之研發 國立政治大學 資訊科學系 指導教授:廖文宏 學生:蘇以暄.
生物資訊程式語言應用 Part 2 HTML. 2 Principle of Programming Interface with PC English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine.
Hung-Hsiang WuWindows Processing Design1 Chapter10 資料庫元件應用二 Table and Query 元件不同處: 提供 SQL (Structured Query Language) 語法 各種資料庫軟體大都支援 SQL 語法  Oracle 、
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2009.
String and Text I/O Outline The String Class Immutable Strings and Interned Strings String Comparisons String Length, Characters,
: Dream ★★★☆☆ 題組: Contest Archive with Online Judge 題號: 11414: Dream 解題者:李育賢 解題日期: 2008 年 9 月 2 日 題意: 題目會給你一個數字代表測資的數量 ( 最多 100 組 ) , 每組測資第一個數字是此圖形點的個數.
Java class Outline Defining a method Calling Method Passing parameters [Sample code] TestMethod.java 、 TestMethod2.java 、 GCD.java 、 prime.java.
I/O of C and C++. printf and scanf of C Should add printf (“control string”, exp1, exp2,…) Scanf(“control string”, &var1, &var2,…)
11 Ch05 遞迴 淡江大學 周清江 1. 2  遞迴函數乃是一個自己反覆呼叫自己的函數  一個典型的遞迴演算法 n! = n * (n-1)! = n * (n-1) * (n-2)! = n * (n-1) * (n-2) * (n-3)! = … = n * (n-1) * (n-2)
C 語言練習題 2010/12/2. C 程式的格式 一、 C 程式的格式 (1). /* …. */ 是 C 程式的 ______ main() 的內容是由敘述構成的 (2). 敘述要以 __ 為結束符號 (3). 變數、函數都要做 ____ 的宣告 (4). ‘=’ 是 ____ 用的算符 (5).
第十三章 檔案. 檔案 I/O 的基本觀念 檔案 I/O 的流程 定義指向 FILE 結構的指標 開啟一檔案 呼叫檔案 I/O 庫存函數以進行檔案的處理 關閉檔案 FILE 結構 此結構宣告於 標頭檔中.
第8章 字串與陣列 8-1一維陣列的處理 8-2 字串處理 8-3 多維陣列的處理 8-4 動態陣列與參數傳遞 8-5 陣列排序與搜尋.
Introduction to Java Programming Lecture 16 Super and Sub Classes.
Database Updates Made Easy In WebFocus Using SQL And HTML Painter Sept 2011 Lender Processing Services 1.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
Basic Introduction of BLAST Jundi Wang School of Computing CSC691 09/08/2013.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
Mark Dixon Page 1 23 – Web applications: Writing data to Databases using PhP.
Chapter 16 AJAX. Introduction AJAX stands for Asynchronous JavaScript And XML. AJAX is a type of programming made popular in 2005 by Google (with Google.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
PHP Part 2.
生物資訊程式語言應用 Part 5 Perl and MySQL Applications. Outline  Application one.  How to get related literature from PubMed?  To store search results in database.
RMI CORBA Matt. 2 RMI VS CORBA 3 4 J2EE 5 Sample Application.
PHP and Mysql Database. PHP and Database Mysql – popular open-source database management system PHP usually works with Mysql for web-based database applications.
1 DIG 3134 – Lecture 14 MySQL and PHP Play Together Michael Moshell University of Central Florida Media Software Design.
THE WEBMASTERS: SENG + WAVERING.  On account of construction, we will be having class in room 1248 next week.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
網站開發架構與工具 張耀仁. Motivation Content  HTML, CSS, JavaScript, SQL  Ruby on Rails  Reference.
Group 2 Block 胡貴蓉 Project 2 JMVC code tracing.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
生物資訊程式語言應用 Part 4 MySQL.
Updating Databases With Open SQL
Updating Databases With Open SQL
Presentation transcript:

生物資訊程式語言應用 Part 7 Database Management by PHP

2 Database Management and data presentation Database : MySqlMySql Tools : phpmyadminphpmyadmin Step 1 : Creating a database and tables in MySql To create a database To create a table and to define attributes Insert data (By program-Perl or manual)Perl Step 2 : Develop a website for this database Selection / insertion / deletion / updating According to user requirements.

3 Flow Chart Perl PHP MySql

4 Management and presentation for PubMed data Management Selection Insertion Deletion Updating Link Files Index.php abstract.php abstractDel.php abstractUpd.php abstractUpdInt.php abstractIns.php abstractNew.php

5 Management and presentation for PubMed data Management Selection Insertion Deletion Updating Link Files Index.php abstract.php abstractDel.php abstractUpd.php abstractUpdInt.php abstractIns.php abstractNew.php

6 The query frame (index.php) SQL: SHOW COLUMNS FROM article FROM summer;

7 The query frame (index.php) Send two massages (choice, text_query) to article.php Example : To select abstract and key in “interaction”. Setup for DB link SQL Obtain records

8 Selection (article.php) Select abstract and key in “interaction”. SELECT * FROM article where abstract like '%interaction%'

9 Selection (article.php) (con.)

10 Setup for DB link SQL Obtain records

11 Exercise article.php article_html.php article_php.php index.php index_html.php index_php.php To build article.php and index.php by *_php.php and *_html.php

IKM Manage database by Phpmyadmin. How do we manage the database by phpmyadmin? How do we manage the database by PHP?

13

14

15 UpdatingDeletiion Insertion

16 Insertion

17 Insertion (con.)

18 Updating

19 Deletion

20 Exercise Use phpmyadmin to insert a record to article table, and write down their executing SQL. Use phpmyadmin to update a record to article table, and write down their executing SQL. Use phpmyadmin to delete a record to article table, and write down their executing SQL.

21 Build a new frame for insertion, deletion and updating. (article.php)

22 Exercise Include insertion, updating, deletion buttons in article.php You may apply article_IDUtag.php to finish you practice.

23 Management and presentation for PubMed data Management Selection Insertion Deletion Updating Link Files Index.php abstract.php abstractDel.php abstractUpd.php abstractUpdInt.php abstractIns.php abstractNew.php

24 Insertion-Abstract Insert frame (article_new.php) Send two massages (pmid, year, title, abstract) to articleIns.php

25 Exercise articleNew.php What is the target file you want to send these massages?

26 Insertion - Insert into MySql (articleIns.php) Setup for DB link SQL Get massages

27 Exercise Please to finish insertion step by modifying articleIns.php.

28 Management and presentation for PubMed data Management Selection Insertion Deletion Updating Link Files Index.php abstract.php abstractDel.php abstractUpd.php abstractUpdInt.php abstractIns.php abstractNew.php

29 Updating (article.php)

30 Updating (articleUpd.php)

31 Exercise articleUpd.php articleUpd_php.php To build articleUpd.php and by articleUpd_php.php and articleUpd_php.php

32 Updating (con.) (articleUpdInt.php) Setup for DB link SQL

33 Exercise Please to finish Updating step by modifying articleUpdIns.php.

34 Management and presentation for PubMed data Management Selection Insertion Deletion Updating Link Files Index.php abstract.php abstractDel.php abstractUpd.php abstractUpdInt.php abstractIns.php abstractNew.php

35 Deletion (article.php)

36 Deletion (con.) (articleDel.php) Setup for DB link SQL

37 Exercise Please to finish Deletion step by modifying articleDel.php.

Extract sequences from the NCBI By user query By FTP ftp.ncbi.nlm.nih.gov/refseq/H_sapiens/H_sapiens/protein/prot ein.fa.gz ftp.ncbi.nlm.nih.gov/refseq/H_sapiens/H_sapiens/RNA/rna.fa. gz 38

Insert the sequences to database To construct the table for the sequences. To use the program to insert the sequences in the table. Perl code (practice) 39

40 Exercise Use phpmyadmin to select, insert, update, delete a record to sequence table, and write down their executing SQL. Modified the article%.php for the sequences table.

41 Combine article.php and articleNew.php article.php?option=add

分頁 42

分頁 43

To calculate particular information for sequences Frequency 語法 : string substr (string string, int start [, int length]) 說明 : substr( ) 傳回 string 的一部份字串,由參數 start 和 length 指定。 如果 start 是正數,傳回的字串將會從 string 的第 start 個字元開始。 Example : <?php $rest = substr ("abcdef", 1); // returns "bcdef" $rest = substr ("abcdef", 1, 3); // returns "bcd" ?> 如果 start 是負數,傳回的字串將會從 string 結尾的第 start 個字開始。 44

To calculate particular information for sequences CG% Length 語法 : int strlen (string str) 說明 : 傳回字串 str 的長度 。 Example : <?php $DNA_length=strlen($a); ?> 45

Translate the nucleotide to amino acid $codons = substr ($sequence, $first, $first+2); 46

Submit a sequence to blast by the interface GRAMS=megaBlast&PAGE_TYPE=BlastSearch&SHOW_DEFAULTS= on&LINK_LOC=blasthome 47

Hyperlink for the sequence id Example: |ref|NM_ | Homo sapiens hypoxia inducible factor 1, alpha subunit (basic helix-loop-helix transcription factor) (HIF1A), transcript variant 2, mRNA 48

49 Resources MySql Perl phpmyadmin php