database

Is there an index on the primary key of a table?

Does having a primary key column mean there is an index on that column? If so, what kind of index is it? ...

album tree deletion

i have following table album_id | sub_album_id | name sdf2342 | 0 | family a2243d | sdf2342 | wife 23ods | sdf2342 | jack 23jskd | 0 | places i want to delete selected album with its all the sub_album and if there is more sub_album then de...

how to parse a lot of PDFs

I have a ton of PDFs I want to be able to parse sentence-by-sentence. Is there a tool for MySQL (or some other database system) for converting PDFs into mysql, and then reading out sentences one at a time? Is there some other tool to do this? I imagined loading all the pdfs into a DB and then reading would be the fastest way but I don't ...

Dropdown select based on database entries

So, I would like a select to auto-populate the dropdown's "Yes" selection, or alternatively, the "No". The returned value from a database query will be used to evaluate which dropdown will be selected. I have thought since it's a true/false auto-population to just write 2 conditionals, but I thought there would be a better (read: less m...

Looking for a framework to access database via AJAX?

I'm looking for an AJAX framework to transact to an Oracle database. Preferably the framework will be open source and to at least some degree RESTful or RPC. Edit(1): I would prefer to deploy in Apache Tomcat. Edit(2): I would also prefer not to implement a "kitchen sink" framework where I'm either implementing only 2% of the framewo...

Android SQLite, ask about ContentValues

Hi, i would like to know if using the class ContentValue in querys is a good practice in order to prevent SQL injection. Thanks ...

For loop only inserts one filename

for($i = 0; $i < $uploadsNeeded; $i++){ $file_name = $_FILES['uploadFile'. $i]['name']; $file_name = stripslashes($file_name); $file_name = str_replace("'","",$file_name); $uploaddir = "media/files/".$_FILES['uploadFile'. $i]['name']; $copy = move_uploaded_file($_FILES['uploadFile'. $i]['tmp_name'], $uploaddir); if($copy){ ...

What locale should I use for case-insensitive queries from Java?

The classic way to query an SQL database case-insensitively from Java is as follows: String name = ...; // get the user's input (case is unknown) String sql = "select * from Person where lower(name) = ?"; Object jdbcBindVariable = name.toLowerCase(); // ... using JDBC, bind that variable and run the SQL query The problem is that lowe...

How to use Redis within a C++ program?

What would be the best way to use a Redis DB within a C++ program? ...

Should a 500 item lookup list be data cached on server?

I have a column of 500 names <30 characters, that are accesses via jquery autocomplete plugin as a drop down list. SHould I data cache this list wich will not change very often, or will i not gain much of a performance benefit? ...

Communicating with Microsoft Dynamics GP Database and Project DataBase

Hi there, I am coding in ASP.NET C#. I have Microsoft Dynamics GP hosted at a server and my database hosted at another server. I would like the GP database take value from some table there and synchronise it with my database. Which is the best alternative? Data transmission Service(DTS)? ...

location of database created by the application

I have opened a database using sqlite3 in my application. When i run the application in the simulator, this database might be created and i'm playing with it. But now i need to know the location (to be accessed from ma mac) where this database is created. Surely it is not in the application folder as i'm not seeing it. I doubt it to be s...

Logging of changed fields/columns in DB updates

Our product ecosystem: Web/Enterprise Application using EJB in Glassfish V3 and PostgreSQL 8.4. How to detect which field was changed without using dirty flags or re-reading the same record(s) before updating it ? Why: For audit purpose/logging Any recipes or ideas ? Thanks Sven ...

Couchdb-like http access from a relational database?

The new security abilities of couchdb mean you can dispense with your middle-ware and access your data directly from your client if you data fits into a key value store. What if your data needs a relational database? Is there a relational db with similar abilities? Should I just tell my db server to listen on port 80? ...

MySQL "ON DELETE CASCADE" is too powerful

hey, following problem here: i have table with persons that have one location, if i delete the location for the location table, i don't wont to lose the assigned persons. ive a entry in the location with the id=1 and the name is: "No location". and that what I'm trying to do, but i fail! ALTER TABLE `persons` ADD CONSTRAINT `persons_i...

MySQL GROUP BY two columns

Hi, I'm trying to group by multiple columns here - one on each table. It's a scenario where I want to find the top portfolio value for each client by adding their current portfolio and cash together but a client may have more than one portfolio, so I need the top portfolio for each client. At the moment, with the code below I'm getting ...

What form should i use making a website

I'm kinda lost and need some help. In the past i have used php and mysql to make websites that are data driven with database. Now i want to use my C# skills to make a site. This new site will be connected to database and have alot of data. Should i use Visual Studio to do a ASP.NET site ? What is this WPF Browser Application thing, doe...

Python database access using single file/already build file

Hi everyone! I have to save some data into MySQL from Python. I have tried MySQLdb, but it needs to be built. Build fails on my Mac; moreover, I need to have one file to copy to server. I don't have access to install anything. Can you recommend me any solution, please! Even where I can find MySQLdb build for specific platforms. Thank...

Access mdb file content from .net when mdb file has password.

I am creating a window application in C# and was thinking of setting up a password on mdb file of MS-Access so that no one can open that file other than my window application or who so ever knows password of that file. I managed to make that file password protected but unfortunately I was not able to access that file through my applica...

Can I import tab-separated files into MySQL without creating database tables first?

As the title says: I've got a bunch of tab-separated text files containing data. I know that if I use 'CREATE TABLE' statements to set up all the tables manually, I can then import them into the waiting tables, using 'load data' or 'mysqlimport'. But is there any way in MySQL to create tables automatically based on the tab files? See...