Write SQL code that creates or update a view named same_orders_vw, which will also create columns before it extract data from the database. The view must store details of customers who have ordered the same books as the one in order number 1007. The data to be stored in the view must contain customer no, customer names, book title, address and city as single and quantity. Sort the output in ascending order of customer no.
Mysql database connectivity through Java program
insert data using Java program fields are given below for insert
student name, student father name, student mother name, student roll number, student address
Consider an online video-sharing platform like YouTube which hosts tens of thousands of channels and crores of users.
The sample database consists of tables that store the information of users, channels, videos, genres and likes/dislikes.
Note:
channel_iduser_idsubscribed_datetime10012020-12-10 10:30:4510072020-10-10 11:30:45.........
channel_usertable stores the data of the channel_ids and their subscribers' user_ids.First row in the table represents that the user with user_id = 1 is subscribed to the channel with channel_id = 100 at
user_idvideo_idreaction_typereacted_at110LIKE2020-12-10 10:30:45710DISLIKE2020-10-10 11:30:45............
Similarly,
video_idgenre_id1020110202......
Similarly,
I CAN EXPLAIN QUESTION CLEARLY....
project writing of solution for saving students records
instructions:
introduction of the topic, history, advantages and disadvantages, database system, and conclusion of the topic.
all topic should be explained wisely write in detail
Question 1
Write SQL command to create the SALARY table having the following columns and their constraints. You are required to choose the appropriate data type for each column by your own.
Column Name Data Type Data Type
Month - -
Basic-salary - NOT NULL
House-allow - NOT NULL
Medical-allow - NOT NULL
Total-salary - DEFAULT 500
Income-tax - UNIQUE
Net-salary - NOT NULL
EmpID - -
Question 2
Write the following SQL commands for the SALARAY table created in question 1.
⦁ Add the primary key constraint on Month & EmpID columns using ALTER command.
⦁ Add the foreign key constraint on EmpID column using ALTER command.
Note: EmpID is a primary key column in Employee table.
A hospital has Patient Appointment Management System (PAMS), in which all the details of doctors, patients and appointments are given. In this scenario all the details of appointment and patients are shared with the doctor and all the doctors have access to fix and cancel the appointments. Similarly, patients are also authorized to view the doctors list and appointments. Following are the key points of the functionality of PAMS:
⦁ According to the system, patients get the basic information of the doctor, specialization, charges per hour and work hour.
⦁ The system will allow doctors to add/delete and update the schedule.
⦁ The doctors must be able to maintain per visit charges.
.Q1. Construct an Entity Relationship Diagram (ERD) using the identified entities, attributes and mention the valid relationships and cardinality between them.
Explain triggers & stored procedures. Why do we use them?
Benefits of triggers & procedures. Syntaxes & example of them.
A hospital has Patient Appointment Management System (PAMS), in which all the details of doctors, patients and appointments are given. In this scenario all the details of appointment and patients are shared with the doctor and all the doctors have access to fix and cancel the appointments. Similarly, patients are also authorized to view the doctors list and appointments. Following are the key points of the functionality of PAMS:
⦁ According to the system, patients get the basic information of the doctor, specialization, charges per hour and work hour.
⦁ The system will allow doctors to add/delete and update the schedule.
⦁ The doctors must be able to maintain per visit charges.
Q1. You are required to identify the entities for the above scenario.
Q2. You are also required to identify the attributes of each entity which is already identified in the above Q1.
Suppose that you need to store information of ’Person’ having a multivalued attribute called ’hobby’. A person’s
hobbies can be reading, writing, gardening, soccer, cricket, movies, etc. At present, the database table Person
can store only one hobby! As a database programmer, what would you do to store these multi values f hobbies?
The Person table schema:
Person(id, name, position, hobby)
Consider the following scenario and normalize the database upto 3NF - [10]
Best-East University is currently in need of a software system for course registration. The university has
more than one department and each department has many courses of a particular program such as the Bach-
elor and Masters program. A student may register (enroll) all or subset of offered courses for a trimester (e.g.
Spring, Summer, Fall). During the registration period, a student’s registration is authorized (signed) by the
batch advisor. A batch advisor is a faculty member assigned to the batch. Once the registration date is over, a
student may late register courses with a late registration fee. In the case of late registration, a student requires
the signature of both the batch advisor as well as the department chairman’s authorization.