database

C Library for compressing sequential positive integers

Hi, I have the very common problem of creating an index for an in-disk array of strings. In short, I need to store the position of each string in the in-disk representation. For example, a very naive solution would be an index array as follows: uint64 idx[] = { 0, 20, 500, 1024, ..., 103434 }; Which says that the first string is at po...

Help with designing a schema for a lyrics database

I'd like to work on a project, but it's a little odd. I want to create a site that shows lyrics and their translations, but they are shown simultaneously side-by-side (so this isn't just a normal i18n of the site). I have normalized the tables like this (formatted to show hierarchy). artists artistNames albums albumNames ...

Is anyone using System.Data.SQLite within SharpDevelop?

I was just wondering if perhaps any of you guys has been successful integrating SQLite into a SharpDevelop project? If that's the case it'd be really interesting if you wouldn't mind to go ahead and share the experience with the rest of us. I've tried the more sort of orthodox approach of using Visual Studio 2008 Express Editions and wh...

Umbraco Database Question- Adding custom tables

I'm working on a site managed by Umbraco. I need to store data about images and clients. I don't think there is any way I can store that data in the existing tables. Is there any reason I shouldn't add the tables I'll need to the Umbraco database, rather than creating a separate DB? I like Umbraco so far but the documentation is a ...

What's the meaning of ORM?

Hi All! I ever developed several projects based on python framework Django. And it greatly improved my production. But when the project was released and there are more and more visitors the db becomes the bottleneck of the performance. I try to address the issue, and find that it's ORM(django) to make it become so slow. Why? Because Dja...

maintaining a record of sql inserts

Is it possible with a mysql script, full of just mysql commands that get filtered into the mysql binary, to do a count of current records in insert into a stats table, perhaps with the time and date automatically generated? I would want to do this, so calculations could be done, eg work out the total number of new records inserted in a...

HABTM relationship on the same table in CakePHP

Hi, I was modeling a social networking style website where people would be able to have other people on their contacts list, i wanted to model this relationship as a HABTM relation on the Same table i.e User, is this a good idea? or is there a better way to do it? ...

Want to make use of a DB without installing a DB engine in .NET

There is a small enhancement I'm adding to an application. It would be nice to provide the user with the ability to filter and sort without having to write a lot of code that's already implemented in a database engine. However, I cannot justify installing a full database environment for this small piece of functionality. I did have an ...

ASP/ASP.net: Web-based JET database management tool?

I need to manipulate some tables in a JET database housed on a web-server: check existing indexes change table cluster/primary key see what tables exist rename tables add tables drop tables browse data etc I don't have the option of installing PlaneDisaster or Access (even if i had it) on the local machine. I've already written a ge...

How to store articles or other large texts in a database

Hello I am currently in the process of designing myself a database driven website. The main reason is for learning purposes but I wont lie, there is a small amount of vanity included! While I believe that my database design is pretty good so far, I am still not entirely sure on the best way of storing articles or other large texts. I...

Generating pages from a database

Hi, I'm looking for some help understanding how to generate pages from a database to create a catalog of items, each with different URLs. All I can seem to find through google are products that will do this for me, or full e-commerce solutions. I don't want a shopping cart! Just an inventory. Also, perhaps someone could recommend their ...

Folder searching algorithm

Not sure if this is the usual sort of question that gets asked around here, or if I'll get any answers to this one, but I'm looking for a pseudo-code approach to generating DB linking records from a folder structure containing image files. I have a set of folders, structured as folllows: +-make_1/ | +--model_1/ | +-default_versi...

Version control Access 2007 database and application

I need to version control a Microsoft Access 2007 database and application. Currently everything is contained in a single mdb file. The application includes: Forms VBA code Actual database I would assume I need to separate the database from the forms/code. I would like to be able to version control the forms/code as text to support ...

Optimally querying a database of ratings?

I have a table of ratings that stores a user ID, object ID, and a score (+1 or -1). Now, when I want to display a list of objects with their total scores, the number of +1 votes, and the number of -1 votes. How can I do this efficiently without having to do SELECT COUNT(*) FROM rating WHERE (score = +/-1 AND object_id = ..)? That's two ...

Syncing between two databases

Hello, I have an application that also has a web interface, one of the requirements is to be able to work on the application even if there isn't an internet connection available. Is there a need to sync between those databases? Those databases are ought to be pretty big disk space wise. If there is such a need how should it be done? What...

Is it really helpful to store content in flat-file than a database for better google/yahoo/bing searches?

I just came across few articles, while selecting a wiki for my personal site. I am confused, as i am setting a personal wiki for my personal projects, i think a flat file system is good, even to maintain revisions of the design documents, design decisions, and comments/feedbacks from peers. But the internet gives a mixed bag of response...

Help with database connection

Hi all, While i am trying login to the application i am getting this error "Cannot open database requested in login 'HealthCare'. Login fails. Login failed for user 'HOME-7A082AE66C\Sumit'." Here is my code: protected void Button1_Click(object sender, System.EventArgs e) { //string uid = TextBox1.Text.Trim(); //string ...

Mysql query: retrieve current date query

In mysql database i have this column called: Name: Date Type: datetime I have few values in that column: 2009-01-05 01:23:35 2009-03-08 11:58:11 2009-07-06 10:09:03 How do I retrieve current date? I am using php. in php: <?php $today = date('Y-m-d');?> How to write a mysql query to retrieve all today date data? Should i chang...

How to know if a WCF DataContract represents a persistent or transient entity?

If you don't want to expose the ID of a domain object to the client of a WCF service, you would obviously not put an ID property in the DataContract, right? But then, when the client calls the save method on your service, how do you know it's a new object, or an existing one that was modified? With NHibernate you can use SaveOrUpdate an...

Can two different sites running on same host, share same database for storage and retrieval?

I am building a personal site, for blog i wish to use wordpress and for a wiki i will use wikia. Is it possible that i use the same database for storing articles from both the frontends (wordpress and wiki). If yes can i some how populate articles from my wiki to the blog, under a specific category. EDIT-- By two different sites I mea...