database

heroku not updating database schema

Hello, Heroku doesn't seem to update my database schema when I deploy. Here are the details: Here is what is should look like for the User class: create_table "users", :force => true do |t| t.string "username" t.datetime "created_at" t.datetime "updated_at" t.string "email" t.string "encrypted_password" t.string "salt" t.strin...

Using a db vote table for many arguments tables

Hi, I'm trying to understand if it's right to use one table for votes for more than one argument: table_votes id | vote (±1) | id_user | timestamp | argument_type | argument_id table_photos // could be argument_type = 1 id | photo_file | photo_name | etc. table_house // could be argument_type = 2 id | house_name | etc. My prob...

force new record to be inserted at the end of table?

whenever i delete a record and then insert new one, new record is inserted at the deleted index? how can i force new record to be inserted at the end of table? ...

android sqlite bidirectional synchronization sqlite

I need to sync my Android SQLite DB with my cloud-server DB, and doing it in a bi-directional way in a multiuser environment. I have found and introduction to the solution here (http://blog.deeje.tv/musings/2009/06/notes-on-writing-a-history-driven-client-server-synchronization-engine.html) but I would like to read about a better soluti...

nosql example, which engine ?

a) I have 1000000 domain names b) Every domain has about 100000 sites c) each site has about 10000 visits daily / (5000 unique visits daily) d) As the owner of all those websites, I want to see, how many visitors on selected sites I had in a selected periods of time, for example: How many unique visitor were from 4th December 1987...

Best way to reset database to known state between FlexUnit4 integration tests?

Background: I have a Flex web app that communicates with a Java back-end via BlazeDS. The Flex client is composed of a flex-client module, which holds the views and presentation models and a separate flex-service module which holds the models (value objects) and service objects. I am in the process of writing asynchronous integration ...

A good way to deal with date and time spans?

For my web app i need to handle access requests. Requests are entered for a monday-sunday schedule specifying hours for each day. This week schedule can repeat up to 52 times. A user can have multiple schedules during a week (mon 8-9 and mon 10-11) There are the following requirements: Searchable/filterable Detect overlapping requests ...

how to insert a tree into data base using ER model

Hey today I was in a job interview where they gave us a tree with unknown structure(could b not binary) and i was asked to insert it to a database in a certain order where I could turn back the db into tree and show I have done it using ER model, every node in the tree has two data members data1 and data2 can someone answer or give me...

List of database table types and security permissions?

I can't find any list for the various table types and if possible the basic default 'good practice' security permissions for tables types. I am referring to a complete list like this: http://www.databasejournal.com/features/oracle/article.php/3616476/Types-of-Tables-in-Oracle.htm The above list has few general but not in depth like Look...

Retrieving "likes" tied to users from a database

I'm new to database structure. I'm trying to create an app that allows users to like certain entries, but I want to be able to tie likes to users so that I can change the visuals before/after the like action. I think from research that I should have an 'entries' and 'users' table and then have a 'likes' table that ties the two to each o...

generic database structure help with ASP web forms (microsoft visual web dev)

im trying to create a generic gallery application that uses a database, with the abilitiy to upload images from the website, using microsoft's visual web developer. -- im fairly new with databases and asp.net but am getting the hang of it i think >< most of the examples i see are one mdf file with several tables. but i want something th...

How to make Android app update in execution time.

Hey, Im trying something in android, that has to get the words sent in sms and print on the emulator screen. But the app doesnt update in time. I send a message. Ok. But when I open the app it doesnt print the words that I've sent. So i have to close the emulator and then open it again, and run the app, and the word is there. Id like t...

multiple fixed tables vs flexible abstract tables

I was wondering if you have a website with a dozen different types of listings (Shops, Restaurants, Clubs, Hotels, Events) that require different fields, is there a benefit of creating a table with collumns defined like so Example Shop: shop_id | name | X | Y | city | district | area | metro | station | address | phone | email | website...

How do you change the schema in an OO database such as DB4O?

Just getting started with DB4O object oriented database. I'm very familiar with SQL, if I upgrade the app and add a new field I just go into a SQL manager, change the schema, and initialize a new field with some manual SQL. What is the process with an OO database such as DB4O? Is it similar? ...

Why are the white spaces added to a row in my sql table?

I'm not sure why this is, basically when I insert a row using the following function: public bool CreateUser(string username, string password, string email, int age = 0) { SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString = "Data Source=localhost\\SQLEXPRESS;" + "Initial Cata...

JPA Query - how to get a specific result set?

In an app based on JPA2/Hibernate/Oracle+Spring+Wicket, I use the following model: public class Item { private String name; private Set<Application> apps; private ... } public class Application { private String applicant; private Item item; private Status status; private ... } The mapping between Item and Application is that e...

How to erase all records from a database when using LINQ and tableadapter?

Hi, I am trying to load data from Excel file to DataGridView in my Form. First I load all data from excel sheet into dataset then put all that data in database using C# LINQ and then I just set the DataGridView.DataSource to name.BindingSource and that is it. I get all the data in DataGridView but when I try to load the data again (I ha...

How to connect and use Firebird db embedded server with Visual C# 2010

Hi all I was trying to use Firebird embedded server with Microsoft Visual C# 2010. so here is what I done till now: 1- Downloaded Firebird .Net Data Provider (Firebird Client v2.5.2). 2- Downloaded Firebird Embedded server (Firebird Embedded Server v2.5.0). 3- Added a reference to FirebirdSql.Data.FirebirdClient.dll to my project. 4-...

Make TIMESTAMP column update even though I didn't change anything?

I have a MySql table which has a timestamp column. The table also has alot of other columns. I have a "change classified" section on my page. When users change their classifieds, I want the timestamp to update its timestamp. And it does, but sometimes you don't change a classified at all, you just want it to be "renewed". How can I m...

Is it possible to build UI elements from a database table using the Netbeans GUI designer?

I'm building an application with a form that I'd like to populate with questions from a database table. Is it possible to do this in the Netbeans GUI designer so that each question is inserted into the label of a checkbox element? My initial idea of how to do this would be to get a result set back from the database and loop it, however...