Rake just one migration
Hi, I'm trying to run just one migration out of a whole bunch in my rails app. How can I do this? I don't want to run any of the migrations before or after it. Thanks. ...
Hi, I'm trying to run just one migration out of a whole bunch in my rails app. How can I do this? I don't want to run any of the migrations before or after it. Thanks. ...
Hello I'm curious to know how big sites spread the load between the different DB server in the case where users write as much as they read, ie. when the standard solution of having one master to accept write, and several slaves that only let users read data doesn't work because it simply turns the master server into the bottleneck. For...
Here’s a really really super-basic question. Say I wanted to build – today – an enterprise CRUD application in .NET that had an n-tier architecture. What data access approach should I use? I want interoperability, so DataSets are out (and I suppose it’s not 2003 anymore, either). Likewise, .NET RIA Services’ advertised method of expo...
Hi all. I've managed to do some ant-script to populate my databases.. (simple script that runs some .sql files, like 'create', 'populate', 'drop', etc.) Is there any way in hell that an ant-script can create the database itself from scratch? This is for JavaDB-Derby (from the glassfish bundle). Since it's a project for university, we f...
I am trying to choose between postgre and firebird databasses. The database will be installed on a windows 2003 server with asp.net 3.5. i don't want to use sql server because of price issues and I don't want MySQL I had a bad experience with it and the .net connector and the membership provider. ...
How can you find whether the SQL query type is DDL or DML? ...
I have a list of categories on my webpage. They are stored on mysql and each category has an id number next to it. The categories are in divs that when selected change color and whatnot, and when not selected, another color. Only one can be selected at a time. I am trying to figure out how to tell the webpage, which cat has been selec...
Hi all, could you point me to a good place to start with Oracle stored procedures syntax/usage? I can't seem to find any good place there. I'm fairly proficient in (java, C/C++) programming and I do know enough SQL for my needs right now, but I've been suggested to use stored procedures to do my business, which is: Take results from a q...
I know in Access there is a way I can visualize the relationship between tables in a diagram - kind of like an ER diagram. I am new to Oracle. I am wondering if I can do the same/similar thing with Oracle. Could someone give some suggestions? ...
OK So I've got my models like so: Team has_many :users, :through => memberships User has_one :user_status Now in my Team model I want to be able to find the maximum 'updated_at' value of my 'user_status' models. I tried doing something like: Team has_many :users, :through => :memberships has_many :user_statuses, :through =>...
Hallo, I need to merge users from several souces some how, for example facebook, Google, plaxo... Currently I have this structure in my database: USERS_MYSITE mysite_user_id | parameter | value ------------------------------------------ 223 | firstname | Tom 223 | lastname | N. 223 ...
I have a table with a compound index that wasn't created through a rails migration. Now, I need to create a rails migration that will delete this index and create a new one, but I don't necessarily know what the name of the index will be. I know that it is possible to get a list of table names and column names within a migration step. I...
I am interested in monitoring some objects. I expect to get about 10000 data points every 15 minutes. (Maybe not at first, but this is the 'general ballpark'). I would also like to be able to get daily, weekly, monthly and yearly statistics. It is not critical to keep the data in the highest resolution (15 minutes) for more than two mont...
I have been working on VB6 database desktop programming, but now a client is asking for a simple web interface (some inserts into SQL Server db used by a desktop application). The question is: Which approach is better? 1)creating asp.net project, connected directly to the SQL Server database; 2)creating separate (simple) mysql datab...
Our client wants to transfer all the data in the Production CRM 4.0 database and use it in UAT. What is the best way to transfer the data over. ...
It appears the class constants only cover PDO::PARAM_BOOL, PDO::PARAM_INT and PDO::PARAM_STR for binding. Do you just bind decimal / float / double values as strings or is there a better way to treat them? MySQLi allows the 'd' type for double, it's surprising that PDO doesn't have an equivalent when it seems better in so many other way...
What are good sizes for data types in SQL Server? When defining columns, i see data types with sizes of 50 as one of the default sizes(eg: nvarchar(50), binary(50)). What is the significance of 50? I'm tempted to use sizes of powers of 2, is that better or just useless? Update 1 Alright thanks for your input guys. I just wanted to know ...
I have a database table (sqlite) containing items that form a tree hierarchy. Each item has an id field (for itself) and a parentId for its parent. Now given an item, I must retrieve the whole chain from the root to the item. Basically the algorithm in pseudocode looks like: cursor is item retrieve parentItem for cursor by parentId if...
Hello. I've done a site using ASP.NET MVC, NHibernate and MySQL. In my project, I have some repositories classes, each one with methods using codes like this: using(ISession session = NHibernateHelper.OpenSession()) { using(ITransaction transaction = session.BeginTransaction()) { session.Save(cidade); transaction.Commit();...
Hi all, I have a table called "Sentence" that has the following fields: ID <--- OK NextID <--- FK To ID Text So if I had the following records: *ID* *NextID* *Text* 1 12 The quick 3 40 jumps over 5 null lazy dog. 12 ...