database

AdventureWorks presentation

Hello all, I want to implement an application (scholar exercise) over the AdventureWorks database. I have downloaded the diagram. Is there a less formal description of the database? Thanks, Lucian ...

migrate from oracle to mysql

Hi All, Pls, could you help me on the following issues: I would like to migrate from oracle to mysql and one of important step is to replace the actual job built on oracle environment; Basically every day I receive from other oracle environment some 'oracle' dump files (mainly CTL or oracle table exports). Today my oracle jobs load the...

Best Practice for Designing User Roles and Permission System ?

I need to add user roles and permission system into my web application built using PHP/MySQL. I want to have this functionality: 1- One root user can create sub-roots, groups, rules and normal users( all privilegis) . 2- Sub-roots can create only rules, permissions and users for his/her own group ( no groups). 3- A user can a...

How should methods updating database tables be unit tested?

I have an application that is database intensive. Most of the applications methods are updating data in a database. Some calls are wrappers to stored procedures while others perform database updates in-code using 3rd party APIs. What should I be testing in my unit tests? Should I... Test that each method completes without throwin...

Refactoring a Hibernate entity into subclasses

I have a class that is currently mapped as an entity in a database table using Hibernate. This class should be refactored into an abstract class containing some field common to all of its subclasses. I'm using annotations for mapping hibernate entities/relationships classes. I would like suggestions/variants on how to do this refactori...

What is the most efficient way to store tags in a database?

I am implementing a tagging system on my website similar to one stackoverflow uses, my question is - what is the most effective way to store tags so that they may be searched and filtered? My idea is this: Table: Items Columns: Item_ID, Title, Content Table: Tags Columns: Title, Item_ID Is this too slow? Is there a better way? ...

What's best way to secure a database connection string?

I am writing a set of database-driven applications in PHP. These applications will run on a Linux server as its own user. Other users will likely be on the system at times, but have very controlled access. Other servers they will not have access to at all. I will also expose a limit stored procedure API to developers who need to writ...

Creating a custom ODBC driver

At my current job, we're looking to implement our own odbc driver to allow many different applications to be able to connect to our own app as a datasource. Right now we are trying to weigh the options of developing our own driver to the implementation spec, which is massive, or using an SDK that allows for programmers to 'fill in' the d...

VS 2008 Team Suite Database GDR - MySQL Provider

I've had a look on google for alternate providers for the new GDR but couldn't find any. Does anyone know of a MySQL project that is attempting to create a provider? ...

How bad is it to store class and assembly names in the database?

In brief: Is it ever excusable to have assembly names and class names stored in the database? Does it break the layers of an application for the data layer to have explicit knowledge of the internals of the business layer? Full explanation: I have a boot strapper that runs "jobs" (classes that inherit from a common base) that exist in...

Which database systems support an ENUM data type, which don't?

Following up this question: "Database enums - pros and cons", I'd like to know which database systems support enumeration data types, and a bit of detail on how they do it (e.g. what is stored internally, what are the limits, query syntax implications, indexing implications, ...). Discussion of use cases or the pros and cons should take...

How can I implement SQL INTERSECT and MINUS operations in MS Access

I have researched and haven't found a way to run INTERSECT and MINUS operations in MS Access. Does any way exist ...

Pros/Cons of document based database vs relational database

I've been trying to see if I can accomplish some requirements with a document based database, in this case CouchDB. Two generic requirements: CRUD of entities with some fields which have unique index on it ecommerce web app like eBay (better description here). And I'm begining to think that a Document-based database isn't the be...

Tracking of messages from external program to biztalk and back

Hi! I have an external program that will generate an xml document out from the db and pass it to BizTalk. Is it possible to create a transaction id or something(the id the message as in the DB) so I can keep track of the message in BizTalk, and store information in a BizTalk custom Pipeline to the database with the given transaction id?...

What's the best practice for primary keys in tables?

When designing tables, I've developed a habit of having one column that is unique and that I make the primary key. This is achieved in four ways depending on requirements: Identity integer column that auto increments. Unique identifier (GUID) A short character(x) or integer (or other relatively small numeric type) column that can serv...

Inverse of SQL LIKE '%value%'

I have a MySQL table containing domain names: +----+---------------+ | id | domain | +----+---------------+ | 1 | amazon.com | | 2 | google.com | | 3 | microsoft.com | | | ... | +----+---------------+ I'd like to be able to search through this table for a full hostname (i.e. 'www.google.com'). If it were t...

How do I access database via virtual folder which points at a remote share

I'm having a problem getting access to a database which lives on a remote server. I have a ASP.NET 2.0 webpage that is trying to connect to a database. The database is accessed via a virtual folder (which I set up in IIS). The virtual folder points at a remote share which contains the database. The virtual folder (in the web apps ...

Better languages than SQL for stored procedures

I'm getting increasingly frustrated with the limitations and verbosity required to actually commit some business logic to stored procedures, using languages such as Transact-SQL or PL/SQL. I would love to convert some current databases to Oracle and take advantage of its support for Java stored procedures, but that option is not availab...

Retrieve the uniqueidentifier key value for a record

Hello everybody, in context of SQL Server 2005, I have a table for which the primary key is a uniqueidentifier (GUID), with a default value generated by the newid() function. I want to write a stored procedure that inserts a new record into the table. How do I get the record's PK value? for an identity-declared field, this is easy - I c...

Which is the best method to save data in Delphi

I work on a program in Delphi that holds a lot of data, and I wonder which method is the best to save it to file. Now we use records and "file of" to save it but I think it should be better methods. I would prefer a system that makes it easy to migrate from the system we use now. EDIT: The application is a sort of a database application...