1 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu BIOINFORMATICS Databases Mark Gerstein, Yale University bioinfo.mbb.yale.edu/mbb452a.

Slides:



Advertisements
Similar presentations
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Advertisements

1 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu BIOINFORMATICS Databases Mark Gerstein, Yale University bioinfo.mbb.yale.edu/mbb452a.
1 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu BIOINFORMATICS Databases Mark Gerstein, Yale University bioinfo.mbb.yale.edu/mbb452a.
IS 4420 Database Fundamentals Chapter 6: Physical Database Design and Performance Leon Chen.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
3-1 Chapter 3 Data and Knowledge Management
LIS 557 Database Design and Management William Voon Michael Cole Spring '04.
Protein Modules An Introduction to Bioinformatics.
Chapter 11 Data Management Layer Design
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
BUSINESS DRIVEN TECHNOLOGY
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Logical Database Design Nazife Dimililer. II - Logical Database Design Two stages –Building and validating local logical model –Building and validating.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
IST Databases and DBMSs Todd S. Bacastow January 2005.
The Relational Database Model
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
CODD’s 12 RULES OF RELATIONAL DATABASE
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
CTFS Workshop Shameema Esufali Suzanne Lao Data coordinators and technical resources for the network
Chapter 2 Adapted from Silberschatz, et al. CHECK SLIDE 16.
GUS: 0262 Fundamentals of GIS Lecture Presentation 3: Relational Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Object Persistence (Data Base) Design Chapter 13.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
Storing Organizational Information - Databases
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Relational Database. Database Management System (DBMS)
Module Coordinator Tan Szu Tak School of Information and Communication Technology, Politeknik Brunei Semester
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is.
CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Databases Introduction - concepts. Concepts of Relational Databases.
Chapter 4 The Relational Model Pearson Education © 2009.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Databases and DBMSs Todd S. Bacastow January
Client/Server Databases and the Oracle 10g Relational Database
Databases Chapter 16.
ITD1312 Database Principles Chapter 5: Physical Database Design
Chapter 4 Relational Databases
Translation of ER-diagram into Relational Schema
CTFS Asia Region Workshop 2014
Normalization Normalization theory is based on the observation that relations with certain properties are more effective in inserting, updating and deleting.
Databases and Information Management
The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)
Presentation transcript:

1 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu BIOINFORMATICS Databases Mark Gerstein, Yale University bioinfo.mbb.yale.edu/mbb452a

2 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Start of class 2005,04.11 (Bioinfo-9)

3 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Contents: Databases Structuring Information in Tables Keys and Joins Normalization Complex RDB encoding Indexes and Optimization Forms and Reports

4 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu This type of “membership” analysis has been performed previously in terms of the occurrence of sequence motifs, families, functions, and biochemical pathways. Starting from the most basic units, genomes have been compared in terms of the relative frequencies of short oligonucleotide and oligopeptide “words” (Blaisdell et al., 1996; Karlin & Burge, 1995; Karlin et al., 1992; Karlin et al., 1996). The degree of gene duplication in a number of genomes has been ascertained (Brenner et al., 1995; Koonin et al., 1996b; Riley & Labedan, 1997; Wolfe & Shields, 1997; Gerstein, 1997; Tamames et al., 1997). Other analyses have looked at how many highly conserved sequence families in one organism are present in another (Green et al., 1993; Koonin et al., 1995; Tatusov et al., 1997; Ouzounis et al., 1995a,b; Clayton et al., 1997). Finally, if sequences can be related to specific functions and pathways, one can see whether homologous sequences in two organisms truly have the same role (ortholog vs. paralog) and whether particular pathways are present or absent in different organisms (Karp et al., 1996a; Karp et al., 1996b; Koonin et al., 1996a; Mushegian & Koonin, 1996; Tatusov et al., 1996, 1997). This work has yielded many interesting conclusions in terms of pathways that are modified or absent in certain organisms. For instance, the essential citric acid cycle is found to be highly modified in H. influenzae (Fleischmann et al., 1995; Tatusov et al., 1996). Furthermore, identifying pathways and proteins unique to certain microbes may prove useful for developing drugs (e.g. antibiotics against bacteria, Tatusov et al., 1997). In some genome annotation systems, attempts have been made to integrate a variety of membership analyses and perform them on a large scale in a highly automated fashion (Bork et al., 1992a; Bork et al., 1992b; Scharf et al., 1994; Casari et al., 1995; Ouzounis et al., 1995a; Gaasterland & Sensen, 1996). Unstructured Data

