database

How to make database field readonly in rails.

Hey folks, I have a database table with a certain field which should be impossible to update once it has been inserted to the database. How do I tell my model that it shouldn't allow updating of a certain field? Best Regards, x3ro ...

what is the best database connectivity support library framework for c c++?

tell me about the best database connectivity support library framework for c c++ ...

Include database data when exporting an Android application

I export my application to .apk file, sign it then install it. But when I run my App, it displays an error because there's no data in my database. The database was created as a new one when I installed the application, so all the data were lost! How can I include database data when exporting an Android application? ...

Hibernate mapping for situation, where the the key is also used as many-to-one parameter

I was wondering if there is a way to do Hibernate mapping for the following. My two days spent on this say there isn't. There are two tables, having one to many relationship. +---------------------+ +-----------------+ | versioned_entity | | basic_entity | +---------------------+ +-----------------+ | fk_BasicEn...

JPA cache up-to-dateness with concurrent access to the database

A service tier that implements its persistence based on JPA can profit hugely from the second-level cache that is managed transparently by the JPA provider (e.g. Hibernate, Toplink/Toplink Essentials etc.). When this cache is activated, it holds instances of the persistent classes as soon as they were loaded from the database for the fir...

Automatically backup SQL Server database

I need to backup SQL Server database. Is it possible to do this automatically without human intervention at regular intervals? If so yes then please suggest me how to do it and I'm using SQL Server 2005 Express Edition. ...

Document databases/Key-value stores for use with .Net projects

Are there any document databases and/or key-value stores (something like Project Voldemort, MongoDB, etc.) that work well with .Net projects? Most of the options I've looked at so far seem to be more geared towards the non-Microsoft/Java/open-source technologies and I was wondering if anyone had any experience/recommendations with such ...

Is there a general term for a pairing of tables where one has header information and the other has detail lines?

Is there a general term for a pairing of tables where one has header information and the other has detail lines? For example, a pair of tables describing sales orders, or a pair storing bill of materials data. ...

Best database design for a "sensor system"

I'm doing a schoolwork and.. I have to do a vehicle tracker system. I thought of these three designs. What do you think? My database schemas (png at ImageShack ~99KB) http://img390.imageshack.us/img390/3781/des.png Opinions? ...

Greenleaf Database Library in C#

I am creating a WPF application that will integrate with an existing system using a Clipper database. I have been working through some issues trying to access char fields with lengths greater than 255. The Jet and FoxPro OLEDB providers seem to cut off the data in these larger fields. I have modified and used the DotNetDBF library but...

Database: SQL Pagination ?

I'm using MySQL. I want to limit the amount of rows fetched from the database. I have a SQL statement that returns 10,000 records which are all relevant to the search. SELECT colA, colB, colC FROM xyzTable WHERE ... ORDER BY colA I know how to use the TOP statement to return the TOP x number of rows fetched but how do I fetch rows r...

Database: SQL Pagination - How many pages?

I'm using MySQL LIMIT to display 50 rows (pages) at a time, like so: SELECT cols FROM table LIMIT 49, 50 What's the most efficient way for me to determine how many "pages" I have in my result set (how many total records my query is producing)? Before I run the code above, should I just run a quick and dirty: SELECT COUNT(cols) FROM ...

MySQL - Query All users WITHOUT an appointment

If I have two tables: Users and Appointments. How would I query the db to find something like the following: SELECT * FROM users WHERE (none of: appointments.user = user.id) I am assuming I would need some type of join with the appointments table, just not sure where to start. ...

How to merge Drupal database changes

We currently use an SVN repository to ensure everyone's local environments are kept up-to-date. However, Drupal website development is somewhat trickier in that any custom code you write (for instance, PHP code written for a node body) is stored in the DB and the changes aren't recognized by the SVN working copy. There are a couple of d...

Can you provide some advice on setting up my database?

I'm working on a MUD (Multi User Dungeon) in Python and am just now getting around to the point where I need to add some rooms, enemies, items, etc. I could hardcode all this in, but it seems like this is more of a job for a database. However, I've never really done any work with databases before so I was wondering if you have any advic...

What are the methods for identifying unnecessary columns within a covering index?

What methods are there for indentifying superfluous columns in covering indices: columns which are never searched against, and therefore may be extracted into Include's, or even removed completely without affecting the applicability of the index? ...

Database Mocking on a large system in Silverlight and RIA Services

I am using Silverlight, Ria, and the Silverlight Testing Framework. I am trying to build a mock database and have run into a few issues. First the example on the RIA site does not use the silverlight testing framework so I am not able to use it. Second The other example that I have tried does not seem very scalable. Since I need to mo...

Ideas to manage IP and Ports in Key/Value format?

I'm looking for a good and fast way to manage IP addresses and ports in a file. Sort of a DB Table that has 2 columns: IP and Port, but in a file, without using a DB. It has to support adding, deleting and updating. I don't care from concurrency. Thanks. ...

Maximum number of rows in a sqlite table

Give an simple sqlite3 table (create table data (key PRIMARY KEY,value)) with key size of 256 bytes and value size of 4096 bytes, what is the limit (ignoring disk space limits) on the maximum number of rows in this sqlite3 table? Are their limits associated with OS (win32, linux or Mac) ...

A database for python 3?

I'm coding a small piece of server software for the personal use of several users. Not hundreds, not thousands, but perhaps 3-10 at a time. Since it's a threaded server, SQLite doesn't work. It complains about threads like this: ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was ...