Is It Possible to have a primary key and auto increment key associated to two fields respectively?
Like wise, In a table there are 3 fields, say, ID, name and age..
Then is it possible that "ID is autoincrment key and name is primary key"?
...
I have a table called "Event". A column has "duration"--which is...how long that event lasts.
What database type should this be? Integer? (in seconds)?
In the future, I will do statements such as:
If now() > event.duration THEN don't display the event.
...
Hello all,
I'm collecting some thoughts about creating a multisite CMS. In my opinion there are two major approaches.
All data is stored into 1 database, giving me the advantage of single point of updates;
Seperated databases, so each client has its own database. Giving me the advantage to measure bandwith.
Option 1 gives me the dis...
I have a list of objects which needs to be persisted in a SQL Server database table, where each object gets persisted as single record. i.e. List of objects result in insertion of multiple records.
Trivial way of saving the objects is to loop over the list and fire a query/stored procedure/etc. for saving that record. But this results i...
I've been reading about NHibernate and Microsoft's Entity Framework to perform Object Relational Mapping against my data access layer. I'm interested in the benefits of having an established framework to perform ORM, but I'm curious as to the performance costs of using it against standard XML Serialization and Deserialization.
Right now...
I am working on nightly and hourly backups of MySQL Databases. There are multiple MySQL databases which are either InnoDB or MyISAM (Note: Each database is either InnoDB or MyISAM for a reason). With the 2 different types I want to make sure I am grabbing everything that is needed for backup and recovery. Here is my current plan
Nightly...
I am creating a custom UserType class in Hibernate. The specific case is for an HL7v3 clinical document (I work in health IT). It is a mutable object and most of the documentation around the Hibernate UserType interface seems to center around immutable types. I want a better understanding of how and when the interface methods are used, s...
Hello
I've been searching for a while for a good example of localizing an C# ASP.NET MVC 2 application but storing the data in the database instead of .RESX files. Unfortunately I've had no luck finding a good example and was hoping someone else may know and could point me in the right direction?
Many thanks for any help/advice/articl...
What is document data store? What is key-value data store?
Please, describe in very simple and general words the mechanisms which stand behind each of them.
...
hi , in my project i need a tow tables each of it has about 2000 row , i want my application to be speed
so my db should load into memory (cached) when the app start and before it close the db have to be saved on the disk . i am using java and i want to use sql
...
Hi there. Just a quick question about database performance. I'll outline my site purpose below as background.
I'm creating a dictionary site that saves the words users define to a database. What I'm wondering is whether or not to create a words table for each user or to keep one massive words table. This site will be used for entire sch...
For instance, let's say I have a User model. Users have things like logins, passwords, e-mail addresses, avatars, etc. But there are two types of Users that will be using this site, let's say Parents and Businesses. I need to store some different information for the Parents (e.g. childrens' names, domestic partner, salaries, etc.) than f...
I've got an html page from where Im making this call periodically:
function logon(id)
{
$.get("data.php", { action: 'online', userID: id}, function(data){
$("#msg").html(data);
});
}
What this does is it calls this SQL script in data.php:
$sql = "update user_sessions set expires=(expires + 2) where userID = $userID";
mysql_query(...
Possible Duplicate
http://stackoverflow.com/questions/95183/how-does-one-create-an-index-on-the-date-part-of-datetime-field-in-mysql
In mysql. It's a date column
...
I currently have a Firebird server on Windows and Windows desktop client applications for Firebird databases. I want to make a web interface for the existing databases (using Apache on Windows). What free instrumentation (server languages, libraries) is currently available for the purpose?
...
Hi there,
I am having major trouble connecting to my database via ODBC.
The db is local (but I have a mirror on a virtual machine), so I am trying to use the connectionstring:
Dsn=MonetDB;host=TARBELL
where TARBELL is the name of my computer. However, it doesn't connect. BUT, this string does:
Dsn=MonetDB;host=localhost
...
I Have to get a movie from a PostgreSQL database that matches a given title and release date.
title is a character(75) and releaseDate is a date. I Have this code:
String query = "SELECT * FROM \"Movie\" WHERE title = ? AND \"releaseDate\" = ?)";
Connection conn = connectionManager.getConnection();
PreparedStatement stmt = conn.prepareS...
I am trying to add a foreign key constraint via sqlyog, and getting this error, although I am only select one source and one reference columns
please select equal number of source
and reference
Does anyone knows what it means in this case? Note that I do have an equal number of source and reference columns...
...
Hi , I recently read this article nosql-vs-rdbms and I don't know too much about nosql and I didn't use it in my projects, so I have some questions:
What is the main feature that nosql has over RDBMSs?
If you think that it is better than RDBMSs : Where and how can I learn about it (books - tutorials)?
I want to be a DBA. What this car...
I am a newbie to both PHP and Wordpress (but do ok in C#), and am struggling to understand the error handling in a custom plugin I am attempting to write. The basics of the plugin is to query an exsiting MSSQL database (note its not the standard MYSQL db...) and return the rows back to the screen. This was working well, but the hosting p...