database

SQL query to get the sum and the latest enries

I have a table called machineStatus: ID Successfiles totaldata Backupsessiontime > 1 3 988 1256637314 > 2 21 323 1256551419 > 3 8 23 1256642968 > 4 94 424 1256642968 > 1 42 324 1256810937 > 1 0 433 1256642968 Now here i want to group by ID where the successfiles and total data gets summed up, but only display ...

Cannot get my 'delete.php to send to db and mark as dead

Is this an id problem or is there something I am missing? I am trying to get it to delete a comment...On this 'delete.php' page, $prof is the user sending the delete request, on the page that I'm trying to delete from, $auth is the sender of the comment. $prof = new User($_GET['id']); $query = "UPDATE ProfileComments SET status = 'd...

Has open source ever created a single file database that auto handles transactions?

Has open source ever created a single file database that has better performance when handling large sets of sql queries that aren't delivered in formal SQL transaction sets? I work with a .NET server that does some heavy replication of thousands of rows of data from another server and it does so it a 1-by-1 fashion without formal SQL t...

Oracle: changing the DB_RECOVERY_FILE_DEST without pre-existing folder?

I'm working on a web interface for modifying Oracle database backup settings. One of the options I want to give users is where to set the flash recovery area. As far as I know, the only way to change this is by executing something like: ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='C:\file\path' SCOPE=BOTH SID='*'; The problem is that if the...

i have hundreds of thousands of pages i need to scan and document

i have many documents that i want to scan. every document will have about 10 different meta data tags by which i want to be able to search. so maybe i am thinking of getting a huge scanner, scanning everything in, but then how do i label evverything? i guess i will turn them into pdf files and i will put them in a mysql DB? what is the ...

How do I do a GROUP BY and ORDER BY in PostgreSQL?

PostgreSQL is about to make me punch small animals. I'm doing the following SQL statement for MySQL to get a listing of city/state/countries that are unique. SELECT DISTINCT city , state , country FROM events WHERE (city > '') AND (number_id = 123) ORDER BY occured...

synchronization database for windows application in vb.net

i have a windows application made in VB.NET which maintains a database, and i have similar application running across many disconnected machines, all of them have similar databases. Now we have a requirement that all the data from these machines must be uploaded on a central database server MSSQL on a daily basis, we can have an internet...

How to implement server-sided applications that can process user's inputs?

There are some web-based services such as converting .flv files into .mp3 files, .doc files into .pdf files, etc. These are the servers that take files from the user and apply respected applications (such as conversion). After that, the converted file may be available to the requested user. I understand a little bit about writing a text...

how to connect sharepoint content database to my web part application?

Hi all, I am developing the web part that will show the chart.but for that MS chart control we need the datasource of sql server.now i have designed some infopath forms & deployed in sharepoint site on my url.what happens the sharepoint created the content database for all forms libraries.I want to show a chart on the basis of the data o...

SQL Compact import DB from SQL Server Express with Server Management Studio

Hi! I try to import sql script, generated with Server Management Studio, into SQL Compact 3.5 and get a lot of error. What I am doing wrong? I generate script with "Task/Generate Script" context menu. Part of my script: CREATE TABLE [LogMagazines]( [IdUser] [int] NOT NULL, [Text] [nvarchar](500) NULL, [TypeLog] [int] NOT NULL, [Date...

Database design question. BIT column for deletions

Hi guys, Part of my table design is to include a IsDeleted BIT column that is set to 1 whenever a user deletes a record. Therefore all SELECTS are inevitable accompanied by a WHERE IsDeleted = 0 condition. I read in a previous question (I cannot for the love of God re-find that post and reference it) that this might not be the best des...

Efficient way to store content translations?

Suppose you have a few, quite large (100k+) objects in available and can provide this data (e.g. name) in 20+ languages. What is an efficient way to store/handle this data in a SQL database. The obvious way to do that looks like this - however, are there other ways which make more sense? I'm a bit worried about performance. CREATE TA...

Caching objects to improve performance

I'm storing a set of messages in a SQL table. Each message has a size and there's a column in the table which contains the size of the message. These messages are connected to accounts. When a new message arrives, I need to check that the current account size + the new message size is less than the quota for the account (which is just a ...

in which database software / language is it possible to create a database accessible by multiple users except its two collumns to be accessed only by admin user .

in which database software / language is it possible to create a database accessible by multiple users except its two collumns to be accessed only by admin user. please give details how this database can be created. ...

How does one configure PHPUnit to log to the test database?

Hi All I am trying to work out how to configure PHPUnit to use the "test database" that is described on this wiki page: http://www.phpunit.de/wiki/TestDatabase However I can't find any documentation on how to enable and configure it. Has Anyone got any ideas? Thanks ...

Clone a website from one domain to another

Hi guys, What would be the best approach for the following.... Website 1 - has 300+ individual .html product pages (no database involved) The products/content from Website 1 need replicating on Website 2, Website 3, Website 4 and Website 5. Each site is location based e.g glossop-bikes.co.uk, buxton-bikes.co.uk, hyde-bikes.co.uk etc....

Should a two-to-many data relationship be treated as many-to-many?

I have 2 database tables: Teams and Games. For the purpose of this question, we are dealing with football (soccer) teams and games. Each Game has exactly 2 teams, generally a home team and an away team although occasionally both teams can be neutral. My question is whether I should represent this data relationship using 2 foreign keys...

Convert XML into a Dataset

I'm trying to convert an XML document into a dataset that I can import into a database (like SQLite or MySQL) that I can query from. It's an XML file that holds most of the stuff in attributes. This is part of a Rails project so I'm very inclined to use Ruby (and that's the language I'm most comfortable with at the moment). I'm not sur...

Most efficient way to query multiple identical tables in separate databases

Hi, I have a server (SQL Server 2005) with multiple archive databases (1 per quarter stretching back 8 years) that are all structurally identical. I frequently need to query back over a certain date range that spans n databases, usually n is small 1-3 but it's possible I need to query the whole set. Any thoughts n the most efficient w...

Should I be obfuscating database IDs from my users?

I'm being told that I shouldn't be using database IDs directly in HTML code in web applications. Currently I use the IDs on things like table row IDs (tableRow-454 where 454 is the ID of the row in the DB), in hidden or selects fields in forms or in URLs. (I'm not referring to telling people visually on a page that they are ####.) The ...