database

mysql filtering result using left outer join

my query: SELECT content.*, activity_log.content_id FROM content LEFT JOIN activity_log ON content.id = activity_log.content_id AND sess_id = '$sess_id' WHERE activity_log.content_id IS NULL AND visibility = $visibility AND content.reported < ".REPORTED_LIMIT." AND conte...

Best practice to use MS Excel as a database

In office, it is popular to use MS Excel to store data. In most cases, the data is structured, which means it is suitable for a database. I know peole prefer MS Excel for it is easy to change the data structure and data value. So I have an idea to use MS Excel as a database IF people follow a general rule to store data. In other words, b...

Building an application that includes a DB, and need recommendations

I'm going to build a little system for personal use, and I want it to save data to a database. The language is going to be C#, and so I'd like to use this opportunity to get my head around LINQ to SQL. I have some DB experience and I know my SQL, but it was all in school using Access, which is giving me trouble, and so I'd like to use an...

Catch database exception in Kohana

I'm using Kohana 2. I would like to catch a database exception to prevent an error page when no connection to the server can be established. The error displayed is system/libraries/drivers/Database/Mysql.php [61]: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', syste...

Dynamic Typed Table/Model in J2EE?

Hi, Usually with Java EE when we create Model, we define the fields and types of fields through XML or annotation before compilation time. Is there a way to change those in runtime? Or better, is it possible to create a new Model based on the user's input during the runtime? Such that the number of columns and types of fields are dynami...

MySQL Workbench vs phpMyAdmin

I've only used phpMyAdmin but then I stumbled upon MySQL Workbench that looks promising. I wonder if someone has tried it out and could give your thoughts about it compared to phpMyAdmin. Could it replace phpMyAdmin completely? ...

What is a good free ODBC viewer?

At my job I have to work with three different databases. One is a SQL Server 2008, for which I use SQL Server Management Studio, and another is MySQL, for which I use the MySQL tools. The third however is a Cache database that I can only access through a ODBC connection. Currently I use the SLIK software ODBC View tool to access it, b...

mysql database design: thread and reply of a reply?

in my forum i have threads and replies. one thread has multiple replies. but then, a reply can be a reply of an reply (like google wave). because of that a reply has to have a column "reply_id" so it can point to the parent reply. but then, the "top-level" replies (the replies directly under the thread) will have no parent reply. so ho...

Hierarchical Data in MySQL is as fast as XML to retrieve?

i've got a list of all countries -> states -> cities (-> subcities/villages etc) in a XML file and to retrieve for example a state's all cities it's really quick with XML (using xml parser). i wonder, if i put all this information in mysql, is retrieving a state's all cities as fast as with XML? cause XML is designed to store hierarchic...

Unable to connect to mysql database using tomcat6 on ubuntu

I am able to deploy the application on my local system.... connecting to the same remote database... however when I deploy the same war file on the ubuntu server I get the following exception javax.servlet.ServletException: Could not connect to wikipedia database... org.wikipedia.miner.service.WikipediaMinerServlet.init(WikipediaMin...

Good Database with C library?

What is a good database with support for C? I want a database that can persist changes when the program is closing and retrieve them when the user starts up the program. I was thinking maybe like SQLite or Berkeley DB. Some documentation would be great too. I just need a database with a library for C. It will be used locally to store sim...

How to add SQLite (SQLite.NET) to my C# project

I followed the instructions in the documentation: Scenario 1: Version Independent (does not use the Global Assembly Cache) This method allows you to drop any new version of the System.Data.SQLite.DLL into your application's folder and use it without any code modifications or recompiling. Add the following code to yo...

What programming language is used to design google algorithm?

It is known that google has best searching & indexing algorithm. The also have good relevancy. They are also quicker in getting down the latest results. All that's fine. What programming language (c, c++, java, etc...) & database (oracle, MySQL, etc...) they have used in achieving this. Since they have to manipulate with volume of...

How to put large text data (~20mb) into sql cs 3.5 database?

...

A few problems with Delphi involving Mail Merge, SQL + Databases.

My first problem is with mail merge. I have created a a Data File and a table, yet I am not able to fill my table with information from my Data File. The <<>> just seems to be inserted after wherever the cursor is on the page, which is not where the table is. All that is entered into the actual table is a '59'. Therefore I think I either...

How optimize queries with fully qualified names in t-sql?

When I call: select * from Database.dbo.Table where NAME = 'cat' It takes: 200 ms And when I change database to Database in Management Studio and call it without fully qualified name it's much faster: select * from Table where NAME = 'cat' It takes: 17 ms Is there any way to make fully qualified queries faster without changing ...

Classic ASP Site Throwing Date Conversion Error After Moving Servers?

I am moving an old store from a Win2003 IIS6 server to a Win2008 IIS7 server, moved everything across including database. The front end seems to work just fine, but when I login it has to do pull in data based on date ranges and now from no where I am getting this error? The conversion of a varchar data type to a datetime data type resu...

How to get stream to "in-memory" database created via H2DB?

I have to create such a mechanism: Create in-memory (H2DB) database; Create tables and fill them using some data; Get stream to that database; Send that stream via WebDAV or something else; I know everything except that "How to get stream to "in-memory" database created via H2DB"? And some explanations: I can't create file becau...

Import SQL server database using batch

Hello, I need to import a database into a SQL Server instance using a batch script and the database is provided by an sql file. How can I do This? The SQL file was generated by the SQL Server management studio. ...

Why use MySQL over flatfiles?

A friend and I were debating about whether he should use MySQL or a flatfile database for his website's backend. I told him to go with MySQL because it was structured, held records well, and was consistent. He on the other hand said that he would rather go for speed. Reading files is a lot quicker than connecting to MySQL and it made me ...