database

ORM vs traditional database query, which are their fields?

ORM seems to be a fast-growing model, with both pros and cons in their side. From Ultra-Fast ASP.NET of Richard Kiessig (http://www.amazon.com/Ultra-Fast-ASP-NET-Build-Ultra-Scalable-Server/dp/1430223839/ref=pd_bxgy_b_text_b): "I love them because they allow me to develop small, proof-of-concept sites extremely quickly. I can side step ...

How to Insert Data on ServerA that comes from Select Data on ServerB?

Scenario: I have a development SERVERA which I need to insert data from my tableA from ServerB TableA. SERVERA.TableA:serialnumber = empty,partnumber=empty Ex: Database connection string1. Select serialnumber,partnumber from ServerB.TableA where (serialnumber='1') Then Database connection string2 Insert into serialnumber,partnu...

The topics that should be covered for learning JDBC

I have been asked to learn JDBC. I do not know where to start. I have started with some books. It's using some SQL tables (I am also new to SQL). So I want any of you to assist me that the topics that should be covered for JDBC. I also want to know how to creae a simple DB in Windows, so that database will be connected to my program. Wh...

How do I make SqlServerCe accessible from my C# app?

I was just playing with databases in C# 2010 Express and while typing 'using System.Data.' the auto-complete thing showed me the SqlServerCe in System.Data as an option. Not sure what I did but when I made a new application and added the line 'using System.Data.SqlServerCe;' I got a "SqlServerCe does not exist" error. I tried adding som...

column _id does not exist

Hi, the error in my logcat is such Logcat 08-29 08:20:57.961: ERROR/AndroidRuntime(1766): java.lang.RuntimeException: Unable to start activity ComponentInfo{one.two/one.two.Booking}: java.lang.IllegalArgumentException: column '_id' does not exist 08-29 08:20:57.961: ERROR/AndroidRuntime(1766): at android.app.ActivityThread.performL...

'Followers' and efficiency

I am designing an app that would involve users 'following' each other's activity, in the twitter sense, but I am not very experienced with database/query design/efficiency. Are there best practices for managing this, pitfalls to avoid, etc.? I gather this can create a very large load on the db if not done properly (or maybe even then?). ...

select name of a person with at most grandchildren

Hi I have a simple table with persons, but there is a additional field witch holds information (person id) who is a father/mother of that person, so the 2 dimensional table can hold a familly tree the table is id first_name last_name salary spouse_id father_id mother_id sex 100 Steven King 26400 101 (null) (null) m 101 Neena Koc...

Get my database under Version Control using a DVCS [Mercurial]

What would be the best approach for versioning my whole database ? Creating a file for each database object (table,view,procedsure..) or rather having one file for all DDL scripts and any new change will be put in a separate file ? What about handling changes made in a Database manager tool ? I'd like to have a generic solutions for ...

Relationship with Tables MySQL

Hello, I have some small issue with relationships with tables as below: I have created a login and registration script which has the following table name: members: fields: member_id, firstname, lastname, login, password Now i have made another table with this table name: phone fields: member_id, phoneid, name, number, prefix, time,...

Delphi Online reports from firebird database

In a Firebird database driven Delphi application we need to bring some data online, so we can add to our application online-reporting capabilities. Current approach is: whenever data is changed or added send them to the online server(php + mysql), if it fails, add it to the queue and try again. Then the server having the data is able to...

System for tracking changes in whois records

What's the best storage mechanism (from the view of the database to be used and system for storing all the records) for a system built to track whois record changes? The program will be run once a day and a track should be kept of what the previous value was and what the new value is. Suggestions on database and thoughts on how to store...

Is Entity Inheritance better done thru a single table or multiple?

I have a table that holds agreement information. It works well for 95% of the agreements we record. But there is a certain type of agreement that would require another 6 or so fields to capture info specific to that type of agreement. My question is if its better to just add those 6 fields to the existing agreement table knowing that t...

changing the primary key value in SQL server 2005

I have a Table which has a Primary Key field which is not set to auto-increment. I want to change one of these primary keys to something different. The problem arises with the other tables relations. The thing is, the guy who built this system did not build relations in SQL Server, but rather manually coded some override in the program ...

Updating a db table based on 2 separate conditions

I need to update my table (dependency) and set a new column (vid) to the nextval of a sequence. I can't change the way data is in the table so please don't mention removing redundant data. However, the where condition is the issue as 2 conditions need to be met (the cols provid and origid). There is a separate primary key (prikey). The ...

Is there a DB deployment tool that will read from subversion?

I would like to have a single application that handles all production database changes. Ideally I would like all changes to be scripted and created in a SVN repository. I would like the deployment tool to take a tag name, extract the scripts from the repository and run them on the production database. Ideally keeping a log of who did wh...

Displaying .Net Page within Page

Hi, So I have a .Net website I made and part of it is a page where a database table can be filtered, queried, and displayed. Then I allow users to select an individual row to either edit or delete. Both of these functions are performed on their own separate pages. Recently I was asked to add functionality to the first page to allow f...

How to get a real time within PostgreSQL transaction?

As far as I understand now() returns the same time during the whole PostgreSQL transaction? But how to get real time? Also, I am interested if there any configuration parameter to limit duration of transaction, so that after this period expiration transaction would immediately fail or somehow else prohibit following queries? ...

What is an optimal solution to store many versioned XML documents?

I need to store many XML documents identified by a unique name, and keep track of their versions. I need to have an access to every document (read, update, delete) through some RESTful API. I need to maintain access control (read/write permissions) for every document (or groups of them). Is there any solution on the market for these nee...

How to compare two databases?

I have two databases that are similar, but not the same. DB 1 is the old one and DB2 is the updated one with lots of new tables, columns, procs, constraint etc. I need to write an update script in order to update DB1 database. These databases have lots of tables and stored procedures. Is there any way to get the differences in two datab...

Books for Building Scalable Web Applications? (DB Performance/Tuning, Networking, General Performance, etc.)

After finishing school in Computer Science and entering the "real world" as a software engineer working on web applications, I've become overwhelmed by the amount of information to be learned about scaling web applications properly. Some topics/questions that have recently popped up for me: RDBMS's vs. unstructured data storage. Advant...