Suppose that I have a table Attendances (id(integer), login_date(date), login_time(time),logout_time (time)). Now I have to change the data type of logout_time from time to datetime. So how it can be possible in Migration ? Because i Tried this statement in new migration.
change_column(attendances, logout_time, time, datetime)
Please s...
Before E F Codd published his paper "A Relational Model of Data for Large Shared Data Banks" in 1970, hierarchal and network were the two prominent models of the database.
What exactly was wrong with them that they did not prevail?
...
Hi,
I'm currently facing a need of creating user frontend application to database with dozens of tables and thousands of fields.
It should be java swing application, and I'm trying to find as most automated solution as possible. Ideally to completely avoid manual creation of DAO layer, beans definition and GUI creation.
Currently we ...
Hi,
I am building a simple CMS to manage articles.
My MS SQL Server 2008 is Hosted in USA, Author of Data Base are situated in USA and Germany.
When a Author create an article in the DataBase I would like record the DATE of creation.
I would like to show the date on the website as would all contents and articles are created from German...
Right now I am using git for Django deployment which seems satisfying to me. My only problem is still how to handle the data in the database properly. Eg. I need often to edit data coming from the prodution site locally and put the data back on the production site (please note I'm talking about data changes and not schema migrations!).
I...
Hi,
MySql:: if field is primary key + auto increment should he also defined as unsigned or mysql doing that by default?
Edit:
I asking because integer unsigned save 2* space vs integer.
I asking about INNODB.
Thanks
...
Hi all,
I'm trying to map my Hashmap in Hibernate.
All examples I can find are simply like this:
class FooBar{
Map<String,String> myStrings;
}
Which would simply map to
<map role="ages">
<key column="id"/>
<index column="name" type="string"/>
<element column="age" type="string"/>
</map>
However, I use a more object-oriented ...
I use the Database Publishing Wizard in Visual Studio to create a script of a test database (schema and data): The wizard creates a file that I store in my source control system. When I make a few changes to the database I want to publish again in order to save the changes in the source control system.
The problem for me is that the wiz...
Hi guys, quite an explanation here, hope someone has the patience to read it through
I'm building an application in Flex 4 that handles an ordering system. I have a small mySql database and I've written a few services in php to handle the database.
Basically the logic goes like this:
I have tables for customers, products, productGroup...
In Oracle PL/SQL, you can always bind your code variables' type to a specific table.column type like this:
myVar TABLE.COLUMN%TYPE
So, if you change the column's type, you don't have to go over your code to re-define related var types (of course you'd still need to check you are properly using the variable).
Is there a similar way to...
Hi everyone, I really hope would know how to do this cause I'm a total newbie to Blackberry development.
Basically, I was asked to write a brief report on how a blackberry would access a DB server like Oracle, and I don't know how a blackberry works well enough to figure this out. I tried searches for blackberry DB on Google and I alway...
Hello-
I asked this over on Superuser and it was suggested I try this here:
Can anyone recommend a quality source to learn databases? I am changing careers and have no background in computers but this is what I have chosen to do now.
I was thinking of taking an intro course at a community college but I have no problem teaching myself ...
I have 2 databases that have the same structure, one on a local machine and one on the company's server. Every determined amount of time, the data from the local DB should be synchronized to the server DB.
I have a general idea on how to do this - create a script that somehow "merges" the information that is not on the server DB, then m...
I've recently been tasked with improving a records database that consists of the following:
All records are stored in one giant
XML file.
Any changes or updates to
these records are done by hand within
this XML file.
Each record contains
an 'Updated' datetime stamp to keep
some form of revision control.
The entire XML file is also ch...
Hey guys!
I'm starting to design a new application that will be used by about 50000 devices. Each device generates about 1440 registries a day, this means that will be stored over 72 million of registries per day. This registries keep coming every minute, and I must be able to query this data by a Java application (J2EE). So it need to ...
Trying to generate an explain plan in SQL Developer, the program puts up a message box with title "failed to query plan_table" complaining "invalid column name". The plan is not generated or displayed. How to fix?
...
I understand a little about Oracle blocking - how updates block other updates till the transaction completes, how writers don't block readers etc.
I understand the concept of pessimistic and optimisic locking, and the typical banking textbook examples about losing lost updates etc.
I also understand the JDBC transaction isolation l...
Hi,
I am trying to create a table to display some data I pulled out from a database into a JSP page (all part of a Struts2 application), and I don't know what I'm doing wrong here...
This is the part of my JSP page where I create the table:
<table>
<s:iterator value="table" id="row">
<tr>
<s:iterator value="row" id="...
Sorry, the question title is somewhat vague, so here's a working example.
I have a table into which each user (userid) gets a value every few days. I want to find the last of those values for each user, broken out by month, and count their number into a range.
Here's an example table and representative data:
CREATE TABLE `datasource` ...
(This question is about the best way to temporarily and programatically keep new records of two databases in sync, having very different schemas, and ignoring the old -outdated and no longer required- records.)
I work on a company that provides TV programming information for guides, newspapers and websites.
I have an old system that ha...