database

Generate Data Change Scripts from VSTS Database Edition

I'm using the GDR release of VSTS Database edition source control the DB and generate deployment scripts. It works pretty well but the problem is that it only seems to handle scripting and deploying the schema. It stops short of handling scripting and deployment of the actual data itself (i.e. the lookup and standing data which also de...

Is there something similar to LINQ in Objective-C?

I wonder if it is possible (and how) to provide a class in Objective-C with something like: Person.Select(@"Name").OrderAsc(@"Name").Where(@"Id").EqualTo(1).And(@"Id").NotEqualTo(2).Load<Array> That could be very handy for a project I'm doing. I like this way of coding present in Django & SubSonic. ...

What costs more: DataSets or Multiple Updates?

Hello all, If my program was to hit the database with multiple updates would it be better to pull in the tables into a dataset, change the values and then send it back to the database. Does anyone know what's more expensive? ...

Schema design for when users can define fields

Greetings stackers, I'm trying to come up with the best database schema for an application that lets users create surveys and present them to the public. There are a bunch of "standard" demographic fields that most surveys (but not all) will include, like First Name, Last Name, etc. And of course users can create an unlimited number of ...

Are stored procedures obsolete?

Duplicate: http://stackoverflow.com/questions/216569/are-the-days-of-the-stored-procedure-numbered Background We have a consultant who develops web applications using PHP and Ruby on Rails (RoR) who is responsible for designing/maintaining/developing a small web application for our company. I needed to build a data-feed from his MyS...

Choosing a method to store user profiles?

I'm in the process of working on a user profile system for a website and am pondering what would be a better (scalable) approach to take. I've come up with two solutions and am looking for either input or perhaps pointers to something I might have missed. The following create table statements are not meant to be executable but are merel...

Trying to design/model simple database app

I'm trying to learn more about db interactions which has me developing a local app to get started. Well, basically, what I've done so far has had some mixed results and I've changed so much stuff I'm not even sure what I've change at this point, lol. I'm not quite sure one of my tables was correct, so I've decided to just start that over...

How to calculate difference between tables in MySQL?

What is a good way to calculate difference (in a sense what should be added and deleted from one table to get another) between tables in MySQL? ...

How do I run that database backup and restore scripts from my winform application?

I am developing a small business application which uses Sqlserver 2005 database. Platform: .Net framework 3.5; Application type: windows application; Language: C# Question: I need to take and restore the backup from my application. I have the required script generated from SSME. How do I run that particular script (or scripts) from m...

Database Inheritance Select

For my university assignment I have to design some basic managment system for sicknesses and all for a school. I have decided to model some basic inheritance in the form of Person --> Student Person --> Staff Person --> Guardian Person (PersonID, FirstName, LastName) Student (StudentID (Which references the PersonID), ... ) The re...

php - inserting the values of multiple checkbox selections

the site i'll be refering to is http://www.iaddesignandstudio.com/offline select the quote tab if a person where to fill out this form and select more than one checkbox in either number 1 or number 3. how would i insert those selected values into a database so that when i retreive the information the user inputed or selected i can see ...

Data driven design problem - data counting

I want to provide about 10 different 'statistics' to my users. Each stat represents the count returned by a different query of my database. Each stat/query is specific to the current user. What is going to be the most efficient way to achieve this? Am I right to think that running the stat queries, for each user on each page of my site (...

NHibernate Mapping/Design advice - join tables

Hi, I have a design issue that I would appreciate some input on. I would like to make an calendar event system based on the following 4 tables: tb_events id, date, summary, tb_group id, name, parent, lineage, tb_course id, name, tb_staff id, name, email, The event class is currently set up as id summary date calDetails IL...

Good tool to visualise database schema?

Are there any good tools for visualising a pre-existing database schema? I'm using MySQL if it matters. I'm currently using MySQL Workbench to process an SQL create script dump, but it's clunky, slow and a manual process to drag all the tables about (which would be okay if it wasn't so slow). ...

how to restrict or filter database access according to application user attributes

I've thought about this too much now with no obviously correct solution. It might be a real wood-for-the-trees situation, so I need stackoverflow's help. I'm trying to enforce database filtering on a regional basis. My system has various users and each one is assigned to a regional office. I only want users to be able to see data tha...

How to export a DB2 database without a DB2 server

I have a db2 database file, but do not have a db2 server. I would like to export this data into something else (e.g. SQL, but it doesn't really matter what), without having to setup a full db2 server (I started looking into this, but it seems very involved). Ideally the tool would run on (Debian) Linux, but Windows/OS X is fine if nece...

Table Module vs. Domain Model

I asked about Choosing a method to store user profiles the other day and received an interesting response from David Thomas Garcia suggesting I use the Table Module design pattern. It looks like this is probably the direction I want to take. Everything I've turned up with Google seems to be fairly high level discussion, so if anyone coul...

What is your preferred document format for documenting databases

I am in the process of writing an application which, among other functionality, generates MediaWiki documentation of an MSSQL database (objects, tables, table data). My question is which document formats you prefer, or are required to produce. I have too many ideas to follow, so your answers should set my priorities ;) (I know there ar...

db4o concerns

I'm interested in using db4o as my persistence mechanism in my Desktop application but I'm concerned about a couple things. 1st concern: Accidentally clipping very complex object graphs. Say I have a tree with a height of 10 and I fetch the root, how does it handle me storing the root object again? From my understanding, it doesn't f...

What is the best way to store a unique URL Slug?

Hi folks, I'm trying to generate some url 'slugs' for my website. It's based upon a single piece of user generated text. Now, i have made my own slug method, so i'm not after some code for that. What i'm wondering is where is the best place to determine if this slug is unique and then insert it because the slug field is a Unique Key I...