database

ASP.NET Contact Form - output to email and access database

I am new to ASP.NET, and I am trying to create a contact form which sends an email at submission as well storing the data in a database. I have read numerous tutorials, and I am pretty comfortable with a basic contact form to email setup - but I am having trouble with the database part of it. Please let me know if you have ever done th...

Help with a DB query.

So I have a category table set up. Within this table there is a field called "id", "name","fk_parent_cat_id" (and more). The "fk_parent_cat_id" basically just ties one particular category to a parent category. Ok. That being said, how would I make a query that grabs the information on the category, but ALSO grabs the information on th...

Android: Can listviews dynamically update the UI output when the database it's binded to changes?

I have a database that gets updated by a background thread. Is is possible for the UI ouput(using a listview) to change when a database entry is added/deleted? I've seen examples of using SimpleCursorAdapter and listViewAdapters and I'm not sure which to use and if it would even work. I found an "efficient" listViewAdapter which would w...

update via subquery, what if the subquery returns no rows?

I am using a subquery in an UPDATE: UPDATE tableA SET x,y,z = ( (SELECT x, y, z FROM tableB b WHERE tableA.id = b.id AND (tableA.x != b.x OR tableA.y != b.y OR tableA.z != b.z))) ); My question is, what happens if the subquery returns no rows?...

Session Variables, Hidden Fields and Tables

Ok, would this work? When a user logins a session variable is created. Then using the session variable I am able to put into a hidden field the correct user's ID number. The hidden field is in a form that allows the user to add comments. So from the hidden field the user ID is added to the 'comments' table from the 'users' table? Tha...

A single MySQL query for 'bouncing' table selects

So, say for the sake of simplicity, I have a master table containing two fields - The first is an attribute and the second is the attributes value. If the second field is set to reference a value in another table it is denoted in parenthesis. Example: MASTER_TABLE: Attr_ID | Attr_Val --------+----------- 1 | 23...

Who is using eXist-db ?

I just heard about http://exist-db.org/ on FLOSS weekly. (http://www.twit.tv/floss97) The technology seems interesting. Does anyone else use it in production applications? What are the strengths and weaknesses of this system? ...

sharding a database with hierarchical data structure

I am using MySQL to store my parent-child relation. The data is concentrated in one table and it is really elegant by design. I do not have any problem quering; however the table has grown in size dramatically. I would like to shard or use some techniques to improve the performance of my queries (and joins). How would I do it? Any poin...

Is it correct to write to a database which has 'NLS_CHARACTERSET' and 'NLS_NCHAR_CHARACTERSET' parameter values AL32UTF8 and UTF-8 with UTF-16 code page values?

The value of parameters 'NLS_CHARACTERSET' and 'NLS_NCHAR_CHARACTERSET' is UTF-8 for source database from where i am reading data, and AL32UTF8 and UTF-8 for target database where i am writing data. I am reading data from a text file which has english, european and asian characters, I am using UTF-16 code page to read from source flat fi...

Horizontal Database and Vertical Database

Hello, i am working on social networking site having family tree wit Gedcom compliance. we need to finilize that we should use horizontal database or vertical database structure for User profiles. so, i would like to know if anybody can answer that. when to use horizontal database and when to use verticle database. i found some answers ...

Advantages / Disadvantages of pconnect option in CodeIgniter

One of the parameters in the CodeIgniter database config is the following ['pconnect'] TRUE/FALSE - Whether to use a persistent connection What do you recommend I set this to? Is there a significant performance hit if I set it to FALSE? What potential problems might arise from setting it to TRUE? ...

How to get the value of id(primary key) in previous operation in MySQL

I am using MySQL. I need to insert one row into a table first, then I need to get the id of the inserted row. The code looks somewhat like the following: insert into mytable (column2, column3, column4) values('value2','value3','value4')or die(mysql_error()); Column1 is the primary key and it is auto-increment. So how to ge...

fastest way to query database in java

I have a MSSQL Database, and I have a stored procedure for any possible query, most of them just return a row of data with 3 columns or just execute an INSERT How in java to connect to the DB and execute a stored procedure, and retrieve some data ? ...

C++ beginner question on Tuple-at-a-time join implementation

Hi All,I am just browsing through this very old webpage, http://www.cs.cornell.edu/Info/Courses/Fall-97/CS432/proj3/index.html and find this project interesting,since I just started learning C++,I really like to try doing the simplest "Tuple-At-A-Time" join as mentioned on the page using C++. I know how Tuple-at-a-time works,but had a...

A question about desining a faster algorithm in T-SQL for a CASE that I will be telling.

Hello people. Here is the CASE I have an sql table consisting of just one data column, consisting of some group names. Here how the table looks: OPEN SYSTEMS SUB GR OPEN SYSTEMS SUB GR (GM/BTIB(1111)/BTITDBL(2222)/BTVY(4444)/ACSVTYSAG INFRASTRUCTURE SOFT SUB GR INFRASTRUCTURE SOFT SUB GR (GM/BTIB(1111)/BTUGBL(3333)/BTUGBL(3333)/BTAUS...

Selecting group using Unknown column value

hi guys, I have a large table with records like (id,name,Class) I want to be able to do a operation "Class" wise .. but i dont know what are all possible values for Class Currently i have to do is use 2 queries : Query 1: result = select distinct class from myTable; Query 2 : for each value from result , classWiseRows = select *...

How to connect to remote Oracle DB with PL/SQL Developer?

I have a database "TEST", to which I connect at address 123.45.67.89:1521. How do I connect to it using PL/SQL Developer? ...

JSON best practices: filtering nodes client side or not?

In my database I store a number of "topics" and "examples". Each example belongs to one topic. I'd like show all the topics by name ASC in a tree component except for one topic (Topic C) which I always want on top. This may though come to change later and I'd rather not change the basic JSON output of topics and examples from the DB. 1...

In SQL Server change column of type int to type text

I would like to change a column in SQL Server from type int, to type text, while maintaining the column name. The table with this column has lots of data, and I do not want to lose it. SQL Server doesn't seem to support implicit or explicit casts from int to text, otherwise this would be pretty simple. So, how would you do it using on...

DB Architecture : Linking to intersection or to main tables?

Hi, I'm creating fantasy football system on my website but i'm very confuse about how I should link some of my table. Tables The main table is Pool which have all the info about the ruling of the fantasy draft. A standard table User, which contains the usual stuff. Intersection table called pools_users which contains id,pool_id,user...