Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Space Needed For Database
khalilov
post Jul 21 2008, 12:25 PM
Post #1


Member - Active Contributor
Group Icon

Group: [HOSTED]
Posts: 80
Joined: 17-July 08
Member No.: 31,503



Iam assuming the information in the databases i will create will be stored in the 500 MB space i get, but since 500MB isn't enough iam wondering if you guys can tell me how much bytes the following take: Varchar(x),Tinyint,Text,date,smallint,mediumint,bigint,float.... And the rest present when you add/edit a row in a table.

Also what are the ranges of tinyint,smallint,mediumint and big int
Go to the top of the page
 
+Quote Post
faulty.lee
post Jul 21 2008, 05:46 PM
Post #2


Premium Member
Group Icon

Group: [HOSTED]
Posts: 495
Joined: 5-November 06
Member No.: 17,016



QUOTE(khalilov @ Jul 21 2008, 08:25 PM) *
Iam assuming the information in the databases i will create will be stored in the 500 MB space i get, but since 500MB isn't enough iam wondering if you guys can tell me how much bytes the following take: Varchar(x),Tinyint,Text,date,smallint,mediumint,bigint,float.... And the rest present when you add/edit a row in a table.

Also what are the ranges of tinyint,smallint,mediumint and big int

You can refer to the MySQL documentation for that matter ->http://dev.mysql.com/doc/refman/5.0/en/sto...quirements.html

I would just show you a simple calculation, and 500MB is plenty of space to put your data.

Let's take a worse case scenario, say you have 20 columns to store your data, and all of them are varchar(255).
255 characters can store quite a lot of things. The sentence above is only 112 characters. So,
20columns x 255+1bytes = 5120bytes = 5kB per row.
5MB of space can give 1000 rows, and 500MB will give you 100'000 rows. That's quite a lot to store. In fact, you normally won't fill up as much in each columns, it could easily give you double or triple of that figure.

If you really need to store that much of data, I would actually recommend you to try paid database service, or paid hosting with database. They normally offer few GB of space for a very affordable annual fee.

Btw, I don't think the space used up by the database is shared with your disk space quota. If not mistaken I read it some where, and I saw the MySQL space allocation is diff compare to my disk space quota. That was few months back, I took a look just now(I seldom go to the cPanel), found that it's much diff now, so that rules might not applies anymore.
Go to the top of the page
 
+Quote Post
Quatrux
post Jul 21 2008, 09:56 PM
Post #3


the Q
Group Icon

Group: [HOSTED]
Posts: 1,049
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059



The given 500 MB for this free hosting is also used for the Databases, you can have ~500 MB of information in your SQL databases, as I remember earlier in older CPanel versions, the stats on left menu bar in CPanel showed how much space currently the Database is using, but I just tried to search for it, it doesn't show that anymore, so I guess phpMyAdmin can show it, if you really need to..
Go to the top of the page
 
+Quote Post
yordan
post Jul 21 2008, 10:37 PM
Post #4


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,035
Joined: 16-August 05
Member No.: 7,896



What will you do with your database ? Will you really have 500.000 rows in your table ?
I think that if your site really has 500k visitors, you can negociate more space from Xisto without any problem.
Go to the top of the page
 
+Quote Post
TavoxPeru
post Jul 22 2008, 01:30 AM
Post #5


Super Member
Group Icon

Group: [HOSTED]
Posts: 760
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579



QUOTE(khalilov @ Jul 21 2008, 07:25 AM) *
Iam assuming the information in the databases i will create will be stored in the 500 MB space i get, but since 500MB isn't enough iam wondering if you guys can tell me how much bytes the following take: Varchar(x),Tinyint,Text,date,smallint,mediumint,bigint,float.... And the rest present when you add/edit a row in a table.

Also what are the ranges of tinyint,smallint,mediumint and big int

The url given by faulty.lee shows in detail all the data type storage requirements, but if you need it quickly here there are:
  • DATE: 3 bytes.
  • FLOAT: 4 bytes.
  • TINYINT: 1 byte.
  • SMALLINT: 2 bytes.
  • BIGINT: 8 bytes.
  • VARCHAR(x): x+1 bytes, usually 0 to 255 bytes.
  • TEXT: Maximum 64Kb.
Take into account that for the VARCHAR(x) and the TEXT data types this value depends if it is a binary string or a non-binary string -for the first one it represents the declared column lenght in bytes and for the second one in characters- and which character set you will use with them, because some character sets are multi-bytes like UTF-8 (up to three bytes per character) or UCS2 (up to two bytes per character).

