Professional Documents
Culture Documents
Day 2
Day 2
Employees
(
Fname char(20) not null,
lname char(20)not null,
address varchar(50)not null,
bdate date not null,
salary smallmoney not null,
gender bit not null,
id int not null,
ssn varchar(9) primary key,
superssn varchar(5),
);
create table department.department
(
dname char(20) not null,
number char(20) primary key,
startdate date not null,
mgrssn varchar(9) ,
);
create table department_lo.departmentlo
(
dnumber char(20) ,
dlocation varchar(50),
);
Solution 1:
1- Musician (ID PK , name , address(city,st) ,phone ...)
2- Song (title PK , author ,musician_ID FK)
3- Instrument (name PK , key )
4- Album (id PK , title , Bdate,musician_ID FK)
Solution 2:
1- Employee (ID PK , name )
2- Sales office (num PK , LOC )
3- OWNER (ID PK , NAME )
4- Property (id PK , loc(ADD,city,state,zip),owner_ID FK)
Solution 3
1- patient (ID PK , name, dob)
2- ward (ID PK , name)
3- Nurse(ID PK , NAME)
4- DRUG (code PK ,brand,rec dosage)
5-Consultant(ID PK,Name)
Solution 4
1- Aircraft (ID PK , capactiy, model )
2- route (ID PK , Origin, destination,classification,distance )
3- crew(crewid PK , maj_pilot, ass_pilot,hosstess1,hosstess )
4- Transaction (id PK , DESC,Amount,date)
5-Employee(name,address,birthday(day,year,month),position,qualification,gender)