database

Best way to save/load pictures with .Net & SQL Server 2005?

Hey, What is the typical way to handle product pictures in a web-page selling products? Say I had a database with books or computer components etc, all of which have their own sample pictures for example... Should I save them into the DB as binary data, or somehow handle them in the codebehind, saving them into a directory with the appr...

many records: create business objects 1 by 1 or all at the same time?

I have a table with about 10.000 records (plus detail data in 11 tables). I want to display the data in a browsable form (1st, previous & next, last buttons). I thought about retrieving all the records, putting the data into a collection of business objects and binding the form to the collection. Thinking about it, it came to my mind t...

Hibernate Encryption of Database Completely Transparent to Application

I'm working on a Grails 1.0.4 project that has to be released in less than 2 weeks, and the customer just came up with a requirement that all data in the database should be encrypted. Since encryption of every database access in the application itself could take a lot of time and will be error prone, the solution I seek is some kind of ...

Postgres SCHEMA isolation

Hi, I was wandering if it's possible to create a user on a postgres database (version higher than 8.3) which could access only a certain specified schema. The problem is, that on my database I have a few schemas. If I revoke all privileges from a certain user on all schemas except one, he can still browse the database using the i.e. PgA...

Create SQL Server Compact database file programmatically

How can I create a new SQL Server Compact database file (.sdf) programmatically, without having an existing template file to copy from? ...

How to update DB structure when updating production system without doing a teardown / rebuild

If I'm working on a development server and have updates to the database structure for some of our releases, what is the best way to update the structure on the production server? Currently we create a new production database containing the structure only, do a SQL dump of the data on the 'old' production database, then run a SQL query t...

DB Design question: Tree (one table) vs. Two tables for tweets and retweets?

Hi I've heard that on stackoverflow questions and answers are stored in the same DB table. If you were to build a twitter like service that only would allow 1 level of commenting. ie 1 tweet and then comments/replies to that tweet but no re-comments or re-replies. would you use two tables for tweets and retweets? or just one table whe...

How do I build an editable menu in ASP.NET and VB

Hi, I am working on building a CMS, my client's specific request was that he should be able to modify/edit the nav menu and its contents using the user interface, I am not sure how to do it. Can someone please help by providing links to articles where I can learn? or even examples that I can implement? Site2you.com has a template t...

Is it possible upgrade old MS access database with script?

I have this old MS Acceess db full of useful data, but newer version of software requires newer version of db (newer as differences in db design and some fixes). With Sql Server or there is no trouble at all, I would write a script a I would have a upgraded db. With Access I have trouble when I try to write script myself and when I use t...

how to copy a column content from my local databse to main database??

i have same table at my local database and at my live-main database. I have to copy the content of a particular column from local to main not the whole table.How can i do that in mysql??? ...

Best way to be done? Subdomains and MySQL

Hi! I'm asking your opinions about my next project.. I'm planning to make website which offers services where all users would be have own subdomain (user.mydomain.com) and own website. First I was thinking to really make real subdomain, generating automatically website code into their folder, creating own database etc.. Question #1: ...

List all sequences in a Postgres db 8.1 with SQL

I'm converting a db from postgres to mysql. Since i cannot find a tool that does the trick itself, i'm going to convert all postgres sequences to autoincrement ids in mysql with autoincrement value. So, how can i list all sequences in a Postgres DB (8.1 version) with information about the table in which it's used, the next value etc w...

Is Berkeley DB XML a viable database backend?

Apparently, BDB-XML has been around since at least 2003 but I only recently stumbled upon it on Oracle's website: Berkeley DB XML. Here's the blurb: Oracle Berkeley DB XML is an open source, embeddable XML database with XQuery-based access to documents stored in containers and indexed based on their content. Oracle Berkeley DB XML is...

PHP Links to User Profiles After Membership

Hello, I already have written a login and register script. The user can login to their account edit their details etc. The details are stored in a users table which has many different data properties related to the user. I was wondering, how do I make it so they can view their profile and it shows all the data they input. For example, i...

mysql backup and restore from ib_logfile failure

Here's the case: After computer being hacked, we are in a rush to backup all data out to other computer. As a result, the mysql databases are not backup out as sql statement. What we have done is backup out all the physical files/folders in the C drive to new computer. Eg: C:\Program Files\MySQL\MySQL Server 4.1\data In this case,...

Mysql restore to restore structure and no data from a given backup (schema.sql)

Hi I use mysql administrator and have restored backup files (backup.sql). I would like to use restore the structure without data and it is not giving me an option to do so. I understand phpadmin provides this. I can not use this however. Any one can tell me an easy way? ...

How to determine where a program stores data in a MySQL database

I have a commercial program that takes input from a delimited text file and stores that data in a MySQL database. I am writing a Perl script that essentially removes the need for the commercial program and uploads the data directly to the database. However, I am unsure in which tables the commercial program stores all the data. There ...

Can SQL Server bcp in a file with Unix line endings?

I'm trying to use the SQL Server bcp utility to import a text file from a samba share. bcp is choking on the Unix line endings. I'm sure I could add an intermediate step, either on Unix or Windows, to change the line endings to Windows-style. But I would prefer to import the files from Unix without modification. Anybody know if there's ...

left join with special condition on right table

don't know if this is possible.. I'm using sqlite3 schema: CREATE TABLE docs (id integer primary key, name string); CREATE TABLE revs (id integer primary key, doc_id integer, number integer); I want to select every job joined with only one of its revisions, the one with the highest number. How can I achieve this? Right now I'm doing a ...

J2ME Mobile Application

I have a scenario. When a person sends a message to a specific mobile which is connected to the system, the message is extracted from the mobile connected to the system and this is used for a SELECT statement to get some values from the database. Then this answer is sent back to the person who sent the previous message. I am not sure if...