I find this comes up a lot, and I'm not sure the best way to approach it.
The question I have is how to make the decision between using foreign keys to lookup tables, or just taking the lookup table value and inserting it into the table requesting the data when you have tables that are mostly based on existing data.
Points to keep in ...
How can I get a DataSet with all the data from a SQL Express server using C#?
Thanks
edit: To clarify, I do want all the data from every table. The reason for this, is that it is a relatively small database. Previously I'd been storing all three tables in an XML file using DataSet's abilities. However, I want to migrate it to a databas...
Operations:
Delete in DataGridView selected row from Dataset:
FuDataSet.FuRow row = (FuDataSet.FuRow) ((DataRowView)FuBindingSource.Current).Row;
row.Delete();
To add a new Row I'm doing:
FuDataSet.FuRow row = FuDataSet.Fus.NewFuRow();
row.Someting = "Some initial Content";
row.SomethingElse = "More Initial Content";
...
FuDataSet.F...
My boss asks me to write only ANSI SQL to make it database independent. But I learned that it is not that easy as no database fully ANSI SQL compatible. SQL code can rarely be ported between database systems without modifications.
I saw people do different way to make their program database independent. For example:
Externalize SQL st...
I used MySQL Workbench to generate a database and now I inserted it into the command-line client using:
mysql> . C:\Documents and Settings\kdegroote\My Documents\School\2008-2009\ICT2
\Gegevensbanken\Labo\Hoofdstuk 3 oef 6\pizzasecondtry.sql
For some reason, the last table won't be accepted. "Cannot create table" is the error message.
...
I need to build a quick feasibility test / proof-of-concept of a remote database for a client, that will be populated with mostly-typical Company and People data (names, addresses, etc); 150K records or so. The sample databases mentioned here were helpful:
http://stackoverflow.com/questions/57068/good-databases-with-sample-data
...bu...
I am creating a database using MySQL 5 for an eCommerce web site. I want the database to be as flexible as possible so that the owners of the web site can add custom attributes for various types of products. For instance, they can have a product which has 4 shirt sizes and 3 colors for each size available, or a product that has 6 shirt...
ORACLE does not permit NULL values in any of the columns that comprise a primary key. It appears that the same is true of most other "enterprise-level" systems.
At the same time, most systems also allow unique contraints on nullable columns.
Why is it that unique constraints can have NULLs but primary keys can not? Is there a fundament...
In Informix I can run SQL statement that use other database:
INSERT INTO other_db:mytable ...
I would like "unite" both databases, but I would like do it "step by step".
At first I want to move all data from other_db to main database
and make alias that other_db = main_database. This way I will have
time to remove "other_db:" from al...
What are the tips/techniques when you need to persist classes with inheritance to relational database that doesn't support inheritance?
Say I have this classic example:
Person -> Employee -> Manager
-> Team lead
-> Developer
-> Customer -> PrivilegedCustomer
-> EnterpriseC...
I'm building a database web application using Java and Hibernate's JPA implementation. The application tracks objects. It also has to batch import objects from a legacy source.
For example, let's say we're tracking people. The database has tables called Person and Address. There are corresponding JPA entity and DAO classes.
On top of t...
I'm drawing a blank, or as some would say, having a senior moment. I know there’s a formal definition and a name for the concept where a db operation (stored procedure) that runs in a database will yield the same results if run repeatedly.
It's something in the genre of the Mathematician’s reflexive, symmetric, transitive, etc.
...
I'm currently in the process of implementing a number of different assignment algorithms for a SalesLead <--> SalesPerson situation. The general idea is quite simple:
A SalesLead signs up on a public website
The code automatically assigns the SalesLead to a SalesPerson using round-robin scheduling (Leads are assigned to SalesPersons in...
I'm trying to make an application that keeps an object model in sync with a database by observing all changes and then immediately persisting the objects in questions. Many of the object in the model have children in large lists or trees.
When I load an object from the database, I rely on a one-way cascading relationship to also retrie...
Is it necessary to use "Nothing" keyword to initialize a DataSet in VB.NET?
...
Let's say you are a GM dba and you have to design around the GM models
Is it better to do this?
table_model
type {cadillac, saturn, chevrolet}
Or this?
table_cadillac_model
table_saturn_model
table_chevrolet_model
Let's say that the business lines have the same columns for a model and that there are over a million records ...
A simple stupid "UPDATE table SET something=another WHERE (always true)" in accident will easily destroy everything in the database. It could be a human mistake, an SQL injection/overflow/truncation attack, or a bug in the code who build the WHERE causes.
Are popular databases provide a feature that protect tables by limit maximum numbe...
Is there a way to restore an Sql Server 2005 DB to Sql Server 2000? I'm unable to attach it either. Any tools, ideas etc?
...
I am working on a project where we are converted the old system to a brand new system. We are currently converted from the database of the old system to the database of the new system, and a team is working on creating a set of maps and transforms to run at the end of development to convert over the old system.
I would like to implemen...
Currently, I'm working on a project to manage maintenance windows on a database of servers, etc. Basically, I only need to be accurate down to the hour, but allow for them to be set to allow, or disallow, for each day of the week.
I've had a few ideas on how to do this, but since I work by myself, I'm not wanting to commit to anything w...