473,383 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

which is better? varchar, file, BLOB

Hi
I have a page in which users send messages to each other (something like orkut)
and I have to store the messages.

What will be a good way to store these messages.

I thought of 3 options

First, I can just store the messages in mysql database creating a column for messages like
Expand|Select|Wrap|Line Numbers
  1. message varchar (200)
but doing so limits the length of the message to 200.

Second, I can store the messages in a file for each user.
Is there something in PHP like lseek in C ?

Third, I am not sure how to handle BLOB, but I read somewhere it is used to store binary data of large size, so will it be possible to do that for the messages?

I am not sure what the professionals use

Can I get any standard codes for these type of operations ?

Thanks
Dec 28 '07 #1
2 1062
Markus
6,050 Expert 4TB
Why not just increase the amount of characters allowed in the cell?
[php]
message varchar(1000)
[/php]

Using a database, to me, is the most appropriate way to do things.
Keeps everything tody and manageable.

:)
Dec 28 '07 #2
Hi

Thanks for your suggestion.
I thought of doing that, but won't that waste much space.
Say, a message is just 10 characters long, then won't it occupy whole 1000 bytes in the disk?

Thanks again
Dec 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: John | last post by:
I have over 5000 thumbnail pictures of size 5kb each. I would like to able to load all 5000 pictures and view 50 per page using mysql_data_seek(). I would like to know what are the advantages and...
8
by: Randell D. | last post by:
Folks, I once read an article in Linux Format whereby a technical writer had made performance recommendations on a LAMP environment. One of the points raised was for small columns in a database,...
5
by: rAinDeEr | last post by:
Hi, I have a web application with a table to store terms and conditions of a Company. This may some times run into many pages and some times it may be just a few sentences. It is a character...
2
by: ROBUENO | last post by:
I NEED A WAY TO CONVERTER IN THE BASE DB2 DATAS TYPE (BLOB) INTO (VARCHAR/LONG VARCHAR) TO STORE IN A VIEW. I WORK WITH THE REPORT GENERATOR CRYSTAL REPORT AND INSIDE OF THE TOOL ENVIRONMENT I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.