BTW, i don't think that you can reach the 500MB limit unless you will use your database to store images or binary data like music or video.

Best regards,
Go to the top of the page
 
+Quote Post
khalilov
post Jul 22 2008, 11:49 AM
Post #6


Member - Active Contributor
Group Icon

Group: [HOSTED]
Posts: 80
Joined: 17-July 08
Member No.: 31,503



lol XD

In that case 500 megs will keep me happy for a long time tongue.gif, thx XD

Edit: Is there a limit to how many columns a table can have btw?

This post has been edited by khalilov: Jul 22 2008, 12:34 PM
Go to the top of the page
 
+Quote Post
faulty.lee
post Jul 22 2008, 02:29 PM
Post #7


Premium Member
Group Icon

Group: [HOSTED]
Posts: 495
Joined: 5-November 06
Member No.: 17,016



A quick search in google return this result -> There is a hard limit of 4096 columns per table, but the effective maximum may be less for a given table.

You can read the detail here -> http://dev.mysql.com/doc/refman/5.0/en/col...ount-limit.html

MySQL is is not a really a hobbyist's toys. It's ready for prime time production environment. So, for normal hobbyist requirement, i guess MySQL is much more than enough for layman like us, tongue.gif hehe
Go to the top of the page
 
+Quote Post
yordan
post Jul 22 2008, 05:19 PM
Post #8


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,035
Joined: 16-August 05
Member No.: 7,896



QUOTE(faulty.lee @ Jul 22 2008, 04:29 PM) *
A quick search in google return this result -> There is a hard limit of 4096 columns per table, but the effective maximum may be less for a given table.

The space effectively used depend on the number of rows, not the number of columns in a single row.
Go to the top of the page
 
+Quote Post
Jeigh
post Jul 22 2008, 11:44 PM
Post #9


Whitest Black Mage
Group Icon

Group: [MODERATOR]
Posts: 1,352
Joined: 20-May 05
From: NB, Canada
Member No.: 5,281



Yea it's like yordan said, all you can know from the design of a database table is the maximum and minimum size each entry, or table row, can have. For example if you are storing user information and you know the minimum size of each of 5 columns data types is 10 bytes, and the max is 100 bytes, you would effectively know each row is 50-500 byts of data. That said, the number of columns is only limited by the way in which you use the database so it could, in theory, increase to gigantic proportions regardless if there are 1 or 1000 fields in the table.
Go to the top of the page
 
+Quote Post
Darasen
post Jul 23 2008, 11:29 PM
Post #10


Advanced Member
Group Icon

Group: [HOSTED]
Posts: 152
Joined: 3-April 08
From: Milling about
Member No.: 29,596



The 500 MB offered by Astahost should be more than sufficient. If your database requires more than that chances are that your site is doing well enough to purchase space. If you are even approaching the the column limit on a table the chances are that your data model needs some serious work.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. phpBB Database Transfer(10)
  2. Embedded Database(7)
  3. Need Advice On Creating Online Music Database(6)
  4. Mirror My MySQL Database To Another Mysql Server(4)
  5. The Best Database(48)
  6. Database Program With GUI(14)
  7. MySQL Output Database Question(18)
  8. What Is A Database How Do I Use One?(7)
  9. What Is Maximum Capacity Of Astahost MySQL Database?(11)
  10. Coders Wanted(7)
  11. Is It A Good Practice To Store Image Or Other Binary Files Directly In A Mysql Database(4)
  12. Permission Problem With Mysql Database Creation(8)
  13. Need Info On Database Programming Courses(2)
  14. Database Programming In Vba 6.0(1)
  15. How Many Concurrent Users For Oracle Database?(1)
  1. Database Size?(10)
  2. My Sql Database Help?(3)
  3. Need Help In Database Auto_increment(9)
  4. Connecting To A Remote Database(9)
  5. Database(1)
  6. Integrate Access Database Onto Intranet Site(5)
  7. Accessing Ms Access Database From A Centralized Location?(5)
  8. Mysql Database Management(1)
  9. Mysql Database Entry By Excel Sheets(2)
  10. Database Access On Remote Server W/jsp(0)
  11. Some Useful Database Links.(7)
  12. Best Database(7)
  13. How To Understand A Database Schema(4)


 



- Lo-Fi Version Time is now: 8th October 2008 - 12:20 AM