0% found this document useful (0 votes)
75 views28 pages

DBMS

The document describes the entities, attributes, and relationships in John Player's production system. It outlines the key entities like employees, departments, jobs, products, inventory, sales, locations, regions, and countries. It then shows the logical design of the database tables to represent these entities and relationships, including the attributes for each table and primary and foreign keys. Finally, it provides examples of SQL commands to create the tables and insert sample values.

Uploaded by

Pratik Jain
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views28 pages

DBMS

The document describes the entities, attributes, and relationships in John Player's production system. It outlines the key entities like employees, departments, jobs, products, inventory, sales, locations, regions, and countries. It then shows the logical design of the database tables to represent these entities and relationships, including the attributes for each table and primary and foreign keys. Finally, it provides examples of SQL commands to create the tables and insert sample values.

Uploaded by

Pratik Jain
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

John Players offers a complete and vibrant wardrobe of

Casual wear,
Party wear,
Work wear,
Denims, Outer wear and
Suits & Jackets,

The brand is endorsed by Bollywood actor & youth icon - Ranbir Kapoor.
• john Players Work Wear (Shirts, Trousers)

• Casual Wear (Shirts T-shirts, Bottoms)

• Party Wear (Shirts T-shirts, Trousers)

• Signature Wear (Shirts, T-shirts, Trousers)


JP Denims 
Production of John player

entity relationship
Current situation

Operating Environment

Organizational Structure

Problem and Constraints

Objectives

Scope And Boundaries


Identification of entities

Entities Attributes

Employee :- (emp_ID , emp_name , emp_address , dept_id , job_id , emp_age ,


emp_bloodgroup , emp_contactno )
Department :- ( dept_id , dept-name , dept_location , no_of_workers , dept_head )
Job :- (job_title , job_id , work_hours )
Salary :- (emp_id , fine , overtime , basic , bonus , amt )
Product l :- ( prod_id , prod_type , price ,market-rating )
Inventry :- (prod_id , quantity )
Sales :- ( prod_id , prod_type , price, Quantity)
Location :- ( location_id, street_address, postal_address, city, country_id,
state_proivance )
Region :- ( region_id, region_name, sale )
Logical Design
Employee table

Attributes Data types Primary & Foreign Constraints


Key
Emp_id Number Primary key Not Null
Emp_name Varchar(20)    
Emp_email Varchar(20)    
Phone_number Number    
Hire_date Date    
Job_id Number Job  
Salary Number    
Commission Number    
Manager_id Number    
Dept_id Number Department  
Emp_address Memo    
Salary table

Attributes Data types Primary & Foreign Constraints


Key

Emp_id Number Primary key, Not null


Employee

Min_salary Number    
Max_salary Number    
Bonus Number    
Fine Number    

Job table

Attributes Data types Primary & Foreign Constraints


Key
Job_id Number Primary key Not null
Min_salary Number    
Max_salary Number    
Job_title Varchar(10)    
Department table

Attributes Data types Primary & Foreign Constraints


Key
Dept_id Number Primary key Not null
Dept_name Varchar(10)    
Manager_id Number    
Location_id number Location  

Country table

Attributes Data types Primary & Foreign constraints


Key
Country_id Number Primary key Not null
Country_name Varchar(20)    
Region_id Number Region Not null
Region table

Attributes Data types Primary & Foreign Constraints


Key
Region_id Number Primary key Not null
Region_name Varchar(20)    
Sale Number    

Inventory table

Attributes Data_types Primary & Foreign Constraints


Key
Prod_id Number Primary key Not null
Prod_type Varchar    
Total_amt number    
Product table

Attributes Data_types Primary & Foreign Constraints


Key
Prod_id Number Primary key , Product Not null
Prod_type Varchar(20)    
Price Number    
Quantity Number    
Market_rating number    

Sale table

Attributes Data_types Primary & Foreign Constraints


Key
Prod_id Number Primary key, Product Not null
Prod_type Varchar(20)    
Quantity Number    
Price number    
Location table

Attributes Data types Primary & Foreign Constraints


Key
Location_id Number Primary key Not null
Street_address Memo    
Postal_code Number    
City Varchar(20)    
State_province Varchar(20)    
Country_id Number Country  
SQL Commands

CREATE TABLE EMPLOYEE


