database

MySQL Alter Table using existing field values

Hello, I am working with a database that has a table called date, which contains a separate field for day, month, year. Clearly this is not ideal when I am trying to run comparisons, etc. I am wondering is it possible for me to add a DateTime field to each row of this table and insert a concatenated string into the new field from the ex...

Updating 10,000 cck fields daily in drupal

One of our sites has around 10,000 nodes. In each node, there is a simple cck text/integer field. This integer changes daily, so they need to be updated every day. The integer ranges from 1 to 20000000. The cck field is across all content types, so it has its own table in the database. We don't use revisions. I chose to have it rea...

MongoDB PHP: How do I get ObjectId with a JSON feed? (it's blank)

I'm storing a file through GridFS and saving the id like so: $file_id = $gridfs->storeUpload('texture'); $item = array( 'name'=>$_POST['name'], 'description'=>$_POST['description'], 'price'=>$_POST['price'], 'categories'=>$category_array, 'tags'=>$tag_array, 'file'=>$file_id ); $collection->insert($item); and...

Help with a troublesome SQL query.

We have three tables: p: <` +-----+-------+-------+--------+--------+ | pno | pname | color | weight | city | +-----+-------+-------+--------+--------+ | p1 | nut | red | 12 | London | | p2 | bolt | green | 17 | Paris | | p3 | screw | blue | 17 | Rome | | p4 | screw | red | 14 | London | | p5 | cam |...

data access object in python

hello , 6 months ago , i was asked to make a database access for our project that has around 30 tables ,( using the Data transfer object pattern ) . we were using Microsoft's sql server back then. so i had to write a script that automatically generates the DAO's and DTO's.( automatically build classes, name them appropriately according...

How much extra storage does MySQL fulltext index consume?

I am looking for a way to estimate how much extra storage will be needed if a MySQL TEXT column gets a fulltext index. Intuitively speaking the size of the fulltext index is dependent on the total length of text but what exactly is affecting it? ...

Help with database structure

I am trying to create a system which allows local network users to collaborate content together. Requirements: The user should be able to: create content, edit content (content created by anyone), records should be kept on who edited what and when, should easily be able to go back and forth between edits, add comments to pages, sho...

Actions log table structure

Hi, I have to write a service which will implement some kind of a black/white list manager. Short description : It is very similar to messaging in social networks. imagine by default anyone can send you a message. And you have the possibility to block it for everyone, so no one can send you a message. Once it is blocked you can have a ...

how to dynamically update database such that similar strings should not repeat in it

Hi, I am trying to update the database dynamically.But if i enter the same string twice...it is poped twice i m trying to replace it but still not working.Can anyone help me out... ...

Access - VBA Code problem Date- problem

Hey all, have managed to finish the database; but have run into a problem with something I did in the beginning. Basically, the calculations in the database are done using VBA code. Now I've run into a problem where instead of slecting just the last two years worth of data, it is now slecting and using data from more than two years ago. ...

How to upload large SQL Files?

Hi I have a large sql file < 600 MB. This files is backup for forum and I want to upload it to empty db. How I can upload it?? I can't use PHPMyAdmin? and I used BigDump and it doesn't insert all tables. How to do it?? Is there any other way? Thanks EDIT : I don't have access to command line, I just have my CPanel ...

How do I implement a transparent high availability database fail-over solution?

How do I implement a transparent high availability database fail-over solution for my website? ...

Insert data from another DB in tables

Hi all, I'm having some issue here. Let me explain. So I was about done with migration of this project and I've decided to run the test suite to make sure the logic was still working as expected. Unfortunately, it didn't... but that's not the issue. At the end of the suite, there was a nice script that execute a delete on the datas of ...

Storing object graph as of date in a database

I'm going to try to keep this question database agnostic, but I have an interesting problem that I need to tackle and I thought I'd open up the floor for suggestions and feedback. I need to be able to download data from a feed source and store it in a database of some kind, the data needs to be merged into the existing data and I need t...

Android: Bind an ExpandableList to a Dataset, but not directly a database.

Hello I am currentry working on a project and need to display some data in an expandable list. This data might change during the lifespan of the activity. I have the following setup: ListMembersActivity that extends ExpandableListActivity and CustomExpandableListAdapter that extends BaseExpandableListAdapter to get the data and prep...

Constraint is key is index is constraint?

in SQL Server Management Studio (SSMS) 2008 R2 Dev on the table (because I cannot ask without it) --SET ANSI_NULL_DFLT_ON ON create table B (Id int) I create unique constraint ALTER TABLE B ADD CONSTRAINT IX_B UNIQUE (ID) WITH (IGNORE_DUP_KEY = ON) SSMS shows that I do not have any constraint but have a key + index instead w...

LINQ with existing databases and unknown schema

I'm working on a database heavy project, where the Microsoft SQL databases are very mature (16 or more years-old mature), and an old product uses VB6 and ADO to generate sql which interacts with the database. I've been given the task of porting/re-writing the ancient version with a new .NET version. I'd love to use LINQ-to-* to ensure ...

The Javascript Datastore Problem

This might sound super crazy but I really want to know if this can be done. Assume a multi-user site that gives users some tools to build web apps from the site itself (using only HTML/CSS/JS) and share them. Now, if each of the apps were to be assigned a datastore, say just a table for convenience, is it possible to make secure query/i...

Data/Database Design Patterns?

I would like to study more on the subject of complete data design patterns. Specifically, the different mixes of technologies to store, process, cache, and retrieve data. In other words, look at how many components are used in large systems like facebook. To my knowledge, we have RBMS and NoSQL flavors of database categories. However, m...

How to export consistent subset of database

Hi, I'm certain that there must already be a many tools "out there" to do this, but I'm not having much luck tracking them down. I'd greatly appreciate your help. We have pretty big MySQL database, with many tables and some complex table relationships enforced via foreign key constraints. What we need is, to create another, smaller dat...