database

Local Data Cache Sync does not save client changes to sdf file

I created a new c# project and follwed the steps from this tutorial to create a LocalDataCache: http://www.codeproject.com/KB/database/AdoSyncServicesArticalPKg.aspx?fid=1526739&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2794305&fr=1#xx0xx I next added the following code: using System; using Syste...

How do I alter a mysql table column defaults?

I have a table with a column of type timestamp which defaults current_timestamp and updates to current_timestamp on every update. I want to remove the "on update" feature on this column. How do I write the alter statement? I tried the following: ALTER TABLE mytable alter column time set DEFAULT now(); but this didn't work. than...

PostgreSQL and JMS (Or other Pub-Sub/Callback Mechanism)

I want to have my PostgreSQL server send out notifications when a piece of data changes, preferably over JMS, but also considering any other Pub-Sub mechanism or Callback. Any ideas if this is possible? Are there any available Java Add-on Packages that replicate this sort of functionality? ...

PostgreSQL - Updating an Enum Type

I've got a field that is using an enumeration type. I wish to update the enum to have an additional field (I don't want to delete anything, just add a new label). What is the simplest way to do this? ...

Optimize SQL query for canceled orders

Here is a subset of my tables: orders: - order_id - customer_id order_products: - order_id - order_product_id (unique key) - canceled I want to select all orders (order_id) for a given customer(customer_id), where ALL of the products in the order are canceled, not just some of the products. Is there a more elegantly or efficient...

Database visualization tool

I just watched a session of PDC09 about new features of Entity framework in .NET 4. Video page: http://microsoftpdc.com/Sessions/FT10 in the video, (seek to minute 7) presenter used a database visualzation tool to open table and view data. Does anyone know what's the name of it and where I can download? ...

Is there any way to let MySQL server 'push' DB updates to a client program?

A typical scenario: imaging a user is feeding data to MySQL, while a client is connected to MySQL remotely. What I want is that, whenever the user update some fields in the DB, this client can immediately be notified. Think this as the 'push-mail' function from Blackberry. What I do NOT want, is that the client has to 'ping' MySQL se...

Real-time synchronization of database data across all the clients

What's the best strategy to keep all the clients of a database server synchronized? The scenario involves a database server and a dynamic number of clients that connect to it, viewing and modifying the data. I need real-time synchronization of the data across all the clients - if data is added, deleted, or updated, I want all the clien...

PostgreSQL and Point in Time Recovery

I was reading through this: http://www.postgresql.org/about/ And I saw this: An enterprise class database, PostgreSQL boasts sophisticated features such as ... point in time recovery I need some light shed on this subject and its features and examples of it in action or share their own performance experiences? ...

Need a little clarification on MySQL Indexes

I've been thinking about my database indexes lately, in the past I just kind of non-chalantly threw them in as an afterthought, and never really put much thought into if they are correct or even helping. I've read conflicting information, some say that more indexes are better and others that too many indexes are bad, so I'm hoping to g...

Disk-based database caching: Disadvantages?

I'm running a database-backed web site on shared hosting that occasionally gets swarmed after a mention on a link sharing site. Because of how much load the first couple of traffic surges put on the database, I have implemented file-based caching. When a query runs, I just serialize the resultset object and save it to a file. I have a ...

NHibernate Many-to-many with Count

I have entities Post and Tag, where there is a many-to-many relationship between the two (e.g. each post can have one or more tags, and each tag can be associated with any number of posts). What I would like to achieve is to have the Tag entity to have a field providing the number of posts which are associated with that tag. However, I ...

What database tool made these nice-looking diagrams?

I was impressed with the nice-looking database diagrams on this web page. Does anybody know what package made them? http://richarddingwall.name/2009/11/20/the-trouble-with-soft-delete/ ...

Combining multiple sql databases into one database

Hello guys, Here's my problem: I have a website that uses two different nonidentical sql server databases: one that is used to store information about the website users, the other stores information about my online retail store. But my hosting plan would only let me deploy a single database. Hence I want to combine my two databases, to ...

expecting tASSOC in a Rails file

I'm sure I've done something stupid here, but I just can't see it. I call the breadcrumb method in the application view. app/helpers/breadcrumbs_helper.rb says: module BreadcrumbsHelper def breadcrumb @crumb_list = [] drominay_crumb_builder project_crumb_builder content_tag(:div, :id => "breadcrumbs", @crumb_list.ma...

Any sample television databases out there?

I am building a small front-end for a television client. I know the basic database structure but do not want to spend manually inserting all the channel names and show names and timings into the database. Are there any sample databases that I can just use? For instance, I am looking for a database containing tv related information with a...

inner joins in oracle

I was thinking about the syntax of inner joins in Oracle's SQL implementation and here is something that seems a bit inconsistent: Let's say you have two relations loan(loan_number, branch_name, amount) and borrower(customer_name, loan_number). loan_number is the attribute common to both tables. Now, Oracle gives you two ways to express...

omit the first 5 rows?

I want to SELECT all rows except for the first 5 rows in a table. How do I do that? Why cant I just type $query = "SELECT * FROM ages OFFSET 5 ORDER BY id ASC"; ...

select country first from a dropdown menu, then region and then city?

im using html SELECT to make 3 dropdown menues. one for a list of countries, one for regions and one for cities. they all have different tables in the database and they are linked to each other with foreign keys. i want to force the user to first select a country while the other two menues are locked. when he has selected a country he ...

How to create dmp file of Oracle database?

I have database reside in my Oracle 10g, I need to carry it to another PC. What should i do to import and export it to another pc? ...