Query For Setting Cascade On Update In Table Relationships
Aug 22, 2007
Hi,
I'm looking for a query I can use to alter table relationships. What I want to do in particular, is to set every relationship to cascade on update. Can anyone point me out to a solution? MSDN seems very vague in this subject.
Thanks,
Tiago
View 2 Replies
ADVERTISEMENT
Aug 22, 2007
Hi,
I'm looking for a query I can use to alter table relationships. What I want to do in particular, is to set every relationship to cascade on update. Can anyone point me out to a solution? MSDN seems very vague in this subject.
Thanks,
Tiago
View 1 Replies
View Related
Nov 4, 2006
Hi,
I Use SQL Server 2005 Express edition. I have a few tables, which are inter-related. For e.g. I have a project table (ProjectID, Name, ...)
I also have a Project invoice table, in which ProjectID is referred as Foreign key.
Now, I want all the rows in Project invoice (child) table table to be deleted (for a particular ProjetID), if I delete the coresponding ProjectID in Projects (parent) table. If I use the 'on delete set null' or 'on delete cascade' constraint, only the ProjectID (in child table) is nullified whereas rest of the columns have data.
Is there any way out, where the whole ROW (not just that field) is deleted? Or, is it that this can be achieved only by some stored procedure / external program?
Thanks!
View 1 Replies
View Related
Sep 20, 2007
I'm using Management Studio Express, is there a way to find out what relationships of a database have cascade delete set to true?
Also is there a way to change the settings (properties) of a relattionship without having to delete it and add it back?
View 1 Replies
View Related
Jul 26, 2004
I have contract table which has built in foreign key constrains. How can I alter this table for delete/ update cascade without recreating the table so whenever studentId/ contactId is modified, the change is effected to the contract table.
Thanks
************************************************** ******
Contract table DDL is
create table contract(
contractNum int identity(1,1) primary key,
contractDate smalldatetime not null,
tuition money not null,
studentId char(4) not null foreign key references student (studentId),
contactId int not null foreign key references contact (contactId)
);
View 3 Replies
View Related
Jul 12, 2007
hello, once upon a time when i created my db (originally in access then used the conversion tool, which i now know is wrong!) i thought it would be an amazing idea to have cascading updates and deletes, however it turns out now this is exactly not what i want! if i leave them in then it throws errors when i delete records out of my stock table as related records are in the order_line table here is the code (well i think so, im not the best at sqlserver as you probably can tell already) that im using if anyone can help or point me in the right direction that would be great, thanks USE [nashdfDB1]GO/****** Object: Table [dbo].[tbl_stock] Script Date: 07/13/2007 02:52:14 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[tbl_stock]( [Stock_ID] [int] IDENTITY(1,1) NOT NULL, [cat_id] [int] NOT NULL CONSTRAINT [DF__tbl_stock__cat_i__15502E78] DEFAULT ((0)), [sub_cat_id] [int] NULL CONSTRAINT [DF__tbl_stock__sub_c__164452B1] DEFAULT ((0)), [location] [int] NULL CONSTRAINT [DF__tbl_stock__locat__173876EA] DEFAULT ((0)), [n_or_sh] [varchar](50) NULL, [title] [varchar](255) NULL, [description] [varchar](255) NULL, [size] [varchar](50) NULL, [colour] [varchar](50) NULL, [cost_price] [decimal](9, 2) NULL CONSTRAINT [DF__tbl_stock__cost___182C9B23] DEFAULT ((0)), [selling_price] [decimal](9, 2) NULL CONSTRAINT [DF__tbl_stock__selli__1920BF5C] DEFAULT ((0)), [qty] [varchar](50) NULL, [date] [datetime] NULL CONSTRAINT [DF__tbl_stock__date__1A14E395] DEFAULT (getdate()), [condition] [varchar](255) NULL, [notes] [varchar](255) NULL, [visible] [bit] NULL CONSTRAINT [DF__tbl_stock__visib__1B0907CE] DEFAULT ((1)), [picture1] [varchar](50) NULL, [picture1_thumb] [varchar](50) NULL, [picture2] [varchar](50) NULL, [picture2_thumb] [varchar](50) NULL, [picture3] [varchar](50) NULL, [picture3_thumb] [varchar](50) NULL, [picture4] [varchar](50) NULL, [picture4_thumb] [varchar](50) NULL, [display_price] [varchar](50) NULL, [created_by] [varchar](50) NULL, [buying_in_recipt] [varchar](255) NULL, CONSTRAINT [tbl_stock$PrimaryKey] PRIMARY KEY CLUSTERED ( [Stock_ID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY] GO
SET ANSI_PADDING OFF
Regards
Jez
View 1 Replies
View Related
Nov 12, 2007
What is the iso sql query to get the relationships between all tables in a db?
View 4 Replies
View Related
Apr 12, 2008
I working a tutorial where I will learn a lot of new stuff, LINQ being one of them. As a part of this tutorial, there are four tables and foreign keys. My db skills were limited to simple tables and i've nevr done anything where I related tables before. I'm a bit confused about foreign keys and how to set them up. I think I'm setting up right, but I have a doubt. I have a couple of screen caps to show you what where my doubt comes from at:
http://www.noelakins.com/keys.htmlWhat is causing my confusion is that the connecting lines between the Albums and Events table diagrams in my setup seems to point back to the Photos table, and the Photos table seems to point to the Tags table. From the tutorial, the connecting lines seem to be pointing the other direction. Am I setting up the key right, or do I have them backwards? I'm setting out to learn a lot of stuff in this tutorial, so when I mess it up, i would like to know that it isn't because the foreign keys are wrong.EDIT:After doing some googling and some reading and watching, I'm a little less confused about how to set up foreign keys, at least how to do it in VWD. My problem now seems to be understanding the relationships. In the tutorial example, the Tags table has a FK on the PhotoID field, which matches the primary key (PhotoID) in the Photos table. Now, does this mean that the Tags table is the parent table and the Photos table the child? If this is true, then the other two tables must be child tables of the Photos table. At least that how I think this should work. The issue that I'm having with this is trying to understand how a cascade delete would work. Is the foreign key relationship a one way or both way relationship? For example, if I have made a foreign key on the AlbumID field of the Photos table, where the primary key table is Albums, PK is AlbumID and the foreign key table is Photos, then, if I do a cascade delete of a particular photo, does it delete the album too? That wouldn't make sense. Foreign keys and cascade deletes must be one way, right? Thanks
View 2 Replies
View Related
Mar 12, 2014
I am creating a small piece of software which handles a pre-advice data file, several scanner inputting weights and a supplier weight report.
The pre-advice contains a list of barcodes and details revolving around that barcode, each barcode will be scanned and a weight will be obtained, this will be place in the DB.
Currently my tables can be summarized like this.
Pre-Advice Table
Barcode
Lots of other info…
Scanners Table
Barcode
Date
Time
Weight
Which device input this information
Suppliers Weight Table
Barcode
Date
Time
Weight
Here is the process(es):
1.Pre-advice table populated.
2.When the barcode is scanned and a weight is obtained, a record will be added to the scanners table and this becomes the ‘active’ weight.If there is already an ‘active’ weight against this barcode the user will be asked if they wish to use the ‘active’ weight already in the system or update the ‘active’ weight to the weight they have entered.
3.Then when the supplier weight report is inputted into its table, should the ‘active’ weight be less than the supplier weight, the supplier weight becomes the ‘active’ weight.
At any given time a user can pull a report based on information in the Pre-Advice table, which will need to include the ‘active’ weight for that barcode’s record.
Additionally, no weights should be deleted, I need a fully traceable log of who, what, where & when. I will need to pull reports on the trials of scans so it really is a must to keep these.
Furthermore, if a scanner was to scan the same barcode after the Suppliers weight had been input and the user chooses to replace the weight then, the scanners weight should become the new ‘active’ weight.
I believe I will need to modify my tables to accommodate my needs, however I am not sure exactly what or how to set up what I need.I understand I will need some type of relationship between all of the tables to be able to pull the report on the Pre-Advice table, but I am lost.
how I will need to set up my tables/relationships in order to achieve my requirements?
View 3 Replies
View Related
Jul 6, 2007
Hi,
I received the error below upon saving when I was trying to create a foreign key in a table using relationships in "table designer" of sql server 2005 management studio. This process has been successful for other tables. What might be the problem?
Thanks
Code Snippet
- Unable to create relationship 'FK_SAMPLE_GRID'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_SAMPLE_GRID". The conflict occurred in database "acquire", table "dbo.GRID", column 'GRIDNAME'.
View 1 Replies
View Related
Jul 8, 2006
Does anyone know how to do a cascade update in SQL 2005 using the studio manager?Basically, I have a project table with a status column. If the status is set to 2, then I need to update another table that references the project id.
View 1 Replies
View Related
Aug 27, 2006
Hello all,
I am new to SQL and I was hoping someone could explain something to me about 'on update cascade'.
I understand what 'on update cascade' does (i think) - it updates the child table when the parent table is updated.
What i do not understand is that the 'on update cascade' works on the primary key of the parent table, but i was on the understanding that the primary key doesn't change often if at all so why would the 'on update cascade' be of use?
Sorry for my ignorance and i realise i must be missing something simple but would be grateful for any help.
Thanks
View 5 Replies
View Related
Jul 23, 1999
Is it possible to cascade update and delete while DRI remains there ? That
is without deleteing refrential integrity. If anyone have example of cascade delete and Update using Pubs or Northwind Example , i'll be really obliged.
View 1 Replies
View Related
Apr 8, 2007
i want to reffer A1,A2 column from a Table A to B1 column of Table B. when i use the on update cascade option for the columns A1 & A2 i get an error for the 2nd one. sql:
alter table A
add constraint fk_key1 foreign key (a1) references b(b1) on update cascade;
alter table A
add constraint fk_key2 foreign key (a2) references b(b1) on update cascade;
after executing the sql i get the following error for the 2nd sql:
Introducing FOREIGN KEY constraint 'FK_key2' on table 'A' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
if i dont use cascade option then i dont get any error.
but i need to synchronize the data. now can anyone help me how to add the cascade option working for the 2nd column of Table A without seperating the column in a different table?
thnx
S ]-[ /- | ]-[ /- N
View 2 Replies
View Related
Jul 20, 2005
Hi!For the sake of simplicity, I have three tables, Employee, Department andWorkEmployee >---- Department / /^ ^WorkThe Work table have two columns, empno and depno and consists that theemployee has worked on another department.Here is my scripts:create table employee (empno int not null primary key, depno int not null)create table department (depno int not null primary key)create table work (empno int not null, depno int not null)alter table employee add constraint fk_employee_department foreign key(depno)references department (depno)on update cascadealter table work add constraint fk_work_employee foreign key (empno)references employee (empno)on update cascadealter table work add constraint fk_work_department foreign key (depno)references department (depno)on update cascadeMy problem is the last command. SQL Server responds:Server: Msg 1785, Level 16, State 1, Line 1Introducing FOREIGN KEY constraint 'fk_work_department' on table 'work' maycause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ONUPDATE NO ACTION, or modify other FOREIGN KEY constraints.But I want the depno in the work table to be updated when a department.depnochanges a value.Does anyone have a suggestion on how to overcome this problem?Thanks in advanceBest regards,Gunnar VøyenliEDB-konsulent asNORWAY
View 2 Replies
View Related
Apr 28, 2008
Hi guys,
A simple question of good practices: is it better to have a cascade update/delete on a table? Or is it better to do it "by hand" in a SP?
Thanks a lot.
View 1 Replies
View Related
Jul 29, 2007
i run this cmd to execute a cascade update to another database but did not work.
USE [testdb1]
GO
/****** Object: Trigger [dbo].[tgr_Upddb2] Script Date: 07/29/2007 08:34:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[tgr_Upddb2]
ON [dbo].[Table1]
FOR UPDATE
AS
BEGIN
SET NOCOUNT ON
UPDATE U
SET u.fk_fld = i.pk_fld
FROM inserted AS I
JOIN testdb2.dbo.table2 AS U
ON U.fk_fld = I.pk_fld
END
heres the db structure
View 3 Replies
View Related
Jan 15, 2007
Hi, I have a database which saves data about bus links. I want to provide a information to passenger about price of their journay. The price depends on three factors: starting busstop, ending busstop and type of ticket (full, part - for students and old people, ...).
So I created a table with three foreign key constraints (two for busstops and one for type).
When the busstop is deleted or type of ticket I want all data connected with it to be deleted automatically. I wanted to use cascade deleting.
But I receive a following exception: Introducing FOREIGN KEY constraint 'FK_TicketPrices_BusStops1' on table 'TicketPrices' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
How can I achieve my task? Why should it cause cycles or multiple cascade paths?
View 1 Replies
View Related
Dec 13, 2006
Hello
I need to be able to regularly, update or delete data from my parent table and subsequent child tables from A to Z, each table contains data. However, I have having problems.
I have already created the tables with primary keys on each table and foreign keys linking each table to the next.
I tried to delete a row from the parent table and was given this error:
DELETE FROM [dbo].[DomNam]WHERE [DomNam]=N' football '
Error: Query(1/1) DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_DomNam'. The conflict occurred in database 'DomDB', table 'Dom_CatA', column 'DomNam'.
I tried to insert an alter table query:
ALTER TABLE dbo.DomNamADD CONSTRAINT FK_Dom_ID
REFERENCES dbo.Dom_CatA (Dom_ID)
ON DELETE CASCADE ON UPDATE CASCADE
But on Execute I saw this error:
Error] Incorrect syntax for definition of the 'TABLE' constraint
What is wrong with the above syntax?
Or would it be better if I used a trigger instead because I already have foreign keys set within the tables?If so please give an example of the syntax for the trigger I would need to update and cascade data from all tables.
I would be grateful for any advice. Thanks.
View 8 Replies
View Related
Mar 3, 2008
Hi,
I have 2 tables Publication and Advertisment_Codes. I want to update the publication_code in both tables where country_id=1 and publication_code='A'. However, it gives me an error because of foreign key relationship. I tried first updating in Advertisment_Codes and then in Publication table but it didn't work. I tried the other way round but also it didn't work.
How can I update the publication code?
Thanks
CREATE TABLE [dbo].[Advertisment_Codes](
[Advertising_Code] [nvarchar](20) NOT NULL,
[Country_id] [int] NOT NULL CONSTRAINT [DF_Advertisment_Codes_Country_id] DEFAULT ((0)),
[Publication_code] [nvarchar](20) NULL,
[Advert_type] [nchar](1) NULL,
[Date_Entered] [datetime] NULL,
[User_Id_Ent] [int] NULL CONSTRAINT [DF_Advertisment_Codes_User_Id_Ent] DEFAULT ((0)),
[Date_Updated] [datetime] NULL,
[User_Id_Upd] [int] NULL CONSTRAINT [DF_Advertisment_Codes_User_Id_Upd] DEFAULT ((0)),
[Default_Code] [bit] NULL CONSTRAINT [DF_Advertisment_Codes_Default_Code] DEFAULT ((0)),
[Active] [bit] NULL CONSTRAINT [DF_Advertisment_Codes_Active] DEFAULT ((0)),
CONSTRAINT [PK_Advertisment_Codes_1] PRIMARY KEY CLUSTERED
(
[Advertising_Code] ASC,
[Country_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Advertisment_Codes] WITH CHECK ADD CONSTRAINT [FK_Advertisment_Codes_Countries] FOREIGN KEY([Country_id])
REFERENCES [dbo].[Countries] ([Country_id])
GO
ALTER TABLE [dbo].[Advertisment_Codes] CHECK CONSTRAINT [FK_Advertisment_Codes_Countries]
GO
ALTER TABLE [dbo].[Advertisment_Codes] WITH CHECK ADD CONSTRAINT [FK_Advertisment_Codes_Publications] FOREIGN KEY([Country_id], [Publication_code])
REFERENCES [dbo].[Publications] ([Country_id], [Publication_code])
GO
ALTER TABLE [dbo].[Advertisment_Codes] CHECK CONSTRAINT [FK_Advertisment_Codes_Publications]
CREATE TABLE [dbo].[Publications](
[Country_id] [int] NOT NULL,
[Publication_code] [nvarchar](20) NOT NULL,
[Publication_name] [nvarchar](50) NOT NULL,
[Media_type] [int] NOT NULL CONSTRAINT [DF_Puclications_Media_type] DEFAULT ((0)),
[Date_Entered] [datetime] NULL,
[User_Id_Ent] [int] NULL CONSTRAINT [DF_Publications_User_Id_Ent] DEFAULT ((0)),
[Date_Updated] [datetime] NULL,
[User_Id_Upd] [int] NULL CONSTRAINT [DF_Publications_User_Id_Upd] DEFAULT ((0)),
CONSTRAINT [PK_Puclications] PRIMARY KEY CLUSTERED
(
[Country_id] ASC,
[Publication_code] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Publications] WITH CHECK ADD CONSTRAINT [FK_Publications_Countries] FOREIGN KEY([Country_id])
REFERENCES [dbo].[Countries] ([Country_id])
GO
ALTER TABLE [dbo].[Publications] CHECK CONSTRAINT [FK_Publications_Countries]
Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.
View 2 Replies
View Related
Oct 30, 2015
I have a set of data spread across a number of tables regarding stock market data. An example of this follows:
Market Capitalization...
Date CompA CompB
01/01/11 100 5
02/01/11 102 4
Share Price....
Date CompA CompB
01/01/11 100 100
02/01/11 101 99
Event Data...
Date Company
01/01/11 CompA
02/01/11 CompB
Pretty simply, I need a way to retrieve the market capitalisation and share price data based on the event data. So for instance I say 'oh, there is an event on the 01/01/11 involving company A, the market capitalisation on this day was 100, then for the next event it was 4 for company B.
I can also transpose the data so that the company name is in the rows and the dates in the columns for the market cap and share price tables, but this leads to the issue that when I try and get the data, I don't know how to query the correct company for that date.
For instance:
SELECT Event.Date, Event.Company
FROM Event
how do I now say.....
SELECT MarketCapitalisation.Column
WHERE Column = Event.Company
AND MarketCapitalisation.Date = Event.Date.
I have played around with a few basic joins, but I am having issue with the principle of that second to last line of SQL (so only getting the correct column).
I still have a copy of the data in excel so can flip things around as needed, but that would only mean that I would have the issue of WHERE Column = Event.Date instead of Event.Company.
View 1 Replies
View Related
Dec 13, 2007
I'm using SqlDatasource when the update process is on a primary key, how do you cascade the changes to other tables?
Also when deleting does the cascade deletes the row from another table or only sets the primary key to NULL?
View 1 Replies
View Related
Mar 24, 2007
for MS SQL 2000
I am trying to do a hierarchical table and i want to add a ON DELETE CASCADE
CREATE TABLE [dbo].[Users](
[id_Users] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,
[id_UsersSup] [int] NULL,
[Users] [nvarchar] (100) NOT NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[Users] ADD
CONSTRAINT [FK_Users_Sup] FOREIGN KEY
(
[id_UsersSup]
) REFERENCES [Users] (
[id_Users]
)
ON DELETE CASCADE
but MS SQL refuse to create the foreign key
even if there is 4 levels under the deleted id_Users I want to delete all the rows on all levels under
thank you for helping
View 2 Replies
View Related
May 8, 2008
I have 4 colums in a table
Project, Sections,Tasks,Subtasks
Each subtask will haven a row.
I need to write a trigger when I delete a task it needs to delete all the subtasks relating to it. When I delete a section it needs to delete all the tasks and subasks relating to it. similarly for project.
This trigger for task-subtask works.
CREATE TRIGGER "[Deletetasktrigger]" ON [Tbl] FOR DELETE AS
SET NOCOUNT ON
/* * CASCADE DELETES TO '[Tbl B]' */
DELETE [tbl] FROM deleted, [Tbl] WHERE deleted.[task] = [Tbl].[task]
THis works fine. But when I do it for sections I get this error.
"Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)" ..
Help Please!!!!!!
View 1 Replies
View Related
Feb 23, 2008
I have three tables:
BulkMemberHeader - which has a cascade delete on BulkMemberDetail of any related records
BulkMemberDetail €“ which has a DELETE trigger which gets the member ID from deleted and deletes the member record from the member table
Member
This issue:
> When I delete a record from BulkMemberDetail the trigger fires and deletes the record from the Member table as it should
> If I delete a record from the BulkMemberHeader, all corresponding records in BulkMemberDetail are deleted, but the trigger to delete the record in the Member table does not seem to fire
Is it a limitation on SQLServer 2000 that does not allow triggers to fire in a scenario like this?
Any suggestions or comments would be great.
Thanks,
Mike
View 8 Replies
View Related
Jan 9, 2008
This program gets the values of A and B passed in. They are for table columns DXID and CODE. The textbox GET1 is initialized to B when the page is loaded. When I type another value in GET1 and try to save it, the original initialized value gets saved and not the new value I just typed in. A literal value, like "222" saves but the new GET1.TEXT doesn't.
View 1 Replies
View Related
Sep 15, 2001
I'm looking for a query that can "batch" update one table from another. For example, say there are fields on both tables like this:
KeyField
Value1
Value2
Value3
The two tables will match on "KeyField". I would like to write one SQL query that will update the "Value" fields in Table1 with the data from Table2 when there is a match.
View 1 Replies
View Related
Jan 12, 2005
I have a table with several foreign key relationships. I am scripting with PHP and was wondering if anyone knows how to query the database to show the relationships that a table has. I have been using MySQL, but for a number of projects have to use MS SQL.
Any help will be greatly appreciated.
View 2 Replies
View Related
Jul 29, 2015
To avoid locking/blocking, or in transaction scope, we are trying make a common practice of writing coide for update commands in our all SPs based on primary key columns in where clause. I have a following scenario...
UPDATE [dbo].[TL_CST_Locker_Issuance] SET
[isActive] = 0
WHERE
LockerIssuanceId IN (SELECT LockerIssuanceId
[Code] ...
What is the better approach and should be followed to avoid locks and gain performance or best approach.
View 7 Replies
View Related
Jul 20, 2005
Hi,Does anyone have any suggestions on the best to go about enforcing arelationship between two tables that exist within separate databaseson the same SQL Server instance.
View 7 Replies
View Related
Jul 20, 2005
I have the tables tblEmployees and tblProjects.tblProjects has one column called Percentagetime, to hold the percentage oftime by an employee for a project.My Question : Why should we introduce a 3rd table calledtblProjectsAndEmployees?tblProjectsAndEmployees will have1)EmployeeNumber(PrimaryKey in tblEmployees)2)ProjectNumber(Primary key in tblProjects)3)PercentageTimeHaving only the tblEmployees and tblProjects is not sufficient?Kind Regards,Vinodh Kumar P
View 1 Replies
View Related
May 19, 2008
Hi,
I'm working on a database for which I require to have a lot of relations from my Persons table to other tables. I will need my primary key in those other tables: about 10 to 15 tables, to be able to relate to my persons data.
I believe this means I have 10 to 15 clustered indexes on this table.
Is this the right way of working? I know too many of this relations to other tables will have impact on performance concerning insert and updates.
But I noticed in the adventureworks example it works just this way for the products table.
What is the max limit of this kind of relations? (for reasonably good performance)
Should I use triggers instead? - for those with the least user interaction?
Thanks in advance,
Mike
View 5 Replies
View Related
Jan 26, 2008
Hello
I have created some tables and relationships between them by using MS SQL Server Management Studio Express.
The relationships are between a field named OId, which is not a part of the primary key but it is typed as an unique key. And a field named ParentTableOId.
When I open the two tables that have this relationship in the "Design Query in Editor" is not the relationship there.
Anybody who knows why?
Best Regards
/Erik
View 1 Replies
View Related