database

In Django, how do I objects.get, but return None when nothing is found?

go = Content.objects.get(name="baby") # go should be None, since nothing is in the database. ...

moving database schema over to drupal

I'm creating a web application and I just want to know how to think about Drupal's db coming from an MVC background. I have tables to represent people's data such as SSN, First Name, Last Name, Zip Code, Address, Language, Location. Now on the front end I want to create a form to populate this information for a bunch of subjects (people)...

Using a ListAdapter to show database data

public class List_View extends ListActivity { private TextView toptext; private TextView bottomtext; DBAdapter db = new DBAdapter(this); public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.list); getData(); toptext = (TextView) findViewById(R.id.to...

Specifying index in HQL queries

Is there a way to specify which index to use, in HQL, to retrieve values from a MySQL table that has an index defined? ...

Any tool to convert mysql store procedure to ms sql server store procedure?

Hello all, I have to migrate database from mysql to ms sql server 2005.I imported table successfully, now i need to convert store procedure written in mysql to ms sql server 2005.i need to convert a ton of sp so manual conversion is a tedious task, is any tool or simple way to convert sp of mysql to sql server 2005. ...

Printing an ER Diagram for mySQL database (800+ tables)

We have a system built by Parallels, which is relying on a huge (800+) tables to maintain everything. I need to learn this system, in order to be able to write queries to retrieve data for report generation on various needs. I am obviously, having difficulties isolating which tables are currently relevant for the task at hand, so I tho...

How to display the phones SQLite database via SDK?

I'm currently doing some debugging and I was wondering is it possible to display the contents of the phones SQLite database via the SDK? I know it's possible to do this via queries phone side. But I was just curious could you do it via the SDK? ...

php: Database accessing Error

Hi all, I have used "DB.php" package to do the database operation . In my file I have connected the database and access the table values. It is working fine. when I am running in command line interface . But When I am running that php file in web browser it telling me following error Note :I am Using pgsql database Can't connect...

What's the best way to store a value from a list of pre-defined values in a database?

Let's say I have a pre-defined list of values (RW, FW, 4W) representing drive type of a vehicle: RW - Rear Wheel FW - Front Wheet 4W - Four Wheel Now, I want to take a value from the above 3 values as an input from my user and then store it in a database. Upto my knowledge, I can perform this with the help of any of the following me...

purchased software

I bought usage rights to a confederate soldiers database which is in sql, I bought it to intergrate with my wordpress genealogy blog, and I need to know if there is any way to do this, the place where I purchased will not give my money back, and are not very helpful as far as figuring this out. thanks, r. summers ...

How do you create a mdb database file in Python?

I would like to create a mdb database file in windows with Python and can't seem to figure it out with the Python Docs. Everything I read about is related to making a connection and what to do with the cursor. Any thoughts? Thanks... ...

Use all backup sets to restore database with SMO

Hi, My problem is really simple. I have a .bak file that contains one or more backup set. When I'm using SMO to restore the database with this .bak file, it only takes the first backup set to do its work. It seems to ignore the remaining sets. Why's that ? See my code : //Sets the restore configuration Restor...

Synchronizing sqlite database from memory to file

I'm writing an application which must log information pretty frequently, say, twice in a second. I wish to save the information to an sqlite database, however I don't mind to commit changes to the disk once every ten minutes. Executing my queries when using a file-database takes to long, and makes the computer lag. An optional solution...

Maintaining Referential Integrity on Insert with NHibernate

I have figured out a lot about nhibernate, but this seems to be my final hurdle of not understanding what is going on. So here is the problem. I have a basic databas structure: Shows: ID [Pk] CountryID [Fk] Name Countries: ID [Pk] Name CountryID has a foriegn key reference from shows to countries table primary key, and countries is ...

Can I generate CREATE TABLE from a visio diagram?

I have a database diagram done up in Visio 2003 Professional. Is there any way to re-engineer the database from the diagram? ...

What is the format of a data dictionary?

Are there any standard examples/ samples of data dictionaries that document a database. ...

Looking for data set to text FULLTEXT style searches on

Hi, I am looking for a corups of text to run some trial fulltext style data searches across. Either something I can download, or a system that generates it. Something a bit more random would be better e.g. 1,000,000 wikipedia articles in a format easy to insert into a 2 column database (id, text). Any ideas or suggestions? ...

download database to iphone

The app I'm writing needs to get information from a remote database and then store it in the SQlite database on the iphone for offline use. As of now I'm using a php script to querry the database and then just basically scrapping the html data from the php echo calls. My problem is that now that I'm moving away from test data I'm using...

Which is faster: Working from memory or lots of queries?

You need to pull a large amount of data (thousands of entries) from a local SQL server to be used in generating a report. You have two options: 1) Use a single query to get the data from the server, load it into a .NET data table and use a series of loops to get the information you need 2) Perform an SQL query each time you need a rec...

Testing database on Android: ProviderTestCase2 or RenamingDelegatingContext?

Hi there!! I've implemented access to a database using SQLiteOpenHelper of android.database within some classes (with pattern DAO). I wrote some junit tests for these classes using a AndroidTestCase but this cause the tests to use the same database of the application. I red ProviderTestCase2 or RenamingDelegatingContext can be used to te...