database

Manufacturing Products Database Design

I am designing a database from scratch from manufacturing products. The key design is as follows: (Currently I am working on MS Access 2007 but my final implementation is SQL Server i.e. SQL Server 2008 being the latest version. Also I would be using only Express edition at this movement. The application will involve a .NET storefront in...

Data in different resolutions

I have two tables, records are being continuously inserted to these tables from outside source. Lets say these tables are keeping statistics of user interactions. When a user is clicking a button the details of that click (the user, time of click etc.) is written to one of the tables. When a user mouseovers that button a record is added ...

View all securables for roles in SQL Server database?

How can we show all the securable that is added in any particular role in script? ...

Implement a simple many-to-many relation in a Form in OpenOffice.org's Base

I'm doing a small relational database, to be used by one person on a single computer. I chose OpenOffice.org's Base (version 3.1.1) because it's free and should be more than enough for this case. The simplified version of my problem is: I have an Articles table, with columns: ID, Title, Content, etc.... I have a Keywords table with colu...

Multi-valued Database (UniVerse) -- SM (MV) vs SM (VS) and ASSOC()

I have a question taken from pg 16 of IBM's Nested Relational Database White Paper, I'm confused why in the below CREATE command they use MV/MS/MS rather than MV/MV/MS, when both ORDER_#, and PART_# are one-to-many relationships.. I don't understand what value, vs sub-value means in non-1nf database design. I'd also like to know to know ...

Check if there's a open conection to database asp.net/c#

Everytime my application runs a storedprocedure it does something like this: using (DbBase conn = new DbBase()) { //call sproc } the DBBase() opens the connection with a DataContext from LINQ. What I wanted to know, if there's a way to know if a connection has already been open, and use that instead of opening a new one. That v...

database struct diagram

What are good references for database design diagrams? Examples would be nice. ...

How do I store user input in a database?

I'm a newbie at this, so please be nice to me =^) I'm creating a website with ASP.net and I have a sign up page. The user has to enter a name and password in textboxex, and choose a location and reason for joining from dropdown lists. (There is a built in wizard for new user sign-up but I chose not to use it). I would like to save the i...

CakePHP - how to apply translate behavior to existing database?

Hi! I have and existing application in CakePHP with a database. The task is to apply translate behavior to its models. The problem is that i18n.php script just creates _i18n table but doesn't copy existing data to this table. Don't you know any script that could do that? Thanks for any help. ...

What is the point of database migrations 'down'?

As all databases should be, the source for ours is versioned using source control. The database is upgraded using a series of SQL scripts generated by Red Gate's comparison tool, which is essentially the same as an 'up' migration in the numerous database migration frameworks that seem to have sprung up recently. But what's the point in ...

Insert records into a database from a hashtable

Hi All, I'm looking for any advice on what's the optimum way of inserting a large number of records into a database (SQL2000 onwards) based upon a collection of objects. Currently my code looks something similar to the snippet below and each record is inserted using a single sql simple INSERT command (opening and closing the database...

Advanced Database Design - Whats the most effective way to execute the following...

I am good with ideas, but due to my limited programming experience I sometimes strain to come up with the most effective solution for a given concept. Currently my mind is trying to fathom the most efficient way to reference a database table specific to a data type. Concept I am building an admin interface that allows a site owner to '...

Resetting auto-increment column back to 0 daily

Is there a way in postgresql to have an auto-incrementing column reset back to zero at a specified time every day? ...

Confused by: "when we design and optimize the stored procedures, we have to take into account that fact that they will be running on large database servers"

At work someone said "when we design and optimize the stored procedures, we have to take into account that fact that they will be running on large database servers". I'm confused by that statement in a number of respects: Does "large database server" imply a large volume of data and, if so, how does that impact the design of the store...

Is it safe to set MySQL isolation to “Read Uncommitted” (dirty reads) for typical Web usage? Even with replication?

I'm working on a website with typical CRUD web usage pattern: similar to blogs or forums where users create/update contents and other users read the content. Seems like it's OK to set the database's isolation level to "Read Uncommitted" (dirty reads) in this case. My understanding of the general drawback of "Read Uncommitted" is that a ...

Organising Dbs and tables in SSMS

This is a repost of a question I asked 4 or 5 days ago, with zero response. Hoping for more luck this time... (Using SQL Server 2008) Hi Within the next few weeks I plan to introduce SQL server to an office that is in dire need of a proper data server. Currently there is a heavy reliance on loose Excel and Access file (supplemented wi...

How can I implement a color search for an image gallery?

I'm working on a simple image gallery project and I'd like to implement the ability to search based on a color hex code. So if someone enters 'ff1212' into the search, it will display only those images that contain that particular shade of red. I've seen a website that has a search that works the way I want: http://cssline.com (the AJAX ...

How to connect to SQL Server 2005 database through Ruby

How to connect to SQL Server 2005 database through Ruby in Windows ...

Design Patterns in Database Applications with Java (JEE / JSE)

Hello everybody, I've been reading StackOverflow for quite a while now and I'm only now building the nerve to ask a question. I'm 20 years old and currently enrolled in college in IT here in my hometown (Cluj-Napoca, Romania). Enough for introductions :D. Basically I have my little software firm that provides Book-keeping appz. They're...

Checking for empty xml column

Next query runs successfully: select top(100) * from PackageSessionNodes where Cast(ContentInteractions as nvarchar) != '' Next gives me error Target string size is too small to represent the XML instance update PackageSessionNodes set ContentInteractions = '<contentinteractions />' where Cast(ContentInteractions as nvarchar) = '' ...