Exp 1
Exp 1
PART A
(PART A : TO BE REFFERED BY STUDENTS)
Experiment no: - 1
Theory: -
Main types of Database (DBMS):
1. Hierarchical
2. Network
3. Relational
4. Object relational
Relational Database Concept:
- It‟s basis for the relational database management system (RDBMS).
- The relational model consists of the following:
- Collection of objects or relations
- Set of operators to act on the relations
- Data integrity for accuracy and consistency.
- A relational database is a collection of relations or two-dimensional tables.
That is a relational database uses relations or two-dimensional tables to store
Information.
Relational Database Properties:
- Can be accessed and modified by executing structured query language
(SQL) statements
- Contains a collection of tables with no physical pointers
- Uses a set of operators.
SQL STATEMENTS:
Shipping
2 2 1
IT5 1 1
Conclusion:
You should have learned how to write & execute SELECT statements.
PART B
(PART B: TO BE COMPLETED BY STUDENTS)
(Students must submit the soft copy as per following segments within two hours of the practical. The soft copy
must be uploaded on the Blackboard or emailed to the concerned lab in charge faculties at the end of the
practical in case the there is no Black board access available)
1. Show the structure of the DEPARTMENTS table. Select all data from the table.
2. Create a query to display the last name, job code, hire date, and employee number for each employee,
with employee number appearing first. Provide an alias for the columns.
3. Create a query to display unique job codes from the EMPLOYEES table.
4. Display the last name concatenated with job ID, separated by a comma and space, and name the
column Employee and Title.
5. Create a query to display all data from the EMPLOYEE table. Separate each column by a comma.
Name the column THE_OUTPUT.
6. There are four coding errors in this statement. Can you identify them?
SELECT employee_id, last_name
Sal * 12 ANNUAL SALARY
FROM employees
B.3: Write the query execution sequence in terms of the clauses. (Sequences of clauses)