database

Track changes on a database

I am not sure whether this has been asked before; I did a few searches but nothing appropriate showed up. OK, now my problem: I want to migrate an old application to a different programming language. The only requirement we have is to keep the database structure stable. So no changes in my database schema. For the rest of the applicatio...

Intelligent ways to maintain versioned copies of tables in a relational database (programming considerations?)

Greetings, Just a bit of backgroung information - I am currently working on a relatively large desktop-based requirements management utility, and have come across an issue for which I believe I know the solution, but am hesitant to implement without further thought. Basically, at anytime during the usage of this requirements management...

Develop a fast search functionality in a big forum?

Hello! I am building a forum from scratch in PHP. I have used the most of phpBB:s database structure. But now I am thinking about the search functionality?, what is a good design to be able to search really fast in all posts. I guess there must be some better way than just %query_string% in mysql :) Maybe explode all sentences into wo...

Postgresql: is better using multiple databases with 1 schema each, or 1 database with multiple schemas?

After this comment to a my question, im thinking if is better using 1 database with X schemas or viceversa. My situation: im developing a web-app where, when people do register, i create (actually) a database (no, its not a social network: everyone must have access to his own data and never see the data of the other user). Thats the wa...

When to 'IN' and when not to?

Let's presume that you are writing an application for a retail store chain. So, you would design your object model such that you would define 'Store' as the core business object and lots of supporting objects. Let's say 'Store' looks like follows: class Store implements Validatable{ int storeNo; int storeName; ... etc.... } So, your ...

Does anyone know if Hibernate and java will work effectively with Access?

I have a small project that doesn't require much disk space, so i considered using an access database. I was wondering if anyone used a Spring + Hibernate + access combination, if so can they post the connection properties. thanks guys ...

SQLAlchemy and django, is it production ready?

Has anyone used SQLAlchemy in addition to Django's ORM? I'd like to use Django's ORM for object manipulation and SQLalchemy for complex queries (like those that require left outer joins). Is it possible? Note: I'm aware about django-sqlalchemy but the project doesn't seem to be production ready. ...

What does CNT stand for in naming stored procedures?

There's a stored procedure called "cnt_insertContestEntry" in my company's database. I'm new to database naming conventions. What could CNT possibly mean? Contest? i could ask my co-workers but i don't want to look dumb :p. ...

Django, how to make a view atomic?

I have a simple django app to simulate a stock market, users come in and buy/sell. When they choose to trade, the market price is read, and based on the buy/sell order the market price is increased/decreased. I'm not sure how this works in django, but is there a way to make the view atomic? i.e. I'm concerned that user A's actions m...

Error connecting to Oracle from Visual Studio

I am not able to connect to Oracle using connection string and the correct password. I've tried the same parameters in SQL developer and sqlplus(commandline) and they are working. I even tried changing the password but no use. Any ideas what might be wrong or where should I start looking? The exact Oracle error is : invalid username/p...

DB non-clustered Index on event log date DESC a bad idea?

We have a SQL table that is populated with events from our website (mostly error logging and the like.) The table has several text fields that contain all of the information about the type of event, and a date/time field that shows when the event was logged. The table is fairly large and grows by around 10-100 records per day. Obvious...

Change DAO DBEngine DataTable's column from DataType dbInteger to dbLong in VB6

I've inherited a legacy VB6 app to maintain, and my vb6 is more than a little rusty... I've got a DAO Table that had a field of type DAO.DataTypeEnum.dbInteger that needs to be altered to type DAO.DataTypeEnum.dbLong. Is there a shortcut vb6 way of setting this new data type and retaining the existing values, or do I need to create a t...

SQL Server CE reader problem, it doesn't want to read!

Hello , another sql problem of mine .. this time the reader doesn't work properly ( I think so ) I use this code and I get only 1 record added and my db has 100`s of records .. public void addPosts() { string dbfile = new System.IO.FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).DirectoryName + "\...

multiple has_many associations in Rails

Hi, Let's say you have two models which can be associated in different ways: A User has many conversations they have created. (one to many) A User has many conversations in which they are involved. (many to many) My first thought was to store the id of the user who created the conversation in the conversations table, and associate use...

Report on individual password expiration intervals in Sybase ASE 12.5

I want to run a report to make sure the password of every user is set to expire every 30 days, but the expiration interval doesn't seem to be stored in syslogins? ...

understanding mysql explain

So, I've never understood the explain of MySQL. I understand the gross concepts that you should have at least one entry in the possible_keys column for it to use an index, and that simple queries are better. But what is the difference between ref and eq_ref? What is the best way to be optimizing queries. For example, this is my latest ...

Index not used due to type conversion?

I have a process that is performing badly due to full table scans on a particular table. I have computed statistics, rebuilt existing indices and tried adding new indices for this table but this hasn't solved the issue. Can an implicit type conversion stop an index being used? What about other reasons? The cost of a full table scan is a...

Two threads adding new rows at the same time - how to prevent?

Hi all, In my application, I have couple of threads that execute some logic. At the end they adding new row to some table. Before adding the new row, they check if a previous entry with the same details does not already exist. If one found - they updating instead of adding. The problem is when some thread A do the check, see that no p...

Invalid length parameter passed to SUBSTRING function

Hey all, Having a bit of a run in with SQL and Transactions... hoping some of you can shine a light on the problem. (and maybe even fix my screwed html! Does this site support formatting for different languages? Perl, SQL, Java?) This server runs on SQL Server 2005 and was very recently upgraded from SQL Server 2000. I'll keep an eye on...

C# db application keeps crashing while cleaning tables(?)

Hello, I've got service/application connected to mssql server, and it sometimes crashes terribly with following stacktrace: Uncaught exception: ArgumentOutOfRangeException - Specified argument was out of the range of valid values. Parameter name: capacity, thrown at: mscorlib Stack Trace: at System.ThrowHelper.ThrowArgumentOutOfRange...