(
EMP_ID NUMBER PRIMARY KEY,
EMP_NAME VARCHAR(20),
EMP_EMAIL VARCHAR(40),
PHONE_NUMBER NUMBER,
HIRE_DATE DATE,
JOB_ID NUMBER,
SALARY NUMBER,
COMMISSION NUMBER,
MANAGER_ID NUMBER,
DEPT_ID NUMBER,
EMPLOYEE_ADDRESS MEMO
);

CREATE TABLE DEPARTMENT


(
DEPT_ID NUMBER PRIMARY KEY,
DEPT_NAME VARCHAR(10),
MANAGER_ID NUMBER,
LOCTION_ID NUMBER
);
SQL Commands

CREATE TABLE COUNTRY


(
COUNTRY_ID NUMBER PRIMARY KEY,
NAME VARCHAR(20),
REGION_ID NUMBER,
PROD_ID NUMBER
);

CREATE TABLE INVENTRY


(
PROD_ID NUMBER PRIMARY KEY,
PROD_TYPE VARCHAR(20),
TOTAL_AMT NUMBER
);
SQL Commands

CREATE TABLE LOCATION


(
LOCATION_ID NUMBER PRIMARY KEY,
STREET_ADDRESS MEMO,
CITY VARCHAR,
STATE_PROVINCE VARCHAR(10),
COUNRY_ID NUMBER
);

CREATE TABLE PRODUCT


(
PROD_ID NUMBER PRIMARY KEY,
PROD_TYPE VARCHAR(20),
PRICE NUMBER,
QUANTITY NUMBER,
MARKET_RATING NUMBER
);
SQL Commands

CREATE TABLE REGION


(
REGION_ID NUMBER PRIMARY KEY,
REGION_NAME VARCHAR(20),
SALE NUMBER
);

CREATE TABLE SALARY


(
EMP_ID NUMBER PRIMARY KEY,
MAX_SALARY NUMBER,
MIN_SALARTY NUMBER,
BONUS NUMBER,
FINE NUMBER
);
SQL Commands

CREATE TABLE SALES


(
PROD_ID NUMBER PRIMARY KEY,
PROD_TYPE VARCHAR(20),
QUALITY NUMBER,
PRICE NUMBER
);

CREATE TABLE JOB


(
JOB_ID NUMBER PRIMARY
KEY,
JOB_TITLE VARCHAR(10),
MIM_SALARY NUMBER,
MAX_NUMBER NUMBER
);
Insert Values Into Our Database

INSERT INTO EMPLOYEE


(EMP_ID,EMP_NAME,EMP_EMAIL,PHONE_NUMBER,HIRE_DATE,JOB_ID,SALA
RY,COMMISSION,MANAGER_ID,DEPR_ID,EMP_ADDRESS)

VALUES (123 ,’RAJ’ ,'[email protected]' ,1234567890 ,12-JAN-2009 ,458 ,2500 ,1200 ,


36 ,986 ,3658 raja nagar)

INSERT INTO
PRODUCT(PROD_ID,PROD_TYPE,PRICE,QUANTITY,MARKET_RATING)

VALUES (125,'POI',36521,36589,7895)
INSERT INTO REGION
(REGION_ID,REGION_NAME,SALE)

VALUES (2256,'PUNA',236589)

INSERT INTO COUNTRY


(COUNTRY_ID,COUNTRY_NAME,REGION_ID)

VALUES (2568,'INDIA',2256)

INSERT INTO LOCATION


( LOCATION_ID, STREET_ADDRESS, CITY, STATE_PROVINCE,COUNTRY_ID )

VALUES (985, '985-RAJANDER NAGAR', 'DELHI', 'DELHI',2568)


INSERT INTO SALES
( PROD_ID, PROD_TYPE, QUALITY, PRICE )

VALUES (125, 'POI', 985478, 22568)

INSERT INTO INVENTRY


( PROD_ID, PROD_TYPE, TOTAL_AMT )

VALUES (125, 'POI', 50000)

INSERT INTO DEPARTMENT


(DEPT_ID,DEPT_NAME,MANAGER_ID,LOCATION_ID)

VALUES (986,'JOHN PLAYER',36,985)


INSERT INTO JOB
(JOB_ID,MIM_SALARY,MAX_SALARY,JOB_TITLE)

VALUES (458,2500,5000,WORKER)

INSERT INTO SALES


( PROD_ID, PROD_TYPE, QUALITY, PRICE )

VALUES (125, 'POI', 985478, 22568);


Thanks
House Is open for Queries

You might also like