0% found this document useful (0 votes)
292 views

University Database E-R Diagram

Diagram about how the created University and what the right way to create application of university. That the reson their need of "E-R diagram".

Uploaded by

Arzoo raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
292 views

University Database E-R Diagram

Diagram about how the created University and what the right way to create application of university. That the reson their need of "E-R diagram".

Uploaded by

Arzoo raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assignment no :- 1 Name:- MD Akbar ali

Class:- BCA Roll no :- 3180/22

2. University Database E-R diagram


Assignment no :- 1 Name:- MD Akbar ali
Class:- BCA Roll no :- 3180/22

3. Online Shopping System E-R diagram


Assignment no :- 1 Name:- MD Akbar ali
Class:- BCA Roll no :- 3180/22

5. Perform Following SQL queries:-


a) Create table employee15(name, id, salary, age, department, address, position)
Input:-
CREATE TABLE employee15(
First_name char(20),
Last_name char(20),
Id INT PRIMARY KEY,
salary integer,
age integer,
department char(20),
address char(20),
position char(20)
);
Output:-

b) Insert atleast 10 entries to table.


Input:-

INSERT INTO employee15(First_name, Last_name, id, salary, age, department, address, position)
VALUES
(‘Md’, ‘Akbar’, 1, 150000, 21, ‘HR’, ‘Punjab’, ‘Manager’),
(‘Arzo, ‘Raza, 2, 70000, 50, ‘IT, ‘Delhi, ‘Developer’),
(‘Ritik, ‘Kumar, 3, 48000, 40, ‘IT’, ‘Gurugram, ‘Engineer’),
(‘Sumit, ‘Kumar, 4, 45000, 40, ‘IT’, ‘Punjab, ‘Data Scien0st’),
(‘Nagma, ‘Parveen, 5, 78000, 20, ‘IT’, ‘Rajasthan, ‘Cyber Expert’)
('Payal',' Kumari', 6, 80000, 40, 'IT', 'Old delhi', 'Developer'),
('Saurabh ','Rajput', 7, 15000, 50, 'IT', 'Jammu', 'Team Leader'),
('Ratan',' Mishra', 8, 25000, 45, 'IT', 'Odisha', 'Developer'),
('Divesh',' Das', 9, 42000, 26, 'IT', 'Delhi', 'Assistant Manager'),
('Kundan ','Sukla', 10, 12000, 43, 'MarkeƟng', 'Bihar', 'Coordinator');
Output:-

c) Retrieve all columns from a table named “employees”.


Input:-
SELECT * FROM employee15;
Output:-
Assignment no :- 1 Name:- MD Akbar ali
Class:- BCA Roll no :- 3180/22
d) Retrieve only the “fiest_name” and “last_name” columns from the “employees” table.
Input:-
SELECT First_name, Last_name From employee15;
Output:-

e) Filter rows from the “Products” table where the “price” is greater than 50
CREATE TABLE pruducts1(
Product_id INTEGER PRIMARY KEY,
Product_name CHAR(25),
Price INTEGER
);
INSERT INTO products1(product_id product_name , price)
VALUES
(1, 'APPLE', 45),
(2, 'BANANA', 60),
(3, 'SOAP', 30),
(4, 'MANGO', 75),
(5, 'ONION', 25);
SELECT * FROM products WHERE price > 50;
Assignment no :- 1 Name:- MD Akbar ali
Class:- BCA Roll no :- 3180/22

f) Add new column to existing table (phone_no.)

ALTER TABLE products


ADD COLUMN phone_no integer;
SELECT * FROM products ;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy