database

B- trees, B+ trees difference

In a B- tree you can store both keys and data in the internal/leaf nodes. But in a B+ tree you have to store the data in the leaf nodes only. Is there any advantage of doing the above in a B+ tree? Why not use B- trees instead of B+ trees everywhere? As intuitively they seem much faster. I mean why do you need to replicate the key(data) ...

How would I go about making an efficient key value store (e.g. memcache) / simple database?

For a few projects I'm working on I need a persistent key value store (something akin to memcache). It would ideally run as a server; it needs to be really efficient. I'm aware that memcachedb exists, but I'd like to have a go at writing it myself as there's going to be a lot of custom functionality that I'll need to include later on. I'...

Scripting out Oracle objects

I have recently been given an existing oracle database that i want to script out the various objects and its static data so that i can place the objects under source code control and when necessary rebuild the database from scratch. Does any one have any scripts or tools that i could look at to assist me. ...

Is this PHP class optimized for mysql database access?

I've wrote a quick PHP class to ease the access to a mysql database. The class works ok, and has a query() method that opens up the connection, executes the query and then closes the connection (I know that the connection is supposed to close by PHP itself after the script finishes, but I don't like to rely very much on that). From a pe...

Unable to cast object of type 'System.DBNull' to type 'System.String`

I got the above error in my app. Here is the original code public string GetCustomerNumber(Guid id) { string accountNumber = (string)DBSqlHelperFactory.ExecuteScalar(connectionStringSplendidmyApp, CommandType.StoredProcedure, "GetCustomerNumber", ...

Entity Attribute Value Database vs. strict Relational Model Ecommerce question

It is safe to say that the EAV/CR database model is bad. That said, Question: What database model, technique, or pattern should be used to deal with "classes" of attributes describing e-commerce products which can be changed at run time? In a good E-commerce database, you will store classes of options (like TV resolution then have ...

Best storage approach for small amount of 99% static data needed at startup?

I have some (small amount) of data that I'll need quick access to on inital load, but not after that. Right now, I have serialized the data (Generic List) to an Xml file and I'm deserializing it on load as needed. My question is should I use the XmlSerializer or the BinaryFormatter? I'm not worried about file size, but serialization sp...

In-memory Java database that I can persist (as a single huge blob of memory)

I am looking for an in-memory relational (SQL) database for Java (something like HSQLDB), whose whole state I can serialise. wholeDatabase.serialize(outputStream); newCopyOftheDatabase.loadFrom(inputStream); Or maybe the DB only uses a byte[] that I give it on initialization: byte[] memory = new byte[10 *1024*1024]; new InMemoryDatab...

How to prevent duplicate entries in an Access database using c#?

i have a table of MS Access which contains one column and many rows. The value of a textbox saved to this table. I want to prevent duplicate entries from being submitted. For example, if I type "ankush" in the textbox and this entry already exists in table, then I want to display a msgbox saying that this already exists in the table....

Where to find .Net ORMs comparison with numbers or charts?

Where to find .Net ORMs comparison with numbers or charts? I am building a new websites, will work on arranging images and manipulate images online, so it will contain a lot of images, and sure many images make the website pages load slower. So the speed of the data access layer very important for me, and i am searching for an ORM beca...

Querying real time data from an SQL database sudden latency problem.

We are testing an application that is supposed to display real time data for multiple users on a 1 second basis. New data of 128 rows is inserted each one second by the server application into an SQL datatbase then it has to be queried by all users along with another old referential 128 rows. We tested the query time and it didn't exce...

Where can I find free open source dbexpress driver for mysql

I need a dbx driver for mysql. It should be free. Open source is appreciated. (delphi 7+ and mysql 5+) ...

Delphi - Database Server

Hello everyone. Which of the Database servers would you people recommend for using in a moderate-to-large scale (will vary from customer to customer) application. I know MS SQL but since the app will be developed using delphi the .net framework is kind of annoying to deploy aswell. Also how realiable is Interbase. Thanks in advance. ...

ADO.NET: Need help to understand the basics of 'Dataset'

Dear Helpers As context, I am new to ADO.NET and have been using 'Programming ADO.NET 2.0' by David Sceppa to help build my knowledge. I have been trying to understand the Dataset object but think I may have completely misunderstood the point and am looking for guidance. As an example, I have built a really simple Form with a combobo...

Book about Database creation

I'm creating a database from scratch. I'm not intended to make it public, it's just my small project for my own purpose. ;-) I have already implemented B+-tree indexes, searching, inserting, deletion and many other basic features... But now, I want to know how to implement advanced topics as Transactions or Replication. Is there any goo...

Simplifying SQL Server's Logins/Owners/Schemas/Roles/Principals etc...

I frequently develop small internet applications using ASP.NET and SQL Server 2005. My databases are always only accessed by one application through an ASP.NET web service or something similar. When I'm developing an application and moving a database back and forth between my development computer (SQLExpress 2008) and hosted server (SQ...

Coding practice: how to avoid hard coding?

I have a table in the database that store 4 category and the structure of the table is ID (GUID), description. I load the category into a dropdown list (asp.net webform) to allow people to select a category and based on what they selected. I'll then display info associated with their selection and hide the others. Currently, i do a "se...

How to check for the existence of a DB?

Hello all, I am wondering if there is an elegant way to check for the existence of a DB? In brief, how do test the connection of a db connection string? Thanks ...

Can't connect to SQL Server 2005

Hey all, I just installed SQL Server 2005 on my machine and now I am trying to connect to it via SQuirrel SQL, but I am unfortunately running into problems. When installing SQL Server 2005 I chose mixed mode for authentication and I have set up a new user account with which I am trying to connect. I also have installed the Microsoft SQ...

Zlib in database - Django

When I try to put a zlibbed string in models.TextField >>> f = VCFile(head = 'blahblah'.encode('zlib')) >>> f.save() it fails: ... raise DjangoUnicodeDecodeError(s, *e.args) DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: unexpected code byte. You passed in 'x\x9cK\xcaI\xccH\x02b\x00\x0eP\x03/' (<type...