database

Using JQuery to display database information on a hover

Hi guys, I'm trying to something with JQuery similar to Red Box. I'd like to be able to hover over an entry in a table, and then have a box popup that displays information about that entry pulled from a database. What I have so far is the ability to select specific elements in the table, and alert when I hover over those elements :) So...

Explaining row and column dependencies

This is a simple and common scenario at work, and I'd appreciate some input. Say I am generating a report for the owners of a pet show, and they want to know which of their customers have bought how many of each pet. In this scenario my only tools are SQL and something that outputs my query to a spreadsheet. As the shop owner, I might ...

SQLite: prevent duplicates

Hi, I would like to create a table to store device settings. The table has three rows: id, parameter_name and parameter_value. The table was created by executing the following query statement: DATABASE_CREATE = "create table DATABASE_TABLE (KEY_ID INTEGER PRIMARY KEY AUTOINCREMENT, KEY_NAME INTEGER not null, VALUE TEXT not null); an...

Android: Where are database files stored?

Hi, I created a SQLite database on Android device. The program can read/write to database so the database file has obviously been created. The SQLiteDatabase.mPath is set to db.mPath = "/data/data/dev.client.android/databases/clientDB.db" but when I browse the directories on the device I can't locate the file clientDB.db. I looked in...

Is there a paging solution for ASP.NET MVC that does paging in the database?

Most of the ASP.NET MVC paging solutions I have found by googling look like they get all rows from a database table in the form of a IEnumerable collection, perform some paging conversion on the IEnumerable collection, and then return the results to the view. I want to be able to page on the DB side but still have some paging class to d...

SQL Server Index Order (datetime field)

I have a question about SQL Server indexes. I'm not a DBA and assume the answer is clear for those of you that are. I am using SQL Server 2008. I have a table that is similar to the following (but has more columns): CREATE TABLE [dbo].[Results]( [ResultID] [int] IDENTITY(1,1) NOT NULL, [TypeID] [int] NOT NULL, [ItemID] [in...

Visual C++ application as a frontend to MS Access database - multiuser data access and canvas-like GUI questions.

In company that I work for, I was given the opportunity to write an application, which would replace the old Excel workbook, which is used to plan the production queue. Because VBA was simple and Excel was easy to use, for few years this workbook was used by several people to plan/add changes/notes about current production status. Whole ...

MySQL joins, how to output relation "the proper way"

Hello, First of all, excuse my poor topic title. I simply have no idea how to formulate this question or what to Google after, so don't shoot me if this is something easy answerable. Assume I have the following tables: [AUTHORS] id, name [NEWS] id, item, author_id If I wanted to display a news item and output the corresponding autho...

Safe Web Text Formatting

I am building a web application that will need to allow users to save formatted text to a database. Basically they just need to be able to change font color, font background color, font size, bold, italics, and underline. I would like to use something that I can just attach to a text area to make a formatting bar show up. It would be n...

Calculating the closest future periodic payment date in SQL

I'm working on an application that deals with periodic payments Payments are done fortnightly i.e. payment 1: 2009-06-01 payment 2: 2009-06-15 payment 3: 2009-06-29 and now I need a SQL statement that can calculate the closest next payment date from a given date in the WHERE clause i.e. SELECT ... FROM ... WHERE someDate < [CALCUL...

ORM and Database Constraints

How compatible is ORM and existing databases that have a lot of constraints (particularly unique key constraints/unique indexes beyond primary keys) enforced within the database itself? (Often these are preexisting databases, shared by numerous legacy applications. But good database modeling practice is to define as many constraints as ...

How do database naming conventions change for multitenant applications?

For multitenant databases, to you name tables differently based on: Whether the table will host multiple tenants or just rely on the exist of a tenant column If you support multiple "applications" such as salesforce.com, do you prefix the application name to the table? Do you try to keep the names the same across tables where it may no...

Datastore access optimization

I'm writing a small program to record reading progress, the data models are simple: class BookState(db.Model): isbn = db.StringProperty() title = db.StringProperty(required=True) pages = db.IntegerProperty(required=True) img = db.StringProperty() class UpdatePoint(db.Model): book = db.ReferenceProperty(BookState)...

Normalization

Does anyone have an idea on where I could get refined notes on Normalization of database tables(relations)? ...

Android: Retrieving data from the database issue

Hi, I created the following method for retrieving stored settings from the database: public String getEntry(long rowIndex){ String value = ""; Cursor c = db.query(DATABASE_TABLE, new String[] {KEY_NAME, VALUE}, KEY_NAME + "=" + rowIndex, null, null, null, null); int columnIndex = c.getColumnIndex(VALUE); int rowsCount = c.getCo...

iphone - SQLite records on table dont coming ?

hello, i have a table. and 3 record. and i have that code; -(void) readScoreFromDatabase { sqlite3 *database; scores = [[NSMutableArray alloc] init]; if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { const char *sqlStatement = "select name,score from game"; sqlite3_stmt *compiledStatement; if(sqlite3_prepa...

Can NVL Function be Cascaded?

can nvl() function be cascaded,...it was asked me in IBM interview .....and why???? ...

Building Database project in VS 2008

I've spent some time with new Database project in VS 2008 and decided to go with it (really cool). But i've also discovered that i cannot build it on our CI-server where .NET SDK only is installed. I tried to put Microsoft.VisualStudio.TeamSystem.Data.Tasks.targets to the CI-server but it has too many dependencies on assemblies such as M...

Working with WPF & SQL database

I'm into creating a simple contact management application to test how WPF works with SQL database. is there any WPF-code for that shows how to connect with SQL database ? save and update data? I'm using KaXML/Sharp-develop for WPF and using SQLite/MS-SQL server 2005. I can't use Visual studio express(not allowed to install,anyway that'...

How to create a website which uploads/ download data from/ to Database and Excel files

Hi Guys, I am afraid to ask this kind of question as it has many factors to consider and its not easy for others to give suggestions. But, I have to do this task and couldnt trace out the possible way to do this. One requirement I know is with the help of AJAX controls and Update panel ( I never worked on them) I have to do this. Plea...