Salam Childcare Database : PROJECT OUTLINE Salam Childcare Sdn. Bhd. is a renown
ID: 3714431 • Letter: S
Question
Salam Childcare Database :
PROJECT OUTLINE
Salam Childcare Sdn. Bhd. is a renowned education institution. Today, in order to increase its service quality, the company is transforming their operation to computer-based system. As part of the project, a database will be developed as a convenient tool to monitor and ensure all relevant data is captured for operational purposes. Given the details of the project above, it is now your group duties to implement the database using SQL programming. Refer to the following pages for the ER diagram and Data Dictionary.
GUARDIAN table
Attribute Name
Data Type
Size
Allow NULL
GID
NUMBER
3
NO (PK)
GName
VARCHAR2
25
NO
GAddress
VARCHAR2
35
YES
GOccupation
VARCHAR2
15
YES
GPhone
VARCHAR2
15
NO
STUDENT table
Attribute Name
Data Type
Size
Allow NULL
SID
NUMBER
3
NO (PK)
SName
VARCHAR2
25
NO
SDob
DATE
NO
SGender
CHAR
1
NO
GID
NUMBER
3
NO
TERM_REC table
Attribute Name
Data Type
Size
Allow NULL
TERMID
NUMBER
3
NO (PK)
Start_Date
DATE
NO
Finish_Date
DATE
NO
CID
NUMBER
3
NO
SID
NUMBER
3
NO
TID
NUMBER
3
NO
TEACHER table
Attribute Name
Data Type
Size
Allow NULL
TID
NUMBER
3
NO (PK)
TName
VARCHAR2
20
NO
TAddress
VARCHAR2
25
YES
TPhone
VARCHAR2
15
NO
class table
Attribute Name
Data Type
Size
Allow NULL
CID
NUMBER
3
NO (PK)
Cname
VARCHAR2
15
NO
- Create all of the required tables needed for this project. Refer to ER diagram and Data Dictionary for the required structure of the tables and constraints of the new database. The objective is to ensure that you understand how to read an ER Diagram and to implement the logical design into a physical design, i.e. by using SQL syntax. Do ensure that your script contains the following items:
1- Drop table statements.
2- Create table statements complete with primary key, foreign key and other constraints declarations.
- Name your script as SCM_table.sql
Attribute Name
Data Type
Size
Allow NULL
GID
NUMBER
3
NO (PK)
GName
VARCHAR2
25
NO
GAddress
VARCHAR2
35
YES
GOccupation
VARCHAR2
15
YES
GPhone
VARCHAR2
15
NO
Explanation / Answer
1.
drop table guardian
drop table student;
drop table class
drop table teacher
drop table term_rec
2-
create table guardian
(
gid number(3) primary key,
gname varchar2(25) not null,
gaddress varchar2(35),
gOccupation varchar2(15),
gphone varchar2(15) not null
);
create table student
(
sid number(3) primary key,
sname varchar2(25) not null,
sdob date not null,
sgender char(1) not null,
gid number(3) not null references guardian(gid)
);
create table class
(
cid number(3) primary key,
cname varchar2(15) not null
);
create table teacher
(
tid number(3) primary key,
tname varchar2(20) not null,
taddress varchar2(25),
tphone varchar2(15) not null
);
create table term_rec
(
termid number(3) primary key,
start_date date not null,
finish_date date not null,
cid number(3) not null references class(cid),
sid number(3) not null references student(sid),
tid number(3) not null references teacher(tid)
);
If there is anything that you do not understand, or eed more help, then please mention it in the comments section.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.