database

What is the proper way to move a database from one drive to another in SQL Server 2005?

I'm not looking to relocate the database to another server entirely, but just move the data file(s) and log file to another drive with more space. I've seen conflicting directions on how to do this, so I'm looking for the recommended proper way of doing it. ...

How do you query a database in the middle of a jruby on rails webpage?

Not sure how to ask it so sorry if I mess up my terminology. In using jruby on rails, how would I query two (or more database) to serve back to the view page? I have seen where I set up my database connection in database.yml and it works fine but I am now wondering how I move beyond this to hitting many databases with jdbc and puttting...

find the tables has binary data

How to find what are all tables has binary data and display the table name ? ...

Using a hash of what you are hashing as a salt?

Say a user registers for your site, you hash the password they have chosen then use that hash as a salt and rehash their password with that salt. Example: String hash1 = MD5(password); String endHash = MD5(hash1 + password); then store endHash in your database. Would this effective agaisnt Rainbow Table attacks if my database was com...

What BASE database development applications are available?

What applications/IDEs are out there to develop BASE database systems from? BASE systems (Basically Available, Soft state, Eventually consistent) are an alternative to RDBMS, that work well with simple data models holding vast volumes of data. Google's BigTable, Dojo's Persevere, Amazon's Dynamo, Facebook's Cassandra are ...

Determining Formula Field

Hi all, Guys, I am using SQL Server 2000 and executing the sp_columns stored procedure to get a layout of my table. One of my fields is a formula field and my question is, how can I determine this through sp_columns? sp_columns does not seem to show this information. THanks in advance ...

C# Local database, I need some examples

Hello , I'm making an app that will be installed and run on multiple computers, my target is to make an empty local database file that is installed with the app and when user uses the app his database to be filled with the data from the app . can you provide me with the following examples : what do I need to do so my app can connec...

Comment post scalability: Top n per user, 1 update, heavy read

Here's the situation. Multi-million user website. Each user's page has a message section. Anyone can visit a user's page, where they can leave a message or view the last 100 messages. Messages are short pieces of txt with some extra meta-data. Every message has to be stored permanently, the only thing that must be real-time quick is th...

User Table in Separate DB

Note: I have no intention of implementing this, it's more of a thought experiment. Suppose I had multiple services available through a web interface. At least two of which required user registration and some data in a database. A single registration would grant access to all services. Like Google (GMail, Google Docs, etc.). Would ...

First name, middle name, last name. Why not Full Name?

I am trying to find a better approach for storing people's name in the table. What is the benefits of 3 field over 1 field for storing persons name? thanks. ...

How to implement database access control on row basis

Hi, I'm currently developing a small business database application for which we plan to go towards multi-user access in the next time. The database mainly contains projects (in a project table) with a couple of joined tables containing additional information. One requirement of our customers regarding multi-user operations will be a f...

nhibernate save() generated isnert statement but no actual record was inserted into db

I have the following code. In SQL Server profiler I can see the isnert statement being generated however no actual record has been inserted. I just can't figure out why this is happening! private ISessionFactory _sessionFactory; private Configuration _configuration; _configuration = new Configuration(); _configuration.Configure(); _con...

How to share One-To-Many table

I am trying to create a database to hold my address book but I've ran into a slight problem. My database is supposed to hold individual contacts along with company contacts. That is an entry can be either for an individual or a company. As you know both individuals and companies have addresses and I want a One-To-Many relationship betwee...

When should I consider using an ORM framework?

I am developing an application which at the moment queries a (rather large) database via ADO.NET and hard-coded SQL statements. Admittedly this is ugly (i.e. no compile time errors thrown if a mistake is made in the SQL) and potentially dangerous (due to SQL injections, etc although this is unlikely to be a problem for this particular ap...

gathering all data which user has entered in a datatable, now wanna to save them in DB. How?

Hi I have a webform which has a gridview. the gridview (gridView1) has been bound to a datatable (dataTable1). when user creates a new row, I add that new row to the dataTable1. Also, when he updates a specific row within gridView1, I update dataTable1. Now, I want to save all rows within dataTable1 in DB. How? ...

AJAX Autocomplete Query from a MYSQL Table

I wanted to implement an ajax based autocomplete feature for my searchbox, and i came across, http://stackoverflow.com/questions/1118782/implementing-autocomplete-in-my-website. Now what i wanted to know was that i attach a datasource to the control, but so far i have seen that the datasource requires a textbase schema, can't i like it ...

Why Did Microsoft Create its Own SQL Extension (T-SQL)?

What are the reasons behind Microsoft implementing its own SQL extension as Transact SQL (T-SQL)? What are its advantages over the normal SQL? ...

grant limited access to sysprocesses in SQL Server 2005?

I have a database to which some applications has all access .I want to restrict the access over the database for few existing application.What Method should I follow? ...

Diagnostic output of the Oracle Query Optimizer

There are many instances where we are not happy with the decisions that Oracle's cost-based-optimizer makes regarding the query execution plan. Using hints, less-than-straightforward query transformations, index reorganization and instance parameters we then try to coax it into doing what we think makes more sense. It is very much taking...

Django persistent database connection.

Hi folks, I'm using django with apache and mod_wsgi and PostgreSQL (all on same host), and I need to handle a lot of simple dynamic page requests (hundreds per second). I faced with problem that the bottleneck is that a django don't have persistent database connection and reconnects on each requests (that takes near 5ms). While doing a...