Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
5 views
19 pages
Lecture 3
Uploaded by
norantharwat58
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download
Save
Save lecture 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
5 views
19 pages
Lecture 3
Uploaded by
norantharwat58
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save lecture 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 19
Search
Fullscreen
• CREATE DATABASE Company;
• -- Creating Company Schema
• USE Company;
• CREATE TABLE DEPARTMENT (
• dname varchar(25) not null,
• dnumber int not null primary key,
• CONSTRAINT pk_Department primary key (dnumber),
• CONSTRAINT uk_dname UNIQUE (dname),
• );
• CREATE TABLE EMPLOYEE (
• fname varchar(15) not null,
• minit varchar(1),
• lname varchar(15) not null,
• ssn char(9),
• bdate date,
• address varchar(50),
• sex char,
• salary decimal(10,2)
• dnumber int,
• supervisor_id INT,
• CONSTRAINT pk_employee primary key (ssn),
• CONSTRAINT fk_employee_department foreign key
(dnumber) references DEPARTMENT(dnumber),
CONSTRAINT fk_employee2_ EMPLOYEE foreign key
(ssn) references DEPARTMENT(ssn)
• FOREIGN KEY (supervisor_id) REFERENCES
Employee(employee_id) );
• );
• CREATE TABLE DEPENDENT (
• essn char(9),
• dependent_name varchar(15),
• sex char,
• bdate date,
• relationship varchar(8),
• CONSTRAINT pk_essn_dependent_name primary key (essn,dependent_name),
• CONSTRAINT fk_dependent_employee foreign key (essn) references EMPLOYEE(ssn)
• );
• CREATE TABLE PROJECT (
• pname varchar(25) not null,
• pnumber int,
• plocation varchar(15),
• dnum int not null,
• CONSTRAINT ok_project primary key (pnumber),
• CONSTRAINT uc_pnumber unique (pname),
• CONSTRAINT fk_project_department foreign key (dnum) references
DEPARTMENT(dnumber)
• );
• CREATE TABLE WORKS_ON (
• essn char(9),
• pno int,
• hours decimal(4,1),
• CONSTRAINT pk_worksOn primary key (essn,pno),
• CONSTRAINT fk_workson_employee foreign key
(essn) references EMPLOYEE(ssn),
• CONSTRAINT fk_workson_project foreign key (pno)
references PROJECT(pnumber)
• );
The END of the Lecture
for
Your Attention
You might also like
DBMS Lab Assignment 5
PDF
0% (1)
DBMS Lab Assignment 5
11 pages
Company Database DBMS LAB
PDF
No ratings yet
Company Database DBMS LAB
15 pages
Assignment DWH
PDF
No ratings yet
Assignment DWH
11 pages
Oot Lab1
PDF
No ratings yet
Oot Lab1
40 pages
Database Management System Lab (CSE304L) Exercise 5: Anu Likitha Immadisetty AP21110010963
PDF
No ratings yet
Database Management System Lab (CSE304L) Exercise 5: Anu Likitha Immadisetty AP21110010963
5 pages
Create Table Employee
PDF
100% (1)
Create Table Employee
2 pages
Updated Lab One and Two Practice
PDF
No ratings yet
Updated Lab One and Two Practice
13 pages
Documentation CSC675 Project
PDF
No ratings yet
Documentation CSC675 Project
13 pages
Create Table Department
PDF
No ratings yet
Create Table Department
2 pages
Create Database 4m
PDF
No ratings yet
Create Database 4m
4 pages
Assignment 1 - 21bce0324dbms
PDF
No ratings yet
Assignment 1 - 21bce0324dbms
20 pages
Assignment 1
PDF
No ratings yet
Assignment 1
19 pages
Lec5 Lab CSC371 Database Systems
PDF
No ratings yet
Lec5 Lab CSC371 Database Systems
20 pages
Cse2101 Graded Lab
PDF
No ratings yet
Cse2101 Graded Lab
1 page
Série 1 + Création Des Tables
PDF
No ratings yet
Série 1 + Création Des Tables
5 pages
Problem 1
PDF
No ratings yet
Problem 1
6 pages
W4L3-Advanced DDL More Queriess
PDF
No ratings yet
W4L3-Advanced DDL More Queriess
5 pages
Lab 5
PDF
No ratings yet
Lab 5
7 pages
Date Function
PDF
No ratings yet
Date Function
2 pages
DBMS Lab 2
PDF
No ratings yet
DBMS Lab 2
2 pages
Sample Table For View
PDF
No ratings yet
Sample Table For View
2 pages
تكليف قواعد البيانات مهند علي علي علي سعد الاخير
PDF
No ratings yet
تكليف قواعد البيانات مهند علي علي علي سعد الاخير
2 pages
Using DDL Statements To Create and Manage Tables
PDF
No ratings yet
Using DDL Statements To Create and Manage Tables
39 pages
Company Database Lab Work
PDF
No ratings yet
Company Database Lab Work
21 pages
Ashutosh
PDF
No ratings yet
Ashutosh
2 pages
Database
PDF
No ratings yet
Database
1 page
Creat Obj Examples
PDF
No ratings yet
Creat Obj Examples
6 pages
CSE2004-Data Base Management Systems: Course: CSE2004-DBMSLAB B.Tech
PDF
No ratings yet
CSE2004-Data Base Management Systems: Course: CSE2004-DBMSLAB B.Tech
3 pages
Company
PDF
No ratings yet
Company
3 pages
Israr Dbms Assigment
PDF
No ratings yet
Israr Dbms Assigment
4 pages
Code
PDF
No ratings yet
Code
4 pages
Ict c2
PDF
No ratings yet
Ict c2
2 pages
Company Database SQL Script
PDF
No ratings yet
Company Database SQL Script
6 pages
Employee Management System
PDF
No ratings yet
Employee Management System
3 pages
Program 2
PDF
No ratings yet
Program 2
10 pages
Lab 2
PDF
No ratings yet
Lab 2
3 pages
Lab Task 5 Word
PDF
No ratings yet
Lab Task 5 Word
9 pages
Company Database
PDF
No ratings yet
Company Database
3 pages
Dbms Lab Internal 1
PDF
No ratings yet
Dbms Lab Internal 1
14 pages
VL2023240100971 Ast01
PDF
No ratings yet
VL2023240100971 Ast01
6 pages
DBMS Lab Mannual
PDF
No ratings yet
DBMS Lab Mannual
13 pages
Assignment 1 Part - 1
PDF
No ratings yet
Assignment 1 Part - 1
6 pages
Dbms Lab 1 Sarthak Kumar Singh B19CSE077: Q1. Create A Table: Employee - Info (Emp - Id, Emp - Name, Dept, Salary)
PDF
No ratings yet
Dbms Lab 1 Sarthak Kumar Singh B19CSE077: Q1. Create A Table: Employee - Info (Emp - Id, Emp - Name, Dept, Salary)
12 pages
HR Table For Create
PDF
No ratings yet
HR Table For Create
4 pages
Dbms Lab-1 Submitted By-Saurav Majoka (B19CSE079) : 1.connect The Database and Create The Table
PDF
No ratings yet
Dbms Lab-1 Submitted By-Saurav Majoka (B19CSE079) : 1.connect The Database and Create The Table
11 pages
21bce0968 VL2023240100969 Ast01
PDF
No ratings yet
21bce0968 VL2023240100969 Ast01
22 pages
Lovely Professional University
PDF
No ratings yet
Lovely Professional University
29 pages
MySQL Workbench Forward Engineering SQL Code of Employee Management
PDF
No ratings yet
MySQL Workbench Forward Engineering SQL Code of Employee Management
4 pages
Cluster Level
PDF
No ratings yet
Cluster Level
3 pages
Company - Database Create Table Employee
PDF
No ratings yet
Company - Database Create Table Employee
4 pages
Creating Company Database Schema and Populating With Data: and Reasoning Behind Constraints
PDF
No ratings yet
Creating Company Database Schema and Populating With Data: and Reasoning Behind Constraints
6 pages
Sanjana Dbms Work
PDF
No ratings yet
Sanjana Dbms Work
38 pages
Data
PDF
No ratings yet
Data
1 page
This Study Resource Was: Aim: To Know How The Constraints Are Used To Make Table Is Consistent
PDF
No ratings yet
This Study Resource Was: Aim: To Know How The Constraints Are Used To Make Table Is Consistent
6 pages
Dbms Lab6: Jenma Maria Binoy Rollno 34
PDF
No ratings yet
Dbms Lab6: Jenma Maria Binoy Rollno 34
6 pages
Modelo de Estudio Caso Oracle
PDF
No ratings yet
Modelo de Estudio Caso Oracle
14 pages
Exercise: II: Aim: To Know How The Constraints Are Used To Make Table Is Consistent
PDF
No ratings yet
Exercise: II: Aim: To Know How The Constraints Are Used To Make Table Is Consistent
4 pages
DBMS & Gui Lab Manual
PDF
No ratings yet
DBMS & Gui Lab Manual
15 pages
New Text Document
PDF
No ratings yet
New Text Document
2 pages