database

Suggestions for creating an in-house marketing campaign database in a Microsoft environment?

Hi all, I'd like to create an in-house solution to store marketing segment, list, campaign, and communication data. Right now nothing is centralized/standardized. Data is located on a variety of SQL servers, Access databases, and Excel spreadsheets. It's been a real pain when it comes to reporting/tracking. I'm in a Microsoft SQL Se...

Basic questions on Keystore usage

I've got an application which generates SecretKeys, one per client. These need to be persisted in our database. I'm REALLY unfamiliar with common security patterns or implementations, and I'm looking for advice. The KeyStore class seems to be widely used, especially to protect SecretKeys. However, I've seen little mentioning using Ke...

Mysql assigning default causes error

Hi, I am trying to run the below query to create a table in mysql and I am getting an error. create table newtable ( version_id int(11) auto_increment not null, test_id int(11) default version_id, primary key(version_id) ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corr...

Unsigned integer datatype in column-oriented DBMS

I have checked different column-oriented database systems such as InfiniDB, InfobrightDB and MonetDB. None of them support unsigned integers as a data storage type. Why? One solution is to store all 4 byte unsigned integers into 8 byte signed integers (Link), however I think it would waste too much space. Is there any open-source column ...

Database object design in Java

Is there a commonly-accepted practice for designing java objects that are frequently loaded and saved to and from databases? The approach that I'm using now is to have one main database object which opens a connection to the database. Anywhere in my application where I need to load or save objects, I create a source interface for loadi...

How do in-memory databases provide durability?

The title says all, but more specifically, are there any databases that don't require secondary storage (e.g. HDD) to provide durability? Thank you in advance! Note:This is a follow up of my earlier question. ...

Proper way to save a 1970 type date

I have a date that looks like 1003029303, which I guess is what's known as a linux UNIX time stamp. What format should I save it as in a mysql database? I don't suppose that an int(10) is the right way. `gottime` int(10) ...

rewriting persian date in instead of normal Date format

hi friends. I have a datagrid which populated by some data from sqlserver.I have datetime filed that represent Georgian date,but i want to convert this to Persian by using PersianCalendar. I wan some kind of conversion, that gets Georgian date from database but when it comes to show on datagrid or some where else, it shows persian date....

How to create an MySQL query alias?

For example I use this select * from tab1; every 5 minutes. Is there a way to set up an alias p so that I can just do p instead and that query is executed? ...

Explanation of BASE terminology

The BASE acronym is used to describe the properties of certain databases, usually NoSQL databases. It's often referred to as the opposite of ACID. There are only few articles that touch upon the details of BASE, whereas ACID has plenty of articles that elaborate on each of the atomicity, consistency, isolation and durability properties....

Store IP Address in Data Base best way

Hi, I need create a table to store Black listed IP address in case of spammers in my blog. I would like to know: What is the best datatype to store IP addresses. What others field I can list in this table that you think could be useful against spammer. I use MS SQL 2008 DB Thanks for your time ...

Returning a table from a UDF (in C)

Hi, I'm trying to write a UDF in C that inserts values into a table and returns this table. The bigger picture is: I parse some document and set up a "parse table" (essentially this is the relational representation of the parse tree of the document parsed). After having inserted the parsing information into the parse table I need the UD...

Turn off "updated_at" column in Rails

Hi, I have a simple "Log" model, that records the fact of calling controller's action. Entries of this "log" record are supposed to be created once and never altered. Also, I will have many of these records in the database. So, there is no need for "updated_at" column (don't need to waste the memory on HDD). How can I tell to Rails t...

jQuery: loading ID tag from database

So I have lots of radio buttons with same name but different ID and I wan't specific one of them to be selected on page load. The ID of desired button is saved to the database. I've tried this kind of solution for the actual ajax call, but alas it didn't work. $.ajax({ type: "POST", url: "load_config.php", dataTy...

retry logic uptil databases comes up

Dear All, Through my java code i m connecting to multiple databases using connection pooling.if my database goes down i need handle the retry logic to get connection until its return a connection object. ...

Storing a directory structure in database

In my rails app a user can have a directory structure which has folders and files in sub-folders. Which is the best way to store such data ?? Also, which database offers best way to do so? ...

Rebase Rails migrations in a long running project

In which I mean "rebasing" in the dictionary, rather than git definition... I have a large, long running Rails project that has about 250 migrations, it's getting a touch unwieldy to manage all of these. That said, I do need a base from which to purge and rebuild my database when running tests. So the data contained in these is importa...

get data from database in aspx

i am using VS 2010 to develop a site that gets some data from a database. but i just keep getting this error. 'No value given for one or more required parameters.' here is my code Public Function getSessionDetails(ByVal roomId As String) As ArrayList Dim sql As String sql = "SELECT * FROM Table1 WHERE RoomId = ?" Dim dbComm ...

How to create ListView disabled item labels for sections of list items?

I have a customized Cursor based adapter for my ListView. Each Cursor has a few columns of data, sorted by the priority column. I know you can create a disabled list item to act as a sort of header, like in the Market app (the little green labels). What I would like to do is display a header for each group of items with a different pr...

Database: Sorting hierarchical data (Modified Preorder Tree Traversal): How to retrieve immediate children

i am using MySQL with PHP & Doctrine 2. my question is assuming i am using Modified Preorder Tree Traversal is there a way i can retrieve only immediate children? ...