Thread: Database type to be accessed by Javascript

  1. #1
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404

    Database type to be accessed by Javascript

    At my job, I recently acquired the responsibility of maintaining quite a few webpages on the local intranet website. This website has no scripting languages other than vbscript and javascript supported. This leaves me pretty limited on the type of databases to use because in the past I mostly did a lot of SQL work.

    Currently, I'm kind of writing hacky javascript to read xml files. I've read places on the internet that using databases like SQL can be bad practice and unsafe.

    Does anyone have any suggestions for the type of database I should be looking into using. I'm willing to learn anything, but my tools are rather limited.

    Thanks

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by carrotcake1029 View Post
    Currently, I'm kind of writing hacky javascript to read xml files. I've read places on the internet that using databases like SQL can be bad practice and unsafe.
    I guess it would really depend on what your databasing, but why would SQL be bad? It's generic, and very proven, whereas XML wasn't even made for databasing.

    Now, you mentioned you have no other scripting languages at your disposal, but how server side languages? Pretty much any server side language will get the job done, safer, cleaner, and easier, than trying to database with JS!

  3. #3
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    I would love to use php or perl, but I don't have any server side languages available to me. I know for a fact too that I wouldn't be able to get them installed either because it took weeks just for me to get clearance to the FTP server.

    I just want to pick something and stick with it. I'll be working on website related projects for a few months and want to at least somewhat standardize all of my work. The reason I chose XML is because you can open it in software like Excel and do modifications. These aren't huge databases, but I just don't know the route I want to take. If SQL is still somewhat standard to access from SQL, I'll definitely give it a shot. I just don't know what to use because I've never been in a situation like this.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by carrotcake1029 View Post
    Currently, I'm kind of writing hacky javascript to read xml files. I've read places on the internet that using databases like SQL can be bad practice and unsafe.
    Places which use databases like SQL Server to support their data services... So, whoever told you that using a database is unsafe and a bad practice is simply someone you want to make sure of not listening to ever again.

    Also, without access to server-side scripting all your requests will run on the client. I cannot fathom anything more dangerous than maintaining data on the server side exclusively through client-side scripting... Anyways, you say your webserver currently supports vbscript and javascript. This means it supports server-side scripting through the old ASP interface. You are good to go to start coding server-side scripting, even if you can't convince them to adopt a more modern solution like installing PHP on the server (which IIS has been supporting for a while) or .Net.
    Last edited by Mario F.; 05-25-2011 at 04:45 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User gardhr's Avatar
    Join Date
    Apr 2011
    Posts
    151
    Quote Originally Posted by carrotcake1029 View Post
    At my job, I recently acquired the responsibility of maintaining quite a few webpages on the local intranet website. This website has no scripting languages other than vbscript and javascript supported. This leaves me pretty limited on the type of databases to use because in the past I mostly did a lot of SQL work.

    Currently, I'm kind of writing hacky javascript to read xml files. I've read places on the internet that using databases like SQL can be bad practice and unsafe.

    Does anyone have any suggestions for the type of database I should be looking into using. I'm willing to learn anything, but my tools are rather limited.

    Thanks
    Yes, but client-side code will expose the internals of the database (including password!) to the user. Play it safe and use server scripts...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's the best way to parse XML Schema with C# Language.
    By userpingz in forum C# Programming
    Replies: 2
    Last Post: 11-13-2009, 07:25 AM
  2. Replies: 2
    Last Post: 03-10-2009, 08:36 PM
  3. class schema implementation doubt
    By newbie007 in forum C++ Programming
    Replies: 1
    Last Post: 06-15-2008, 04:42 PM
  4. How can an api be accessed through other languages
    By Shadow12345 in forum Windows Programming
    Replies: 6
    Last Post: 10-21-2002, 07:01 PM
  5. Anyone good at XML Schema?
    By Waldo2k2 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 05-30-2002, 10:05 AM