|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Other - Theoretically...
I'm considering adding a login screen to my website; mainly for storing users' personal information, as the base of regular users is growing: I don't want to use a gargantuan db like MySQL or PostgreSQL; I'd prefer to not even use PHP at all.
I'm familiar with reading XML docs using JS; Could I hold all of my users in an XML database? I can write to it with PHP; That's not a problem, I just don't want to use PHP as a go-between for MySQL and javascript. PS: Can I write to XML using JS? |
|
#2
|
||||
|
||||
|
storing member information
If you want to store member information in XML files it can be done. But IMHO the stress to your server resources will be greater than if you use a database. Using XML as a database is not efficient as using a database as a database.
I have no experience using PostgreSQL, but MySQL is not a "gargantuan" database. In fact, a common criticism of it is that it is not large enough to be suitable for "enterprise" use. You don't have to use PHP either. But you will need to use a server-side language (Perl CGI, NET, JSP, CFML, etc) because javascript is a client-side language and works on the user's computer not your server. Javascript is excellent for progressive enhancement. eg. pre-submit form validation. And you can write some helpful scripts for doing things on your own machine to work with your OS. But if you want to save yourself (and your server) from unnecessary work and problems using PHP and MySQL is the way to go.
__________________
WP plugins - Error Reporting, Clean Options http://www.mittineague.com/dev/er.php http://www.mittineague.com/dev/co.php |
|
#3
|
|||
|
|||
|
Thanks for your opinion, If I have to use a server-side language anyway I might as well go with PHP, since that's what I'm familiar with. Also, my reference to MySQL as gargantuan may have been out of place, but my point was really that I didn't feel that I needed to use it, and that I would rather use something smaller, which I found; I'm now running PHP/SQLite; My wish to use XML is mainly that I don't know how to hold large amounts of data (Like a paragraph for user information) on a mysql db. Isn't there a character limit?
|
|
#4
|
||||
|
||||
|
field size limits
Yes, MySQL does have field size limits, http://dev.mysql.com/doc/refman/5.0/en/char.html
"Text" types Quote:
This page has somewhat confusing math equations http://dev.mysql.com/doc/refman/5.0...quirements.html But most notably for your concern is Quote:
So if the fields will contain more than 21K characters you may have problems. Last edited by Mittineague : February 12th, 2008 at 12:52 PM. Reason: typo |
|
#5
|
|||
|
|||
|
Thank you very much. I may switch back to MySQL with my newfound information, but i'm worried about the ammount of space that large user info varbinary or varchar fields would take up; would, if i were to do straight echos of the varchar fields, would it wordwrap? Should i read through the fields beforehand and add newlines? Why am i still on the javascript forums and not moving over to php?
|
|
#6
|
||||
|
||||
|
field length
The "var" in varchar stands for variable. The field won't take any more size than necessary to hold the characters (and a few bytes to indicate it's size).
Regarding newlines, AFAIK they have to be entered into the field in the content, either as br tags or \n, otherwise the newline is just whitespace. Quote:
Yes, the PHP, or Database forums may get you more responses. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Other - Theoretically... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|