473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Cascade update

1
I have made an little database, can someone help me
to give an little cascade update script for mine database..

create table Boektypen (
bkt_BoektypeID integer not null,
bkt_Boektypenaam varchar(35) not null,
bkt_Jeugdgeschikt bit,
primary key (bkt_BoektypeID))

go

create table Boeken (
bkn_Titel varchar(40) not null unique,
bkn_ISBN varchar(12) not null unique,
bkn_TypeID integer not null,
primary key (bkn_ISBN),
foreign key (bkn_TypeID)
references Boektypen)

go

create table Personen (
prs_Lidnummer numeric(10) not null unique,
prs_Naam varchar(40) not null,
prs_Initialen varchar(10) null,
prs_Voorvoegsel varchar(15) null,
prs_Geboortedatum datetime not null,
primary key (prs_Lidnummer))

go

create table Boetegegevens (
btg_Boetebedrag numeric(3,2) not null,
btg_Maximaleuitleentermijn numeric(3) not null)

go

create table Uitleningen (
utl_Lidnummer numeric(10,0) not null,
utl_ISBN varchar(12)not null,
utl_Uitleendatum datetime not null,
utl_Terugbezorgdatum datetime null,
utl_Boete numeric(3,2),
foreign key (utl_Lidnummer)
references Personen,
foreign key (utl_ISBN)
references Boeken)

go

create table Bibliotheekmedewerkers (
bmw_Code char(3) not null,
bmw_Medewerker bit)
Mar 14 '06 #1
0 2957

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fraser Hanson | last post by:
Hello, I have a table which has a foreign key relationship with itself. I want and expect my updates to cascade (deletes definitely cascade as expected) but instead I just get error 1217:...
2
by: Gunnar Vøyenli | last post by:
Hi! For the sake of simplicity, I have three tables, Employee, Department and Work Employee >---- Department \ / \ / ^ ^ Work
3
by: SuryaPrakash Patel via SQLMonster.com | last post by:
Hello, There are three tables: OS-GroupOFCompanies (Table1) GoC_GroupOFCompaniesID (PK) OS-Organization (Table 2) Org_OrganizationID (PK)
2
by: P.B. via SQLMonster.com | last post by:
I cannot execute my sql to create a table with ON DELETE CASCADE option. Here is my sql: CREATE TABLE Employees (Name Text(10) not null, Age number, CONSTRAINT pkEmployees PRIMARY KEY (Name)); ...
2
by: Jack | last post by:
We are have a question about the no cascade option on before triggers. The description stays that no other triggers will be fired by the changes of a before trigger. One of our developers is...
33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
14
by: Karl O. Pinc | last post by:
Hi, Thought perhaps some other eyes than mine can tell if I'm doing something wrong here or if there's a bug somewhere. I've never passed a ROWTYPE varaible to a function but I don't see where...
26
by: Allen Browne | last post by:
In Access 2000 and later, you can create a relation between tables where related records can be automatically set to Null rather than deleted when the primary record is deleted. I have not seen...
1
by: HH | last post by:
I try to make a script for generating backend databases. When I try to make a relationship between a table named 'users' and another table name 'layouts' an error occurs. Option 1:...
0
by: akdemirc | last post by:
Hi, i have tree tables in my db, one for menu, one for menu items and the other authorization.. They have the following columns and relationships: Menu ----------------- id (PK), name, position...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.