foreign (2,019)


.net - XSD DataSets and ignoring foreign keys

.net - XSD DataSets and ignoring foreign keys

I have a pretty standard table set-up in a current application using the.NET XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column f…


sql server - Tables with no Primary Key

I have several tables whose only unique data is a uniqueidentifier(a Guid) column. Because guids are non-sequential(and they're client-side generated so I can't use newsequentialid()), I have made a…



Multiple foreign keys?

I've got a table that is supposed to track days and costs for shipping product from one vendor to another. We(brilliantly:p) stored both the shipping vendors(FedEx, UPS) with the product handling…


.net - Update database schema in Entity Framework

I installed VS SP1 and played around with Entity Framework. I created a schema from an existing database and tried some basic operations. Most of it went well, except the database schema update. I ch…


Are foreign keys really necessary in a database design?

As far as I know, foreign keys(FK) are used to aid the programmer to manipulate data in the correct way. Suppose a programmer is actually doing this in the right manner already, then do we really need…


database - One or Two Primary Keys in Many-to-Many Table?

I have the following tables in my database that have a many-to-many relationship, which is expressed by a connecting table that has foreign keys to the primary keys of each of the main tables: Widge…


.net - Where to start with Entity Framework

Anyone know a good book or post about how to start in EF? I have seen the DnrTV any other place?…


SQL: Select like column from two tables

I have a database with two tables(Table1 and Table2). They both have a common column[ColumnA] which is an nvarchar. How can I select this column from both tables and return it as a single column i…


Cascading deletes in PostgreSQL

I have a database with a few dozen tables interlinked with foreign keys. Under normal circumstances, I want the default ON DELETE RESTRICT behavior for those constraints. But when trying to share a s…


MySQL Partitioning/Sharding/Splitting-which way to go?

We have an InnoDB database that is about 70 GB and we expect it to grow to several hundred GB in the next 2 to 3 years. About 60 % of the data belong to a single table. Currently the database is work…




key table django with many how constraint example sql mysql