5 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Semi- Structured Data REMARK 8 HET GROUP TRIVIAL NAME: FLAVIN ADENINE DINUCLEOTIDE (FAD) 1FNB 79 REMARK 8 CAS REGISTRY NUMBER: FNB 80 REMARK 8 SEQUENCE NUMBER: 315 1FNB 81 REMARK 8 NUMBER OF ATOMS IN GROUP: 53 1FNB 82 REMARK 8 1FNB 83 REMARK 8 HET GROUP TRIVIAL NAME: PHOSPHATE 1FNB 84 REMARK 8 SEQUENCE NUMBER: 316 1FNB 85 REMARK 8 NUMBER OF ATOMS IN GROUP: 5 1FNB 86 REMARK 8 1FNB 87 REMARK 8 HET GROUP TRIVIAL NAME: SULFATE 1FNB 88 REMARK 8 SEQUENCE NUMBER: 317 1FNB 89 REMARK 8 NUMBER OF ATOMS IN GROUP: 5 1FNB 90 REMARK 8 1FNB 91 REMARK 8 HET GROUP TRIVIAL NAME: K2 PT(CN)4 1FNB 92 REMARK 8 CHARGE: 2- ( PT(CN)4 -- ) 1FNB 93 REMARK 8 SEQUENCE NUMBER: PT1 - PT7 1FNB 94 REMARK 8 NUMBER OF ATOMS IN GROUP: 9 1FNB 95 REMARK 8 ADDITIONAL COMMENTS: BINDING SITES USED IN MIR PHASING 1FNB 96 REMARK 8 1FNB 97 REMARK 8 HEAVY ATOM PARAMETERS ARE AS FOLLOWS: 1FNB 98 REMARK 8 PT PT FNB 99 REMARK 8 PT PT FNB 100 REMARK 8 PT PT FNB 101 REMARK 8 PT PT FNB 102 REMARK 8 PT PT FNB 103 REMARK 8 PT PT FNB 104 REMARK 8 PT PT FNB 105 REMARK 8 1FNB 106 REMARK 8 HET GROUP TRIVIAL NAME: URANYL NITRATE (UO2--) 1FNB 107 REMARK 8 EMPIRICAL FORMULA: UO2 (NO3)2 1FNB 108 REMARK 8 CHARGE: 2- 1FNB 109 REMARK 8 SEQUENCE NUMBER: UR1 - UR13 1FNB 110 REMARK 8 NUMBER OF ATOMS IN GROUP: 3 1FNB 111 REMARK 8 ADDITIONAL COMMENTS: BINDING SITES USED IN MIR PHASING 1FNB 112 REMARK 8 1FNB 113 REMARK 8 HEAVY ATOM PARAMETERS ARE AS FOLLOWS: 1FNB 114 REMARK 8 U UR FNB 115

6 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Structured Data did_ fids d2rs51_ d1imr__ d1pyib d1dxtd_ d181l__ d1vmoa_ d2gsq_ d1etb2_ d1guha d1hrc__ d150lc_ d1dmf__ d1l19__ d1yrnc_ d1apld_ d1ndab d2rmai_ fid_ bestrep N_minsp N_scop objname d1flp__ Globin-like d1hdj__ 4 33 Long alpha-hairpin d1ctj__ 9 78 Cytochrome c d1enh__ DNA-binding 3-helical bundle d1dtr_2 1 3 Diphtheria toxin repressor (DtxR) dimeriz d1tns__ 1 2 Mu transposase, DNA-binding domain d2spca_ 1 2 Spectrin repeat unit d1bdd__ 1 4 Immunoglobulin-binding protein A modules d1bal__ 1 5 Peripheral subunit-binding domain of 2-ox d2erl__ 3 5 Protozoan pheromone proteins gid_ TrgStrt TrgStop did HI d193l__ HI d1aba__ HI d1aco_1 HI d1aco_2 HI d1acp__ HI d1adea_ HI d1aky__ HI d1alo_3 HI d1alo_3 HI d1amg_2 HI d1amy_2 HI d1ans__ HI d1ans__ HI d1ans__ HI d1ans__ HI d1ans__

