database

How much of the data in a database is string/text data?

I was wondering if there has been any research about how much of the data stored in a databases consists of string data. Also, how much of that string data is free-text data (i.e. completly unstructered) and how much of it consists of identifiers such as proper names. My intuitive feeling is that often the size of a record is mainly defi...

Database Design for 2D Matrix Algebra

Hi, Can anyone advise on a database design/DBMS for storing 2D Time Series Matrix data. To allow for quick BACK END algebraic calculations: e.g: Table A,B,C.. Col1: Date- Timestamp col2: Data- Array? (Matrix Data) SQL Psuedo Code INSERT INTO TABLE C SELECT Multiply A.Data A by B.Data Where Matrix A Start Date = Matrix B Start Date...

dml by multiple users/commit scenarios in oracle

Hi, How does oracle treats dml statements executed by multiple users on the same data object?. Suppose, If there is a empty table named EMP(empname varchar2(30)) and user 'A' makes an entry into it using, insert into emp values('A'); but hasn't committed it yet. If another user 'B' logged into the same database commits, would he/sh...

Term : Database id value pair

I am almost certain there is a term for the type of table I am looking at, but I can't for the life of me remember what it is. I have a collection of tables that are simply ID | VALUE | ACTIVE These tables are for normalization and maintainability purposes, those values are stored in only one place that way. I know there is a term fo...

c# DataSet close connection explicitly?

Hi: Am using DataSet to retrieve data from the MS SQL server. Do I need to explicitly close the connection (OR the underlying SQLDataAdapter automatically closes the connection)? I always use DataReader (with using), but first time using DataSet -- that's why wondering about best practice. Thanks in advance. ...

Multilevel Databases

Hi, i want to know about multilevel databses and security in multilevel databases, would you please give me some links about this issue? thnks ...

SQLite Trigger to Autoincrement one column when another is not unique

I am looking for a way to have a trigger that looks at a Timestamp field and if it finds a match autoincrement the record being inserted on another column. So I would have a timestamp field and a version field. If a record being inserted has a timestamp that matches a record already in the table then autoincrement the version field. A...

Data leakage in db-level encryption

I read a comment that when doing the data encryption at the database level as opposed to application level, some of the data will linger in its raw plain text format in the logs. True or false? and is it something I should worry about? ...

Webkit download pre-built database

I have a rather large db (as in many records). I'd rather let the client download a pre-built db instead of forcing them to load a bunch of text, then insert all the records before being able to use the db. The closest thing to a spec I can find is this: http://developer.apple.com/safari/library/documentation/iphone/conceptual/safarijsd...

mySQL images upload

I need a simple code to upload images to mySQL using PHP... short! snippet... and is it possible to upload an html, css file to mySQL?... its reason is complicated but all answers are appreciated!... EDIT:: say I have 1000 users.. and they each have their own layout for their page.. So inside their MYSQL record will be a html file, css f...

Error executing update over OLEDB from C#

I am using OLEDB to Update data in .dbf database from c#. I get Error: System.Data.OleDb.OleDbException {"Undefined function 'replace' in expression."} on ExecuteNonQuery. How can I make this work with least changes, i need to replace double quotes with single quotes in many files, so i have to automate this process. Should I try ODBC...

Using the same salt for multiple fields

I have a field in a row that I'm hashing and salting. The salt for each row is different. I decided to hash/salt a couple of more fields in each row. Would using the same salt for those new fields in the same row make the data more susceptible to rainbow attacks compared to if I were to generate a new salt for each field? My logic is t...

Connection problems with PostgreSQL XADataSource in Glassfish

I'm new to GlassFish, and our company has recently migrated an old system from JBoss 2-something to GlassFish v3. Almost everything works fine, but we are having connection problems with a PostGres (v8.1) XADataSource. We have a database entry that holds the operating mode of the site and every request pulls this information to verify ...

Visio 2003 ERM to SQL Server script

Hello, my question is simple: Is there anyway to generate the database sql creaton script from a Visio 2003 model? I prefer Visio, however can be other program (freeware) that allows me to somehow agilize the process between the model and the sql code. Thanks in advance! ...

How to put a comment into HQL (Hibernate Query Language)?

Is it possible to put comments into Hibernate Query Language? If so, how? ...

SQL query at least one of something

Hello, I have a bunch of Users, each of whom has many Posts. Schema: Users: id Posts: user_id, rating How do I find all Users who have at least one post with a rating above, say, 10? I'm not sure if I should use a subQuery for this, or if there's an easier way. Thanks! ...

Hibernate Reverse Engineering with Eclipse and MySql

I'm having the hardest time getting Eclipse to connect and reverse engineer from a MySQL5 database. I can see Eclipse connecting to my MySQL database and can even see the tables through the "Data Source Explorer" view but when I try it after creating Hibernate Console and Configuration files, I get the error: org.hibernate.console.Hibe...

ORM/DAO/DataMapper/ActiveRecord/TableGateway differences?

Can you, please, explain me the differences between the following database representatives, say, in PHP.: ORM DAO DataMapper ActiveRecord TableGateway Any examples would be appreciated. ...

Grouping fields by category and arranging by date, and calculating from another table

I have a products table, with the fields product, category and cost, of type varchar, varchar and decimal. I then have a sales table, with the fields client, productname, quantity, cost, and saledate, of type varchar, varchar, int, decimal and date. I also have a purchases table, with the fields purchasedate, cost, quantity and purchas...

Force a mysql SELECT query to not use cache

I am executing a mysql SELECT statement which takes 30 seconds to run the first time, but then just takes .2 all times after that. I thought clearing the query cache would resolve the problem (RESET QUERY CACHE), but it still takes .2 seconds after that. Only restarting the server reverts the query back to taking 30 seconds, but then it...