This assignment focuses on database-connected applications. Other than SQL, you
ID: 3726983 • Letter: T
Question
This assignment focuses on database-connected applications. Other than SQL, you do not have to write any code, but for a perfect score, you should be able to check off every item on the list shown below:
You are designing a simple database connected application that contains one form and one table. The purpose of the application is to allow the user to enter new books into the library's inventory.
20 Points - Briefly describe your table. You discussion should include attributes, justification, and data type for each field. You should have at least five fields of your choosing.
10 Points - Write the SQL command to create the table that you described above.
10 Points - Write the SQL command to insert a record into the table.
10 Points - Write the SQL command to delete a record from the table.
10 Points - Write at least 2 conditional SELECT queries.
40 Points - Design a simple interface using the drag and drop tools in NetBeans to support inserting a record into your database table. Include a screenshot in your write-up.
Explanation / Answer
Ans:
allow the user to enter new books into the library's inventory. we need to Enter User_Id, Username,Book_id,Bookname,Author_name in Form. To store these values we have to create a table with Five Coulumns
Creating Table:
create table library(User_Id int , Username varchar2(50),Book_id int, Bookname varchar2(50), Author_name varchar2(50) primary key(User_Id,Book_id));
Inserting Data:
insert into library values(101,"Tom",152156,"Engineering Mathmatics","S.Chand");
Deleting Data:
delete from library where Book_id=152156;
Selecting data based condition:
select * from library where User_Id=101;
select * from library where Book_id=152156;