7 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Relational Databases Databases make program data persistent RDB’s turn formless data in a number of structured tables  Ways of joining together tables to give various views of the data

8 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu SQL SIMPLE Language for Building and Querying Tables CREATE a table INSERT values into it SELECT various entries from it (tuples, rows) UPDATE the values Example: How Many Globin Folds are there in E. coli versus Yeast? Structures cx genomes, structures are arranged into folds, names of the folds (e.g. globins) Cor e

9 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu matches table gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aco_2 4.4e-14 HI d1acp__ 1.2e-23 HI d1adea_ 0 HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1amy_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7 create table matches( gid char255, # Genome_ID TrgStrt int, # Start of # Match in Gene TrgStop int, # End of Match # in Gene did char255, # ID Matching # Structure score real # e-value # of Match )

10 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu matches table 2 gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aco_2 4.4e-14 HI d1acp__ 1.2e-23 HI d1adea_ 0 HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1amy_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7 insert into matches (gid, TrgStrt, TrgStop, did, score) values (HI0299, 119, 135, d193l__, 3.1)

11 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu structures table create table structures( did char255, # ID Matching # Structure fid char255, # ID of fold that # structure has ) did_ fid d2rs51_ d1imr__ d1pyib d1dxtd_ d181l__ d1vmoa_ d2gsq_ d1etb2_ d1guha d1hrc__ d150lc_ d1dmf__ d1l19__ d1yrnc_ d1apld_ d1ndab d2rmai_ K domain structure IDs (did) vs. 300 fold IDs (fid)

12 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu folds table create table folds( fid char255, # fold ID bestrep char255, N_hlx int, N_beta int, # number of helices & sheets name char255 # name of fold ) fid_ bestrep N_hlx N_beta name d1flp__ 8 0 Globin-like d1hdj__ 4 0 Long alpha-hairpin d1ctj__ 9 0 Cytochrome c d1enh__ 2 0 DNA-binding 3-helical bundle d1dtr_2 1 3 Diphtheria toxin repressor (DtxR) dimeriz d1tns__ 1 2 Mu transposase, DNA-binding domain d2spca_ 0 2 Spectrin repeat unit d1bdd__ 0 4 Immunoglobulin-binding protein A modules d1bal__ 0 5 Peripheral subunit-binding domain of 2-ox d2erl__ 3 5 Protozoan pheromone proteins

13 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu The “problem” databased in the example here: Matching structures to a genome

14 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Table Interpretation Match Table: Ways Structures A, B, and C can match HI Genome Structures have a limited number of folds, which have various characteristics

15 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Structure of a Table Row  Entity, Tuple, Instance Column  Field  Attribute of an Entity  dimension Key  Certain Attributes (or combination of attributes) can uniquely identify an object, these are keys NULL  Variant Records Cor e

16 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu What is a Key? table matches(gid, TrgStrt, TrgStop, did, score) table structures(did, fid) table folds(fid, bestrep, N_hlx, N_beta, name) gid -> many matches gid,TrgStrt -> unique match (one tuple) thus, primary key gid,TrgStrt gid,TrgStop -> unique match as well fid -> many did’s, but did -> one fid thus, primary key did one-to-one between fid and name >many many->1 Cor e

17 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu SQL Select on a Single Table Select {columns} from {a table} where {row-selection is true} projection of a selection Sort result on a attribute

18 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu SQL Select on a Single Table, Example Select * from matches where gid= HI0016 HI d1dar_2 2e-07 HI d1dar_1 8.5e-06 HI d1dar_ Select * from matches where gid= HI0016 and TrgStrt=179 HI d1dar_1 8.5e-06 gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1dar_2 2e-07 HI d1dar_1 8.5e-06 HI d1dar_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7

19 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu SQL Select on a Single Table, Example 2 Select did from matches where score < d1aky__, d1dar_2, d1dar_1 HI d1aky__ 7.6e-36 I d1dar_2 2e-07 HI d1dar_1 8.5e-06 gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1dar_2 2e-07 HI d1dar_1 8.5e-06 HI d1dar_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7

20 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Joins gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aco_2 4.4e-14 HI d1acp__ 1.2e-23 HI d1adea_ 0 HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1amy_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7 did_ fid d2rs51_ d1imr__ d1pyib d1dxtd_ d181l__ d1vmoa_ d2gsq_ d1etb2_ d1guha d1hrc__ d150lc_ d1dmf__ d1l19__ d1yrnc_ d1ans__ d2rmai_ fid_ bestrep N_hlx N_beta name d1flp__ 8 0 Globin-like d1hdj__ 4 0 Long alpha-hairpin d1ctj__ 9 0 Cytochrome c d1enh__ 2 0 DNA-binding 3-helical bundle d1dtr_2 1 3 Diphtheria toxin repressor (DtxR) dimeriz d1tns__ 1 2 Mu transposase, DNA-binding domain d2spca_ 0 2 Spectrin repeat unit d1bdd__ 0 4 Immunoglobulin-binding protein A modules d1qkt__ 4 3 Neurotoxin III (ATX III) d2erl__ 3 5 Protozoan pheromone proteins Matches Folds Structures Foreign Key Cor e

21 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu SQL Select on Multiple Tables Select * from matches, structures, folds where matches.gid = HI0361 and matches.did=structures.did and structures.fid = folds.fid Returns matches | structures | folds HI0361,285,295,d1ans__,8.2 | d1ans__, | ,d1qkt__,4, 3,Neurotoxin III... Select score,name from matches, structures, folds where gid = HI0361and matches.did=structures.did and structures.fid = folds.fid 8.2, Neurotoxin III...

22 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aco_2 4.4e-14 HI d1acp__ 1.2e-23 HI d1adea_ 0 HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1amy_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7 did_ fid d2rs51_ d1imr__ d1pyib d1dxtd_ d181l__ d1vmoa_ d2gsq_ d1etb2_ d1guha d1hrc__ d150lc_ d1dmf__ d1l19__ d1yrnc_ d1ans__ d2rmai_ Foreign Key matches.did is a (foreign) key in the structures table -- i.e. looks up exactly one structure. matches structures

23 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Selection as Array Lookup Same for a fold identifier from a structure id  $fid=$structure{$did}  (perl pseudo-code) Same for matches and folds tables, but this time arrays return multiple values and have multiple field keys  ($bestrep, $N_hlx, $N_beta, $name) = $folds{$fid}  ($TrgStop,$did,$score)=$match{$gid,$TrgStrt} Joining as a double-lookup  $did = 1mbd__ ($bestrep, $N_hlx, $N_beta, $name) = $folds{ $structures{$did} }  Select bestrep,N_hlx,N_beta,name from structures, folds where structures.fid = folds.fid and structures.did = 1mbd__

24 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Joins gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aco_2 4.4e-14 HI d1acp__ 1.2e-23 HI d1adea_ 0 HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1amy_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7 did_ fid d2rs51_ d1imr__ d1pyib d1dxtd_ d181l__ d1vmoa_ d2gsq_ d1etb2_ d1guha d1hrc__ d150lc_ d1dmf__ d1l19__ d1yrnc_ d1ans__ d2rmai_ fid_ bestrep N_hlx N_beta name d1flp__ 8 0 Globin-like d1hdj__ 4 0 Long alpha-hairpin d1ctj__ 9 0 Cytochrome c d1enh__ 2 0 DNA-binding 3-helical bundle d1dtr_2 1 3 Diphtheria toxin repressor (DtxR) dimeriz d1tns__ 1 2 Mu transposase, DNA-binding domain d2spca_ 0 2 Spectrin repeat unit d1bdd__ 0 4 Immunoglobulin-binding protein A modules d1qkt__ 4 3 Neurotoxin III (ATX III) d2erl__ 3 5 Protozoan pheromone proteins Extra

25 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Join Gives Unnormalized Table gid_ TrgStrt TrgStop did score fid N_hlx N_beta name HI d193l__ Spectrin repeat unit HI d1aba__ Mu transposase, DNA-binding domain HI d1aco_ Globin-like HI d1aco_2 4.4e Globin-like HI d1acp__ 1.2e Globin-like HI d1adea_ Spectrin repeat unit HI d1aky__ 7.6e Globin-like HI d1alo_ Neurotoxin III (ATX III) HI d1alo_ Mu transposase, DNA-binding domain HI d1amg_ Diphtheria toxin repressor (DtxR) HI d1amy_ Immunoglobulin-binding protein A HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) Joining Two or More Tables with a Select Query Gives a New, “Bigger” Table Cor e

26 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Normalization gid_ TrgStrt TrgStop did score fid N_hlx N_beta name HI d193l__ Spectrin repeat unit HI d1aba__ Mu transposase, DNA-binding domain HI d1aco_ Globin-like HI d1aco_2 4.4e Globin-like HI d1acp__ 1.2e Globin-like HI d1adea_ Spectrin repeat unit HI d1aky__ 7.6e Globin-like HI d1alo_ Neurotoxin III (ATX III) HI d1alo_ Mu transposase, DNA-binding domain HI d1amg_ Diphtheria toxin repressor (DtxR) HI d1amy_ Immunoglobulin-binding protein A HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) HI d1ans__ Neurotoxin III (ATX III) What if Want to update Fold to be “Neurotoxin IV”?  Many Updates So Good if Previously Normalized into Separate Tables  Eliminate Redundancy  Allow Consistent Updating Cor e

27 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Normalization Example Name City Area-Code Phone-Number Charles NY Mark SF Jane NY Jeff SF Jack Boston Name City Phone-Number Charles NY Mark SF Jane NY Jeff SF Jack Boston City Area-Code NY 212 SF 415 Boston 617 Un-normalizedNormalized Cor e

28 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Normalized Tables gid_ TrgStrt TrgStop did score HI d193l__ 3.1 HI d1aba__ HI d1aco_ HI d1aco_2 4.4e-14 HI d1acp__ 1.2e-23 HI d1adea_ 0 HI d1aky__ 7.6e-36 HI d1alo_3 1.1 HI d1alo_3 1.8 HI d1amg_ HI d1amy_ HI d1ans__ 1.8 HI d1ans__ 3.3 HI d1ans__ 6.4 HI d1ans__ 8.2 HI d1ans__ 9.7 did_ fid d2rs51_ d1imr__ d1pyib d1dxtd_ d181l__ d1vmoa_ d2gsq_ d1etb2_ d1guha d1hrc__ d150lc_ d1dmf__ d1l19__ d1yrnc_ d1ans__ d2rmai_ fid_ bestrep N_hlx N_beta name d1flp__ 8 0 Globin-like d1hdj__ 4 0 Long alpha-hairpin d1ctj__ 9 0 Cytochrome c d1enh__ 2 0 DNA-binding 3-helical bundle d1dtr_2 1 3 Diphtheria toxin repressor (DtxR) dimeriz d1tns__ 1 2 Mu transposase, DNA-binding domain d2spca_ 0 2 Spectrin repeat unit d1bdd__ 0 4 Immunoglobulin-binding protein A modules d1qkt__ 4 3 Neurotoxin III (ATX III) d2erl__ 3 5 Protozoan pheromone proteins Theory of Normaliz- ation

29 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Query Optimization Get at the Data Quickly!! Indexes Hash Function Reproduce the Effect of Indexes  Rapidly Associate a Bucket with Each Key Joining 10 tables, which to do first?  Joining is slow so store some tables in unnormalized form oSpeed vs Memory

30 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Indexes Speed Access No Index One Index Double Index

31 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Object Databases C, fortran vs. C++ Extra

32 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Forms & reports [user views] Reports are the result of running a succession of selects queries on a database, joining together a number of tables, and then pasting the results together Forms are the same but they are editable Forms and Reports represent particular views of the data  For instance, one can be keyed on gene id listing all the structures matching a gene and the other could be keyed on structure id listing all the gene matching a given structure Extra

33 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Aspects of Forms: Transactions and Security Transactions  Genome Centers and United Airlines!  Log each entry and enable UNDO Security  Only certain users can modify certain fields

34 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Complex Data Example: Encoding Trees in RDBs NodeName 1Organism 2Bacteria 3Archea 4Eukarya 5Metazoa 6Plants NodeParent

35 (c) Mark Gerstein, 1999, Yale, bioinfo.mbb.yale.edu Middle of class 2005,04.11 (Bioinfo-9)