hello.

i want to have a database in which i can have data of proteins and their structures .I'm New to php and have a biological background i studies . so can any one help me step by step that how can i build the database.

regards
Stefano
sa_kushi@gmail.com

If you are not from IT background start learning database with MS access. php/mysql will be difficult to start with for you.

no i know ms access.. but i have knowledge of MY sql but i'm not profiecient in php and i have to make a database for proteins interaction so the amount of data is large and it would be better to have PHP and mysql

Member Avatar for rajarajan2017

Do you installed and configured php in your system? if not find the xampp in google and download the free open source software. It will installed everything (PHP, MYSQL & Apache) in your system. so that you can test your database from your localhost(local system)

Member Avatar for diafol

OK, Google XAMPP and download and install this. In addition Google SQLyog and download and install the community version of this. The SQLyog program is a GUI or 'front-end' so that you can manipulate data, like create and edit tables and their data without too much hassle - a *bit* like Access.

You have a choice as to what you have to do. You can build one huge table - as long as there is no duplicate data. However, if there is duplicate data in any field (e.g. monomeric, dimeric, tetrameric etc), you should create a 'relational' model. The relational model just isolates data and stops replication (and incorrect replication!).

So for example:

Proteins table
==============
id (Primary Key, integer, length = 4 (which is equivalent to 9999 consecutive entries))
trivial_name (varchar, length = 50 (decide on the appropriate max number of characters)
unit_id (a Foreign Key field on the Units table; tinyint, length = 3)
...other fields...

Units table
===========
unit_id (Primary Key, tinyint, length = 2)
unitname (varchar, length = 30)
no_units (tinyint, length = 2)


So you end up storing the 'units' data in its own table. The only units data that appears in the main table is the id (number).

e.g.
1 | haemoglobin | 6 ... (just unit id included - could be any value)

instead of

1 | haemoglobin | tetrameric | 4 ... (unit name and no. of units entered)


You need to ensure you have the right data structure and data types. For example, if you're storing protein sequences, you may go over the 256 character limit of varchar types. Data entered will be truncated. You then need to use one of the text types.

You need to ensure you have the right data structure and data types. For example, if you're storing protein sequences, you may go over the 256 character limit of varchar types. Data entered will be truncated. You then need to use one of the text types.

This is no longer true as of mysql 5.0.3

"Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used."
http://dev.mysql.com/doc/refman/5.0/en/char.html

Looking at some basics on how proteins are diagrammed, I can't even begin to think this is possible without a relational structure.

@stefano
Can you elaborate into some more detail on how you think this would best be accomplished in a database? I'm not an expert or even a novice by any means on proteins but after a quick google search it looks like to describe a protein structure you'd need to able to relate data in a 3 dimensional space?

Member Avatar for diafol

@MS - thanks for that. Still getting truncated with my localhost. Perhaps about time to upgrade the ol' dinosaur, eh?

@OP
JOY

I used to mess around with membrane G-transduction proteins and the odd ion channel during my postgrad work (many moons ago!) and came across a plethora of ways to represent 1-4 protein structure. I'm sure you're familiar with JOY, but is there a better system? Have been out of the field for 20 years.

If you're using 3D representations or web-compliant animations, you can store the url of these files in with your db records.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.