database

how to tell in which column the search string was found?

is it possible to tell in which column the search string was found, without having to do it with ifs? if <searchstring> in column1 -- do some stuff here else if <searchstring> in column2 ... ... i won't post the exact query, as it is too cryptical and too long, but here's a query which does basically the same select title...

How to store objects data into database from OOP application efficiently and easily?

Hello I design an objected oriented application using C# with database back end, for some time I was building same application using procedural way in which I feel storing data to database is little bit easier using simple SQL statement. I my application I want to store the objects attribute to database, for example for an item object ...

sql boolean datatype alternatives

What are the situations when you would use a foreign key to a separate table rather than use a boolean (i.e. BIT in SQL Server) For example would you replace the following two booleans in this table: engine_sensors -------------- id (int, primary key) name (varchar(50)) fault_code (int) display_warning (boolean) /* if fault show driver...

Entity framework: Using transaction scope and querying

Hi, I'm using entity framework with oracle DB. I tried to use transaction scope (because I want the option to rollback): using (TransactionScope ts = new TransactionScope()) { ..... } The problem is that when I'm trying to query inside the using statement, an exception is thrown: "Unable to load DLL 'oramts.dll': The specified...

Oracle Text - Index a BLOB Field (which contains PDF data)

Hi all, Do any of you have any experience with using Oracle Text to search for content inside PDF files? I have a table, with a field called FILEDATA(blob). I would like to do the following query: SELECT id FROM ttc.contract_attachment WHERE CONTAINS(filedata, 'EXAMPLE') > 0; However, i'm not too sure about the type of index to add...

android with sqlite

can anybody give example how to connect sqlite with android? Thanks in advance ...

Looking for FTP Server Java library

I'm looking for Java FTP Server library, which lets to replace DAL with lets say a DB data. So far, i saw that in Apache FtpServer there is an option to intercept some of the commands using FTPLet container, however it is missing the most important command such as LIST. ...

How to automatically deploy Visual Studio database project after build

I'm trying to automate the build process of a database project so that it would automatically be deployed to a database server against which I could run database unit tests. I'm really new to developing databases with VS so this might be obvious, but I can't find a way to make the project be automatically deployed after it is built. I us...

Named user plus, what is this?

I was looking at oracle liecense, it looks cheap for named user plus. I mean if I develop a web application in which user has no interaction with database other than registering and logging in and if I make a virtual user inside server to do all these things that is get user name and password from users ect. keep them in queue and execut...

JDBC & Deadlock avoidance question (Basic)

I'm using JDBC (through Spring's JDBCTemplate) to access a small number of tables in a database. Although I haven't had anything happen yet, I'm concerned about the possibility of deadlock. I was under the impression there was a way to specify a lock order for queries that access multiple tables for deadlock avoidance, but I don't know...

SQLite Complex Query Help

Hi, I have a very complex query going on in SQLite, and I need a bit of help understanding how to do it. The following example is of my Database: Category: CatID | CatTitle ---------------- 1 | XYZ 2 | Sample Content: ItemID | ItemCatID | ItemText | ItemText2 | ItemText3 | ItemText4 -----------------------------------------...

Data Protection Manager Performance Impact

Has anyone study the performance impact (positive or negative) of using Data Protection Manager as a backup and recovery tool for SQL Server? ...

How to deal with inserting values into two tables when exception occurs.

Hi, I have 2 tables loginInfo and UserInfo. LoginInfo Stores username and passwords while userinfo stores other user details such as Address,postalcode,phone etc. I insert values into loginInfo first and if successful I enter the userInfo details. If exception occurs while entering details into userInfo i delete the loginInfo details....

Writing file line to Django model field

I can't seem to write a line from a file to a field of a Django model. The field is described in the model as: text = models.TextField(null=True, blank=True, help_text='A status message.') However, when I attempt to create a new object I cannot fill this field using the readline function: file = open(filename, 'r') str = file.readli...

Handling storage of billions of pieces of information?

What is the best solution if I need to have a database with a billion+ objects and I need to have immediate (or nearly immediate) access to any of the items in the database at any time. This database would be queried at about 1000 requests per second. The rows in the database are pretty much unrelated and thus doesn't need to be relatio...

Creating database views with NHibernate

Does any one know how to create a view from hibernate with the results of a criteria query? We've got some legacy parts of our application that use views generated by the app for data retrieval and I like to tie the new NHibernate stuff into those for minimal friction. I'd turn it into an extension method so I could eventually do stuff...

Oraganize Pictures on the website

I am designing a website which will involve too many photos. There are two modules Restaurants and Dishes. which is the best way to create the directory strcuture ? images/Restaurants/ID images/Dishes/ID am using the following to create the filename function imgName($imgExtension) { return time() . substr(md5(microtime()), 0,...

Rails migration issue - foreign key not getting created

So I have the following migration - typical ratings table which captures ratings(value) for comments. I have some helper methods for primary-key(pk), foreign-key(fk), index(index) which is all fine. So everything runs fine, but what i notice is that the foregn key on comment_id does not get created, even though this statement is not rep...

What sort of Database system should I use?

I'm planning to write an address book that stored contact information. Each contact could have an unlimited number of fields. Mostly strings and integers. But perhaps references to other Objects. What are the advantages and disadvantages of using an RDBMS with ORM vs OODBMS vs Document DBMS (like CouchDB). Thanks. ...

Rails - escaping SQL params

I am doing some plain SQLs in my rails model (for purists this is just for complex SQLs :) Since I am not using find*/condition methods, is there a helper method that I can use straight to do that? ...