Professional Documents
Culture Documents
1.0 Rationale
a database with two tables holding specific data in its tuples. Executing queries with the use
of SELECT command with DDL command to get a desired output through certain conditions.
In the existing literature the emergency system were a blood receiver can get help from the
blood bank management system are described in the blood bank system have many problems
such as shortage of required blood, time duration to keep the blood safe, of required blood,
time duration to keep the blood safe.
A) SELECT COMMAND –
B) DDL Command–
A) SELECT COMMAND –
A SELECT/COMMAND statement retrieves zero or more rows from one or more database
tables or database views. In most applications, SELECT is the most commonly used data
query language (DQL) command. As SQL is a declarative programming language, SELECT
queries specify a result set, but do not specify how to calculate it. The database translates the
query into a "query plan" which may vary between executions, database versions and
database software. This functionality is called the "query optimizer" as it is responsible for
finding the best possible execution plan for the query, within applicable constraints.
Syntax –
Example:
DDL stand for Data Definition Language which is used to define or design the structure of
Database or table.
DDL COMMNAS
This command is used to create the table or defend structure of table. While creating a
table the name of table and its fields (column names) with its data type and size. The
command is terminated by ‘ ; ‘ Remember the following rule for creating table.
Syntax –
Example:
2) Alter command –
This command is used to make certain changes in structure of table after creating it. It helps
in modifying the table if we want to change data type or size of size of table, add new column
delete any column, etc.
Syntax –
Example:
3) Truncate command –
Truncate command is useful when you just want to delete the row only. After using this
command just data is delete the structure of table remain same i.e the table exist in database.
After truncate command, you can reenter the row in the table.
Syntax –
Example:
Truncate table doctor;
4) Drop command –
Drop with the help of this command the whole table can be delete. After using this command
the whole structure of database / table along with the data is deleted permanently.
So after this the table will not be present at any cost i.e the table not exist.
Syntax –
Example:
5)DESC –
The table structure can be seen with the help of DESC command. To check structure of table.
Syntax –
desc <table_name>;
Example:
Desc doctor;
4) Rename –
This command is used to rename a table from database i.e we can give a new name to table.
This command is preferable for changing name of table because the alter table command has
no power to d this. It can rename only column.
Systax –
Example:
5) Creating user –
Create user command is used to create the user. We need to specify user name and identify by
clause.
Syntax –
5. Executed queries by using DDL command with the help of SELECT command to tackle
and get output according to the conditions.
The project can be used in many aspects where there is a need of the database to store the
records of specific things be it a school, university or office. It can also be used in storing
data of any sport player, game’s statistics and many other things. Secondly the queries can be
used to learn DBMS more clearly and its various features.
QUERY :-
Create table :-
Alter table :-
Desc blood ;
Rename table:-
Drop table :-
REFERENCE
http://gis.jharkhand.gov.in>bbms
http://www.sciencedirect.com>co
http://www.studocu.com>doc
http://www.justdial.com