Documente Academic
Documente Profesional
Documente Cultură
Ministry of Education
Majmaah University
College of Computer and Information Sciences
Name
Raya alnwiser
Hind alhoqail
Razan alolah
ID
Group
number
341203839 Rnase223@gmail.com
IT2
341205194 Power.330@hotmail.com
IT2
341203855 r.n.3777@hotmail.com
IT2
Goals that have been implemented :*To make buying things an easier process.
* To produce reports on overdue books.
* To check which products are currently available in the supermarket.
* For the employee to be able to obtain information of who has ordered
a particular product.
* To keep a record of customers and their details.
* To be able to add, edit or deleted details concerning the customers .
* For each customer to have a primary id in case two people have the
same name .
* For each product have a primary code.
* The system should only allow authorized people to the data.
4- Create a synonym :-
6- Create a sequence:-
8- Create a function :-
9- Create a view :-
10-Create an index:-
11-create a trigger :-
12-create cursor :-
Done
Conclusion
If some product has been ordered, and it takes a while for that product to
arrive, we do not want the same product ordered several days in a row.
The system must contain some sort of list of items on order.
As the items received come in, they should be taken off this list.
Last and not least This project gave us the opportunity to try our new
skills in practice. While doing this project we also gained deeper
understanding on database design and how it can be implemented in real
life situations.
We believe we can use our database designing skills also in other projects.
*If you want follow the SQL statement are here :-
VARCHAR2(20),
M_NUMBER number(10),
CONSTRAINT MNAMER_PK PRIMARY KEY (M_ID));
insert into manger(m_id , m_name,m_number)
values(2254,'razan',0987);
insert into manger(m_id , m_name,m_number)
values(2255,'hind',0970);
create view m_name as select manger.m_id, m_number from manger INNER JOIN saller on
manger.m_id = saller.m_id
where manger.m_name ='raya';
select*from manger ;
declare
idm NUMBER;
mname VARCHAR2(20);
begin
idm :='&enter_id_MANGER';
select M_NAME into mname
from MANGER
where M_ID=idm;
C_ACCAUNT NUMBER ,
S_ID NUMBER NOT NULL ,
PU_TRANSACTION_NO NUMBER ,
CONSTRAINT PK_COSTOMER PRIMARY KEY (C_ID));
ALTER TABLE COSTOMER ADD CONSTRAINT FK_COSTOMER foreign KEY(S_ID) REFERENCES SALLER
(S_ID) on delete cascade ;
NOT NULL,
E_TELEPHONE NUMBER(10),
E_ADDRESS VARCHAR2 (10),
E_MANE VARCHAR2 (20),
M_ID number not null,
S_ID number not null,
set serveroutput on
begin
dbms_output.put_line ('hello,world!');
end;
/
BRAND VARCHAR2(9);
begin
code :='&enter_your_code';
select p_brand into BRAND
from PRODUCT
where p_code:=code;
dbms_output.put_line('PRODUCT' || code || 'is' ||'' || brand );
end;
/
select*from PRODUCT;
set serveroutput on
declare
PCODE number ;
PBRAND number := 430;
begin
PCODE:='&enter_the_number_of_code';
if PCODE > PBRAND then
end loop;
close p_cursor;
end;
/
create or replace trigger p_code before insert on product for each row
declare
pbrand VARCHAR2(9);
begin
select user into pbrand
from dual;
end;
/