database

How can I implement this functionality into SOLR?

I have a classifieds website, and users may for example search for cars. When searching for a car, there are a number of endings in their names as you all probably know. For example lets say Bmw 330ci (ending beeing 'ci'), but there is also Bmw 330i, or Bmw 330di etc etc. How can I make SOLR "understand" this, so if users search for 33...

Best way to store emails for historical/review purposes

I have a service which process emails in a mailbox and once processed, stores some information from the email in the database. At the minute the schema looks something like: ID Sender Subject Body (result of being parsed/stripped to plain text) DateReceived I am building a web front-end for the database and the main purpose of storin...

Tweaking my search functionality

I have tested search functionality i have implemented on a live website. I came across some small issues. I can't put special characters in the search box or my application will crash. I tried to solve this using some replaces on the characters it crashes on, but this won't cure the pain. When i entered this sign: * into the searchbox it...

T-SQL : How to count empty tables in database?

Hi, is any way to count tables with no rows in my database with t-sql on sql server 08? Thanks ...

Consolidating NHibernate open sessions to the DB (coupling NHibernate and DB sessions)

Hi. We use NHibernate for ORM, and at the initialization phase of our program we need to load many instances of some class T from the DB. In our application, the following code, which extracts all these instances, takes forever: public IList<T> GetAllWithoutTransaction() { using (ISession session = GetSession()) { ILis...

What is a columnar database?

I have been working with warehousing for a while now. I am intrigued by Columnar Databases and the speed that they have to offer for data retrievals. I have multi-part question: How do Columnar Databases work? How do they differ from relational databases? Is there a trial version of a columnar database I can install to play around?...

SQL Server Database analysis using T-SQL

I have a small application which has around 38 tables in the Database (SQL Server 2000/2005). Now i would like to know how much data (in KB's/MB's not records) they are taking using T-SQL. Saying in better way i would like to do analysis of entire database. Is that possible? How ? Thanks All, ...

Storing a value in a datetime field using a unique number

Hi, I have the following scenario and would be grateful for any advice how to resolve this issue. We have a database application which contains a field which is a DateTime field. We have never used this field in the past but now after a few 100 installs we need to use this field but have found that it is should not have been a DateTime...

Access MongoDB directly via JavaScript

Hi, is there any possibility to access and retrieve data from MongoDB directly over JavaScript form browser without backend processing? ...

Copy Database Data from Many DBs to One. Data Replication (sort of)

Hi all. This involves data replication, kind of: We have many sites with SQL Express installed, there is an 'audit' database on each site that has one table in 1st normal form (to make life simple :) Now I need to get this table from each site, and copy the contents (say, with a Date Time Value > 1/1/200 00:00, but this will change o...

DB : Circular dependency in the database

EDIT: This is a duplicate I didn't find it at first. I am building a web-site for user-groups event management. Members : Name, Id Events : DateTime, Topic, OrganizerId (from FK to Members table) EventRegistrations : MemberId (FK), EventId (FK) Description (redundant) : A member can create and event, and becomes this event's or...

What value does a database use to represent NULL on disk?

When a database system writes a record to a page on disk, and one of the fields in that record is null, what value is used to represent that 'null' such that when the record is read back in, it knows that the field is 'null.' Perhaps it is dependent on the data-type of that field? ...

Relational databse, photos, votes and warnings

Hi, I'm designing a relational database, but I'm not too much experienced, so I'd like to ask a suggestion about the relational tables with photos. I thought to use a table to store photos, and one or more tables for user data and subject links, so the photos can be linked to different subjects, for example to houses, or trees, in this ...

How to execute a custom command against a typed dataset

I want to execute a custom command against a typed dataset I created using the dataset designer. For this I need to get a reference to the underlying connection, right? How to go about this? In which autogenerated file can I find the connection? ...

Random-access container that does not fit in memory?

I have an array of objects (say, images), which is too large to fit into memory (e.g. 40GB). But my code needs to be able to randomly access these objects at runtime. What is the best way to do this? From my code's point of view, it shouldn't matter, of course, if some of the data is on disk or temporarily stored in memory; it should ...

Visual Studio 2008 doesn't connect to SQL Server 2008

When I try to make a new data connection from a Visual Studio 2008 to a database on SQL Server 2008, it fails. It says, it supports SQL Server connections up to SQL Server 2005 version only. What is missing in my installation? Or where are settings I should change? ...

How to Add a command/SQL statement to a strongly typed TableAdapter's Update/Insert command?

See this question. I have the following code that executes against a SQLIte database using a strongly typed dataset. messagesAdapter.Update(messages);//messages is a DataTable var connection = messagesAdapter.Connection; var retrieveIndexCommand= connection.CreateCommand(); retrieveIndexCommand.CommandTex...

SQL Query Source Code

Hi all, I have 3 tables. One table has all the people, [Pat], each with a unique [PatId]. The second table has all the insurance company information, [Ins], each with a unique [InsId]. The third table has the patient insurance info, [PatIns]. In the [PatIns] table, some patients (also [PatId]) have secondary or 3rd insurance and it deno...

Using LOAD DATA INFILE with arabic data

I am trying to import a .csv file into a table. I have figured out how to get the data inserted by using the following query: LOAD DATA INFILE 'examplesofdata.csv' INTO TABLE coins FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' IGNORE 1 LINES; However for several of my fields I have Arabic content which gets entered as a s...

Database design, two types of users for website

I'm making a review type website, and I would like for there to be 2 types of users. One would be the majority, reviewers while the other would be the person the review is about. How, in terms of database design would I differentiate the two. Should I have separate tables for reviewers and reviewies or simply assign a different range ...