database

What do you call your US States table?

Silly question for the masses: Assume you have a table that handles the state of your object as it passes through your workflow. Now assume you have a standard United States State table... What do you call your US State table, without being redundant? Additional Constraint - You can't pluralize your tables. Some thoughts: UnitedStat...

Create table if not exist - unexpected T_STRING

Hi, I am having an issue trying to create a table for a website I am working on, here is the database code I am using but I get an error at line 2. <?php CREATE TABLE IF NOT EXISTS 'speakers' ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `image` varchar(255) NOT NULL default '', ...

Can I switch active_group real time in CodeIgniter?

I want to use a different database that's defined in my $active_group in my database.php Any ideas? ...

Is there a way in phpunit to use the database extension together with the selenium extension?

Basically, I want to run selenium tests that allow the database to be setup to a define status before each Selenium test. How would I do this? ...

SQL Query with Multiple Like Clauses

I would like to create a SQL query, which does the following.. - I have a few parameters, for instance like "John","Smith" - Now I have a articles tables with a content column, which I would like to be searched - Now, How can I find out the rows in the articles table, which has the any one of those values("John","Smith") I cannot use...

Visual Studio 2010 - Schema Compare - Specify Database (Security) Schema

Hello, I am using Visual Studio 2010's database functionality to compare database schemas. I am comparing database#1 and database#2. I would like to compare only only objects within the same security schema within my databases (dbo, myschemaname, etc.) rather than comparing all objects within that database but I cannot figure out how to ...

Database design standards

I'm looking for a document/text/book about the database design standards, until now I've found this but it is a custom set of rules about design, I need something like an IEEE standard or such. Thanks in advance. ...

Flash Media Server + Database Connection? Mysql?

Is there a good way to connect from Flash Media Server 2 to a Database (mysql)? If not, where does everybody store for example their user data? The application crashes once per day, so thats why I need to save the important data into a database. And also to validate certain userdata, for example username/password. Thank you in advanc...

Storing vast amounts of (simple) timeline graph data in a DB

I need to store the number of plays for every second of a podcast / audio file. This will result in a simple timeline graph (like the "hits" graph in Google Analytics) with seconds on the x-axis and plays on the y-axis. However, these podcasts could potentially go on for up to 3 hours, and 100,000 plays for each second is not unrealisti...

MySQL Subquery is failing on MySQL 4.0 with invalid syntax error

I'm running a pretty basic subquery on MySQL 4.0.30. My goal is to get the user permissions from the mysql.user table for any user with grants on a specific database, as noted in the mysql.db table. The query looks like this: mysql> select * from mysql.user where User IN (select User from mysql.db where Db='db_name')\G As you can...

Business objects built up directly from a database query

...What is it called? More elaborate: For my application I created a nice business model to work with as in-memory objects. It's storage and view agnostic. Now, for the storage layer, there's a database: I'll construct SQL queries (the fewer the better) that selects/joins etc. all data I need from the relevant tables. A kind of "middle ...

(memcached + relational db) vs nosql

Memcached + relational db looks like a good solutions if you don't have to scale in magnitude of twitter or facebook... are there reasons when NoSQL would be preferred even if high scalability is not a requirement.. ...

Fast way to replicate a huge database table using java

[BACKGROUND] We are currently trying to solve a performance problem. Which is searching for data and presenting it in a paginated way takes about 2-3 minutes. Upon further investigation (and after several sql tuning), it seems that searching is slow just because of the sheer amount of data. A possible solution that I'm currently inves...

How to connect pyodbc to an Access (.mdb) Database file

Here's what I've tried: -Find Vista's ODBC Data Source Manager* through search, -Add a new File Data Source*, selecting Driver for Microsoft Access (*.mdb), and selecting my mdb file of interest, -import pyodbc from python shell and try: pyodbc.connect("DSN=<that Data Source I just created>") I get the following error message (Port...

php image upload

which is a better place to upload images to? A database or in the web directory? And why? ...

Android: I cant seem to add to my database

So basically my app starts out with a TabView, then through the options menu the user selects to add a game to the database. This opens the InputGame class, which accepts a few values, and then it should put them into a database when the user clicks "Submit". It will also go back to the original home view. The app goes back the the home...

Error with Database in eclipse

Hi, here is my Arrival.java package one.two; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; public cl...

How to sort an event table by time (have different timezones)?

I have a table that is structured the following way (that i can't change): EventName, LocalTime, Timezone Data would be something like this: Event1, 10:00, ET Event2, 11:00, ET Event3, 12:00, ET Event4, 10:00, CT how can i write a sql to sort this by actual time so result would be like: Event1, 10:00, ET Event2, 11:00, ET Event4, 1...

What field type?

I know maybe this is a stupid question, But i suck at sql But what field type should you have on a field that can only have numbers 1 to 5? 5 is max and 1 is min. It's currently int(11) not unsigned I heard having the wrong type can hurt performace Edit: the database is InnoDB. RDBMS is MySQL ...

How to alter the schema of a database to introduce new features or change the current features

I'm developing an app using Zend Framwork using Git for version control. What is the best approach for updating the schema and the database when one of us makes an update to the db structure? currently, we have to blow out the tables and recreate them manually to reflect the new updates. ...