0% found this document useful (0 votes)
53 views116 pages

DBMS - FC

Uploaded by

Yuvraj Gagare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
53 views116 pages

DBMS - FC

Uploaded by

Yuvraj Gagare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 116
COMPUTER GROUP | SEMESTER - IlI| DIPLOMA IN ENGINEERING AND TECHNOLOGY A LABORATORY MANUAL FOR DATABASE MANAGEMNT SYSTEM (22319) ens DBMS2: 4 rE es 6 og ‘To ensure that the Diploma level Technical Education constantly matches the latest requirements of technology and industry and includes the all-round personal development of students including social concems and to become globally competitive, technology led organization. To provide high quality technical and managerial manpower, information and consultancy services to the industry and community to enable the industry and community to face the changing technological and environmental challenges, Winds We, at MSBTE are committed to offer the best in class academic services to the students and institutes to enhance the delight of industry and sociely. This will be achieved through continual improvement in management practices adopted in the process of curriculum design, development, implementation, evaluation and monitoring system along with adequate faculty development programmes. Ceaene easy MSBTE believes in the followings: ‘+ Education industry produces live products. + Market requirements do not wait for curriculum changes. + Question paper is the reflector of academic standards of educational organization. + Well designed curriculum needs effective implementation too. + Competency based curriculum is the backbone of need based program. + Technical skills do need support of life skills. + Best teachers are the national assets. + Effective teaching learning process is impossible without learning resources. A Laboratory Manual for Database Management System (22319) Semester-III (CO/CM/CW) Maharashtra State Board of Technical Education, Mumbai (Autonomous) (ISO:9001:2015) (ISO/IEC 27001:2013) Maharashtra State Board of Technical Education, (Autonomous) (ISO:2001:2015) (ISO/IEC 27001 :2013) 4th Floor, Government Polytechnic Building, 49, Kherwadi, Bandra ( East ), Mumbai - 400051 (Printed on June, 2018) MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Certificate This is to certify that Mr. / Ms. ....... Roll NO. vicceeeeeeseeeeeseeeeen , of Third Semester of Diploma in of Institute, (Code: ...............) has completed the term work satisfactorily in course Database Management System (22319) for the academic year 20........ to 20........ as prescribed in the curriculum. Place: Enrollment No: Date: occ Exam. Seat No: .... Subject Teacher Head of the Department Seal of Institution Database Management System (22319) Preface The primary focus of any engineering laboratory/ field work in the technical education system is to develop the much needed industry relevant competencies and skills. With this in view, MSBTE embarked on this innovative ‘I’ Scheme curricula for engineering diploma programmes with outcome-based education as the focus and accordingly, relatively large amount of time is allotted for the practical work. This displays the great importance of laboratory work making each teacher; instructor and student to realize that every minute of the laboratory time need to be effectively utilized to develop these outcomes, rather than doing other mundane activities. Therefore, for the successful implementation of this outcome-based curriculum, every practical has been designed to serve as a ‘vehicle’ to develop this industry identified competency in every student, The practical skills are difficult to develop through “chalk and duster’ activity in the classroom situation. Accordingly, the ‘I’ scheme laboratory ‘manual development team designed the practicals to focus on the outcomes, rather than the traditional age old practice of conducting practicals to ‘verify the theory’ (which may become a byproduct along the way). This laboratory manual is designed to help all stakeholders, especially the students, teachers and instructors to develop in the student the pre-determined outcomes. It is expected from each student that at least a day in advance, they have to thoroughly read through the concemed practical procedure that they will do the next day and understand the minimum theoretical background associated with the practical. Every practical in this manual begins by identifying the competency, industry relevant skills, course outcomes and practical outcomes which serve as a key focal point for doing the practical. The students will then become aware about the skills they will achieve through procedure shown there and necessary precautions to bbe taken, which will help them to apply in solving real-world problems in their professional life. This manual also provides guidelines to teachers and instructors to effectively facilitate student- centered lab activities through each practical exercise by arranging and managing necessary resources in order that the students follow the procedures and precautions systematically ensuring the achievement of outcomes in the students, This course aims to develop skills in students to create, store, modify, manage and extract information from a database, Database system can be used as a backend for developing database applications. Although best possible care has been taken to check for errors (if any) in this laboratory ‘manual, perfection may elude us as this is the first edition of this manual. Any errors and suggestions for improvement are solicited and highly welcome. Maharashira Stats Board of Technical Education 7 Database Management System (22319) Programme Outcomes (POs) to be achieved through Practical of this Course:- POI. Basic knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the broad-based Computer engineering problem. PO2, Discipline knowledge: Apply Information Technology knowledge to solve broad- based Information Technology related problems. PO3. Experiments and practice: Plan to perform experiments, practices and to use the results to solve Information Technology related problems. PO4. Engineering tools: Apply appropriate Information Technology related techniques/ tools with an understanding of the limitations. POT. Ethics: Apply ethical principles for commitment to professional ethics, responsibilities and norms of the practice also in the field of Computer engineering, POS. Individual and team work: Function effectively as a leader and team member in diverse/ multidisciplinary teams. PO9. Communication: Communicate effectively in oral and written form. POLO. Life-long learning: Engage in independent and life-long learning activities in the changes in the Computer engineering field and allied industry. context of technologi Maharashira Stats Board of Technical Education i Database Management System (22319) Practical- Course Outcome matrix [Course Outcomes (COs) a. Design Normalized database on given data. », Create and Manage Database using SQL command. c. Able to write PL/SQL code for given database. 4. Apply triggers to database also create procedure and function according to condition. ¢. Apply security and confidentiality on given database. S.No. Practical Outcome T._| Perform following in GUI based database y software using GUI only i) Create Database ii) Create tables and assign primary key iii) Modify the table structure-add column, change the data type of column, delete the column from table. iv) Insert, update and delete the record from table. ¥) Retrieve data from the table according to condition given Z,_| Perform following in GUI based database using GUI only i) Apply given validation on table and set error messages. ii) Set default value for column. iii) Set and remove database password. Design E-R diagram and Create Normalized Database on given data. 1) Create and Execute DDL commands using SQL. ii) Apply following Integrity constraints on table: iii) Primary key, Foreign key, Unique key constraint, Null, Not Null and Check constraint. Create and Execute DML. commands using SQL. 6 Write Queries using following operators: Maharashira Stats Board of Technical Education Database Management System (22319) “Arithmetic Operators, Comparison Operators,Logical Operators, Set Operators, Range Searching operators-Between, Pattern matching operators-Like, Write Queries using following Functions: String, Arithmetic, Date and time, Aggregate Functions. Execute Queries using the Select command with Where, Having, Group by and order by clauses, Execute the queries for implementation of Inner and Outer Join 10. Implement Views ’) Create different views ii) Insert, modify and delete records through views. iii) Delete the views Create and Execute Indexes, Sequences, and synonyms in SQL. Write a PL/SQL programs using ifthen else, for, while and nested loop. Write @ PL/SQL code to implement implicit and explicit cursors. 7 Write PL/SQL Programs based on Exceptions handling (Predefined and user-defined exceptions) v v Write PL/SQL code to ereate Procedures and functions. Y Write PL/SQL code to create triggers on given database, Executing DCL commands using SQL i) Create users ii) Grant privileges to users iii) Revoke privileges from users, Maharashira Stats Board of Technical Education Database Management System (22319) List of Industry Relevant Skills The following industry relevant skills of the competency ‘Create and Manage Database using SQL’ are expected to be developed in you by undertaking the practical’s of this laboratory manual. 1. Normalize and Create Database 2. Apply constraints. 3. Write SQL queries and PL/SQ code. Guidelines to Teachers 1. There will be two sheets of blank pages after every practical for the student to reportother ‘matters (if any), which is not mentioned in the printed practicals, 2. For difficult practicals if required, teacher could provide the demonstration of the practical ‘emphasizing of the skills which the student should achieve. 3. Teachers should give opportunity to students for hands-on after the demonstration, 4. Assess the skill achievement of the students and COs of cach unit. 5. One or two questions ought to be added in each practical for different batches. For this teachers can maintain various practical related question bank for each course. 6. For effective implementation and attainment of practical outcomes, teacher ought to ensure that in the beginning itself of each practical, students must read through the complete wri up of that practical sheet. 7. During practical, ensure that each student gets chance and takes active part in taking. observations! readings and performing practical. 8. Teacher ought to assess the performance of students continuously according to the MSBTE guidelines. Maharashira Stats Board of Technical Education Database Management System (22319) Instructions for Students Note: Kindly do add specific instructions for students for effective implementation of practicals depending upon your course, if needed. 1. For incidental writing on the day of each practical session every student should maintain a dated log book for the whole semester, apart from this laboratory manual which s/he has to submit for assessment to the teacher in the next practical session. 2. For effective implementation and attainment of practical outcomes, in thebeginning it of each practical, students need to read through the complete write-up including the Practical related questions and assessment scheme of that practical sheet. 3, Student ought to refer the reference books, lab manuals, ete, 4, Student should not hesitate to ask any difficulties they face during the conduct of practicals Maharashira Stats Board of Technical Education i Database Management System (22319) Content Page sr. No Title of the Practical Date of perfor Date of submi Assess ment marks Dated lor teacher IRemarks| Gfany) Perform following in GUI based database software using GUI only i) Create Database ii) Create tables and assign primary key. iii) Modify the table structure-add column, change the data type of column, delete the column from table. iv) Insert, update and delete the record from table. v) Retrieve data from the table according to condition given Perform following in GUI based database using GUI only i) Apply given validation on table and set error messages. i) Set default value for column. iii) Set and remove database password. Design E-R diagram and Create ‘Normalized Database on given data. 10 1) Greate and Execute DDL commands using SQL. ii) Apply following Integrity constraints on table: iii) Primary key, Foreign key, Unique key constraint, Null, Not Null and Check constraint, Create and Execute DML commands using SQL. 6 Write Queries using following operators: Arithmetic Operators, Comparison Operators, Logical Operators, Set Operators, 29 Maharashira Stats Board of Technical Education Database Management System (22319) Daof Date, Dated | Remarks Page| perfor | submi |*SS°55MEM4 sign, (if any) sr Title of the Practical {Page| Perfor | submi/SIIELI" sign. | Ganyy No . - teacher Range Searching operators-Between, Pattern matching operators-Like. Write Queries using following Functions 7. | String, Arithmetic, Date and time, 35 Aggregate Functions, Execute Queries using the Select g, | command with Where, Having, Group by | 4) and order by clauses Execute the queries for implementation 9. | of Inner and Outer Join. 46 Implement Views i) Create different views 10. | ii) Insert, modify and delete records 51 through views. iii) Delete the views Create and Execute Indexe Sequences, 11. | and synonyms in SQL. 55 Write a PL/SQL programs using if then 12. | else, for, while and nested loop. 59 Write a PL/SQL code to implement 66 13. | implicit and explicit cursors. Write PL/SQL Programs based on 14, | Exceptions handling (Predefined and n user- defined exceptions) Write PL/SQL code to create Procedures 15. | and functions. 80 Write PL/SQL code to create triggers 16. | on given database. 87 Executing DCL commands using SQL i) Create users ii) Grant privileges to users iii) Revoke privileges from users. Total * Tobe transferred to Proforma of CIAAN-2017. ‘Maharashira State Board of Technical Education vil Database Management System (22319) . mm. Vv. Vi. Practical No.1: Write Ms Access Code to create database, table and modify table Practical c Microsoft Access is a Relational Database Management System (RDBMS), designed primarily for home or small business use. Student should be able to create and execute MS Access database, table and modify table structure by adding a new column, changing the datatype of column, deleting the column from table, insert/update/delete record from table, retrieve data from table according to condition given. Relevant Program Outcomes (POs): + Basie knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the broad-based Computer engineering problem. + Discipline knowledge: Apply Computer engineering discipline - specific knowledge to solve core computer engincering related problems. + Experiments and practice: Plan to perform experiments and pra the results to solve broad-based Computer engineering problems * Individual and team work: Function effectively as a leader and team member in diverse/ multidisciplinary teams. © Communication: Communicate effectively in oral and written form, Competency and Practical skills: This practical is expect to develop the following skills in you Develop MS Access code to solve computer engineering related problems. 1. Write MS Access code to create Database. 2. Write MS Access code to create table and assign primary key. 3. Write MS Access code to modify table. 4, Follow ethical practices. Relevant Course Outcomes: ‘© Create and Manage Database using SQL command. Practical Outcome (POs): + Perform following in GUI based database software using GUI only i) Create database ii) Create tables and assign primary key iii) Modify the table structure-add column, change the datatype of column, delete the column from table. iv) Insert, update and delete the record from table. v) Retrieve data from the table according to condition given, Relevant Affective domain related Outcome(s 1. Follow safety measures 2. Follow ethical practices, Maharashira State Board of Technical Education T Database Management System (22319) vu. vu. Ix. M imum Theoretical Background: Microsoft Access stores information which is called a database, To use MS Access, you will need to follow these four steps = Database Creation ~ Create your Microsoft Access database and specify what kind of data you will be storing. Data Input ~ After your database is created, the data of every business day can be entered into the Access database. Query ~ This is a fancy term to basically describe the process of retrieving, information from the database. Report (optional) ~ Information from the database is organized in a nice presentation that can be printed in an Access Report. Procedure: vii, viii xii, xiii Xv. xvii. Start Database. Click the “Blank desktop database” template. ‘Type a file name for the database. Choose the folder where to store database. Click the Create button. Save the database. Use different features on it and apply it on database Create or Open Database. Create table Suitable name for table. Add fields on table. Name of field should be as per proper convention. Choose appropriate data types for representation of type of data Check the validity of data in each field. Such as primary key assignment. Save the table. Close the table. Close the database Resources required: Sr. Name of co No. Resource Specification Qty. Remarks Hardware: ‘Computer (13-15 preferable), computer system, | RAM minimum 2 GB and onwards, HDD S00GB ‘As per batch For all 2 | Operating Windows 7 and above size Experiments system: /LINUX version 5.0 or later 3 ‘Any MS Access software “Maharashira State Board of Technical Education 2 Database Management System (22319) . Precautions: All SQL statements must end with a semicolon (;). Follow safety practices. XI. Resources used: S.No] Name of Resource Specification T_| Computer System with broad specifications 2 | Software 3_ | Any other resource used XII. Result (Output of the executed query): XIII. Practical Related Questions: Note: Below given are few sample questions for reference. Teachers must design more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise. Use blank pages provided or attach more pages if needed.) 1. Name the types of GUI databases available in your laboratory. 2. Write down the procedure for creating tables in a database. 3. Name open source SQL database management system. [Space for Answers] Maharashira Slate Board of Technical Pdacation 3 Database Management System (22319) xIv. Exercise: Attempt QI. and teacher shall allot Q. 2 TO Q.5 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1) Create ‘student’ database and save the database. 2) Create ‘Employee’ database and save it. 3) Create multiple tables in database “Employee” and rename it. 4) Create multiple tables in database for ‘student’ database 5) View the multiple tables in ‘student’ database [Space for Answers] Maharashira State Board of Technical Education Database Management System (22319) XV. References / Suggestions for further Reading: https://www.ischool.utexas.edu/technology/tutorials/office/ace arti ng.php XVI. Assessment Scheme: Performance indicators Welghtage Process related (15 Marks) 60% 1, | Formation of MS Access Code 25% 7,_| Execution of MS Access Code 25% Follow ethical pra 10% Product related (10 Marks) 40% 4. | Correctness of MS Access Code 15% 5. | Timely Submission of Practical 15% 6. | Answer to sample questions 10% Total (25 Marks) 100% List of Student Team Members 1 2. 4 Marks Obtained Dated signature Process | Product Related(15) | Relatea(ta | _Tt#!@5) Maharashira State Board of Technical Education Database Management System (22319) Practical No.2: Write MS Access Code to apply given validation on table and set error messages, set default value for column, set and remove database . L. Iv. Vi. vil. password. Practical Signifieanc Student will learn to create a simple structure of database which contains multiple tables. Each table has its own structure. This practical is useful to apply validation on table and set error messages, set default value for column, set and remove database password. Relevant Program Outcomes (POs): * Basic knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the broad-based Computer engineering problem. + Discipline knowledge: Apply Computer engineering discipline - specific knowledge to solve core computer engineering related problems. * Experiments and practice: Plan to perform experiments and practices to use the results to solve broad-based Computer engineering problems * Individual and team work: Function effectively as a leader and team member in diverse/ multidisciplinary teams. * Communication: Communicate effectively in oral and written form, Competency and Practical skills: This practical is expect to develop the following skills in you Develop MS Access code to solve computer enginee Write MS Access code to apply given validation. Write MS Access code to set default value for column. Write MS Access code to set and remove database password. Follow ethical practices, 1g related problems. BENS Relevant Course Outcomes: * Create and Manage Database using SQL command Practical Outcome (POs): 1) Perform following in GUI based database using GUI only 2) Apply given validation on table and set error messages. 3) Set default value for column, 4) Set and remove database password. Relevant Affective domain related Outcome(s): 1. Follow safety measures 2. Follow ethical practices. Minimum Theoretical Background: Protecting the validity of your data is one of the most important tasks of a database developer. To ensure that users enter accurate data, start at the foundation. By using validation rules, you can ensure accurate data entry. You can use the Validation Rule property to specify requirements for data entered into a record, field, or control, When data is entered that violates the Validation Rule setting, you can use the Validation Text property to sp Maharashira State Board of Technical Education 6 Database Management Systems (22319) The Validation Rule and Validation Text properties don't apply to check box, option button, or toggle button controls when they are in an option group. They apply only to the option group itself. Set the Default Value of each control so they offer the same value as soon as you move into the new record. VIII. Procedure: 1. Open Database. 2, Open the table in Design View 3. At the bottom of the screen find the "Validation rule” field. 4, In the Validation Rule field type validation rule. 5, In the Validation Text field type an error message like, 6. Save the database. 7. Use different features on it and apply it on database 8. Close the database IX. Resources required: Sr. ‘Name of Specificati marl No Resource Specification Qty. Remarks 1 | Hardware: Computer (13-15 preferable), ‘computer system, | RAM minimum 2 GB and onwards, HDD 500GB As per batch For all 2 | Operating Windows 7 and above size Experiments system: LINUX version 5.0 or later Software “Any MS Access software. X. Precautions: i) AIL SQL statements must end with a semicolon (;) ii) Follow safety practices. XI. Resources used: S.No] Name of Resource Specification T_ | Computer System with broad specifications 2 | Software 3__| Any other resource used XI Result (Output of the executed query): Maharashtra Slate Board of Technical Education 7 Database Management System (22319) xl xIv Practical Related Questions: Note: Below given are few sample questions for reference. Teachers must design ‘more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Apply validation to restrict an hours worked field to values between 0 and 40 (inclusive), To do so, you'd use the following expression on an Integer field: <=40 And >=0, When a user enters a value other than 0 through 40, Access displays an error message and rejects the input value. 2. Seta default date value in a text box when the user adds a new record. 3. What is the use of Validation Rule and Validation Text. Exereise: Attempt Q1. and teacher shall allot Q. 2 TO Q.5 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1, Create a validation rule for a field that allows only values over 65 to be entered. Ifa number less than 65 is entered, a message is displayed. 2. Set course name as a default value in a text box when the user adds a new record, 3. Create a validation rule for a PARENT_MOBILE_NO field that allows only any value that consists of 10 number values. “Mobile number must consist of 10 numbers” this message is displayed if the value entered doesn't conform to the Validation Rule. 4, Seta database-level password on a database. 5, Remove a database-level password from a database [Space for Answers] Maharashira State Board of Technical Education Database Management System (22319) XV__ References / Suggestions for further Reading: 1. httpy//en.tekstenuitleg net/articles/software/access-validation-rule-tutorial 2, http://allenbrowne.com/ValidationRule.html XVI Assessment Scheme: Performance indicators Weightage Process related (15 Marks) 60% 1, _ | Formation of MS Access Code 25% >, _ | Execution of MS Access Code 25% Follow ethical practices. 10% Product related (10 Marks) 40% 4. | Correctness of MS Access Code 15% 5. | Timely Submission of Practical 15% 6. | Answer to sample questions 10% Total (25 Marks) 100% List of Student Team Members Rew Marks Obtained Dated signature of Teacher Process | Product Related(15) | Relateacto) | _Tetal@5) Maharashira State Board of Technical Education Database Management System (22319) fa mm. Vv. Vi. vu. Practical No.3: Design ER Diagram and Normalize Database Practical Significance: Student should be able to identify the entities and relationship among them. The proper ER Diagram should be transformed into proper tables using normalization concepts to remove all the updation anomalies for ensuring data dependency. This practical is useful to inculeate these skills in students. Relevant Program Outcomes (POs): ‘* Discipline knowledge: Apply Computer Programming knowledge to solve broad- based Computer related problems. + Experiments and practice: Plan to perform experiments and practices to use the results to solve broad-based Computer related problems. + Engineering tools: Apply relevant Computer programming tools with an understanding of the limitations, © Communication: Communicate effectively in oral and written form. ‘© Life-long Learning: Engage in independent and life-long learning activities in the context of technological changes in the Computer engineering field and allied industry. Competency and Practical skills: This practical is expect to develop the following skills: Draw an E-R Diagram and Normalize the database of any systems 1, Identify attributes and relationship for E-R Diagram. 2. Normalize the database using normalization concepts, 3, Draw E-R Diagram for the given database. 4, Draw tables for the normalized database. Relevant Course Outeome(s): ‘Design Normalized database on given data. Practical Outcome (POs): a) Design E-R diagram and Create Normalized Database on given data, Relevant Affective domain related Outcome( 1, Select appropriate ER Diagram Notations and Normal Forms, 2. Follow safety measures. 3. Follow ethical practices. Minimum Theoretical Background: Entity —Relationship Model: ER-Diagram is a graphical representation of data that describes how data is communicated and related to each other. Any object, such as entities, attributes of an entity, sets of relationship and other attributes of relationship can be distinguished with the help of the ER diagram. Entities are represented using the rectangle box. These rectangles are named with the entity set they represent Maharashira State Board of Technical Education 10 Database Management System (22319) Attributes are the properties of entities, represented by ellip: directly connected to its entity. Attributes can be classified as: 1) Simple Attribute 2) Composite Attribute 3) Multivalued Attribute 4) Derived Attribute e figures. Graphical representation of Entity, attributes and Relationship are All attributes are Symbol Meaning Symbol Meaning Multivalued Attribute Patient Entity Doctor ry Simple Attribute Derived Attribute Lines to link street Relationship Relationships: ‘There are four types of relationships. These are: © One-to-one © One-to-many © Many-to-one «© Many-to-many Maharashira State Board of Technical Education Database Management System (22319) C= > <) a N a = <=> § = i . = 4 => Figl. ER Diagram for _Hospital Management System Normalizatio Consider the ER Diagram of Figl. For Hospital Management System. By applying Normalization the tables formed are as follows: Hospital: Hosp-id_ | Primary Key HCity HAddress Hos-Name Maharashira State Board of Technical Education BR Database Management System (22319) Pat-id Foreign key references to Pat-id of Patient table Doc-id Foreign key references to Doc-id of Doctor table Primary Key PName PAddress PDiagnosis Record-id Foreign key references to Record-id of Medical Record table Hosp-id Foreign key references to Hosp-id of Hospital table Medical record: Record-i Primary Key Problem Date_of_examination Pat-id |Foreign key references to Pat-id of Patient table Doctor: Do id Primary Key DName Qualification Salary Hosp-id Foreign key references to Hosp-id of Hospital table VIII. Procedure: i, Consider the Database ii, Normalize using normal forms ili, Draw ER diagrams Maharashira State Board of Technical Education Database Management System (22319) IX. Resources required: [Mame OU Specification Quantity Remarks T_| Hardware: mmputer (3-15 preferable), Computer RAM minimum 2 GB and System onwards Z| Operating 5 Windows XP/Windows TILINUX version 5.0 ot later_| As per batch Forall 3 | Software MS-Acce size Experiments Any RDBMS software (MysqL/soL server/Oraclel Og Express Edition ) X. Precautions: 1. Use appropriate Notations for E-R Diagrams. 2. Properly Normalize database using INF,2NF and 3NF 3. Follow safety practices XI. Resourees used: S.No] Name of Resource Specification T_ | Computer System with broad specifications 2 | Software 3_ | Any other resource used XII Result (Output of the Program): Practical Related Questions: Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Draw notations for Multivalued and Derived Attribute. Maharashira Stale Board of Technical Education 14 Database Management System (22319) abe Fig2.ER Diagram for Student Borrowing Books Published by Publisher i) Identify Derived Attribute ii) Identify Multivalued Attribute iii) Identify Primary Key and Foreign Key 3. Consider the database of Fig2.and Draw normalize tables upto 3NF ‘Theory Related Questions:: (1) Draw notations for strong & weak entity. (2) Difference between strong & weak entity, (Space for answers) Maharashira State Board of Technical Education 15 Database Management System (22319) XIV. Exercise: Attempt QI. and Q.2 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Draw ER Diagram for Railway Reservation System using minimum 4 entities.(Hint: Customer_Details, Train_Details,Payment_Details ete) 2. Normalize the database of Railway Reservation System upto 3NF. (Space for answers) Maharashira State Board of Technical Education 16 Database Management System (22319) XV. References / Suggestions for further Reading: www w3schools.com XVI. Assessment Scheme: Performance indicators Weightage Process related (15 Marks) 60% 1, | Formation of MS Access Code 25% Execution of MS Acoess Code 25% Follow ethical practices. 10% Product related (10 Marks) 40% 4. | Correctness of MS Access Code 15% 5. | Timely Submission of Practical 15% 6. | Answer to sample questions 10% Total (25 Marks) 100% List of Students ‘Team Members Marks Obtained Dated signature of Teacher Process Related(15) Product Related(10) Total(25) Maharashira State Board of Technical Education Database Management System (22319) Iv. Vi. vu. Practical No. 4: Execute SQL Queries based on DDL Commands Practical Significance: Design database by applying the constraints and modify the structure of table. These practical skills will help them to create proper database. Relevant Program Outcomes (POs): ‘+ Basic knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve database related problems. ‘+ Discipline knowledge: Apply Computer Programming knowledge to solve broad- based Electronics related problems. + Experiments and practice: Plan to perform experiments and practices to use the results to solve broad-based Electronics related problems. + Engineering tools: Apply relevant Computer programming technologies and tools with an understanding of the limitations. © Communication: Communicate effectively in oral and written form. ‘+ Life-long Learning: Engage in independent and life-long learning activities in the context of technological changes in the Computer engineering field and allied industry. Competency and Practical skills: This practical is expect to develop the following skills: Create and modify database structure for maintaining any information. 1. Write and Execute SQL. queries for creating and altering table structure with all integrity constraints, 2. Write and Execute SQL queries for changing the structure of table. 3. Write and Execute SQL queries for Removing structure of table and Renaming the table names.. Relevant Course Outcome(s): Create and Manage Database using SQL command. Practical Outcome (POs): a) Write and Execute SQL queries for creating and modifying the database structure. Relevant Affective domain related Outeome(s): 1, Select proper SQL Statement for creation and modification of database structure. 2. Follow safety measures 3. Follow ethical practices. Minimum Theoretical Background: Basic SQL Dat: pes: 1, CHAR(SIZE) 2. VARCHAR/VARCHAR2(SIZE) Maharashira State Board of Technical Education 18 Database Management System (22319) NUMBER(?,S) DATE LONG RAW/LONG RAW ana DDL Commands: It is set of SQL commands used to create, modify and delete database structure but not data. These commands normally used by DBA. 1. CREA ALTER DROP RENAME TRUNCATE DESCRIBE anaes Create Table Syntax: Create table table_name (column! name datatype(size), column2 name datatype(size)......); Example: Create table stud (Stud_Name varchar2(20),RolIno Number,DOB Date); VIII. Procedure i, Normalize the database ii, Create the database iii, Alter the database iv. Drop the database IX. Resources required: Sr. | Name of | Specification Quantity Remarks No. _| Resource T_| Hardware ‘Computer (13-15 preferable), ‘Computer RAM minimum 2 GB and System onwards and HDD with minimum 10GB As per batch For all 2 | Operating system | Windows XP/Windows size Experiments T/LINUX version 5.0 or later 3 | Software Oracle/MySQLISQL SERVER2005/2008/2015 X. Precautions: 1, All SQL statements must end with a semicolon (3) 2. White space used in SQL to describe blanks and tabs. 3. Follow safety practices “Maharashira State Board of Technical Education Database Management System (22319) XI. Resources used: S.No] Name of Resource Specification T_| Computer System with broad specifications Z| Software 3 | Any other resource used XIL Result (Output of the SQL Commands): XIII. Practical Related Questions: Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1, Create a table EMPLOYEE with following schema: Emp(Emp_no as primary key, E_name,, Dept_no, Dept_name,Job_id , Salary) 2. Create a tables EMPLOYEE and DEPARTMENT with following schema by applying Primary key and Foreign key: Emp(empno as primary key empname, salary, phno) Dept(deptno primary key, empno foreign key, deptname, location) Theory Questions: (J) List DDL Commands with syntax. (2) Use of Describe Command, (3) Analyze the difference between drop & truncate, (Space for answers) Maharashira State Board of Technical Education 20 Database Management System (22319) XIV. Exercise: Attempt QI. and teacher shall allot Q. 2 to Q.4 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Create table for stud using attributes Rollno, studname, percentage)apply primary key for rolino and check constraint on percentage should not greater than 100. Change the stud table structure by adding column city. Increase the size by 10 of studname column. Write output of the following REN a) Create table Write output here passenger_details(passenger_Name varchar2(30), train_details varchar2(30),travelling_date date birthdate date); ByAlter table stud add column Ticket_cost number; (Space for answers) Maharashira State Board of Technical Education 2 Database Management System (22319) XV. References / Suggestions for further Reading: www.w3school.com XVI. Assessment Scheme: Performance indicators Welghtage Process related (15 Marks) 60% 1, | Formation of MS Access Code 25% 2_| Execution of MS Access Code 25% 3.__| Follow ethical pra 10% Product related (10 Marks) 40% 4. | Correctness of MS Access Code 15% 5. | Timely Submission of Practical 15% 6. | Answer to sample questions 10% Total (25 Marks) 100% List of Students /Team Members 2 3 Marks Obtained Pre enature Process | Product Related(15) | Related(10) Total(25) Maharashira State Board of Technical Education 2 Database Management System (22319) I. Iv. Vi. vu. Practical No. 5: Execute DML Commands in SQL Practical Significance: Student should be able to create a database table using integrity constraints and should be able to use Data manipulation language to insert, upadate, delete and manage the database. This will help to understand different issues involved in design and implementation of databas. Relevant Program Outcomes (POs): * Discipline knowledge: Apply Computer engineering discipline - specific knowledge to solve core computer engineering related problems. ‘+ Experiments and practice: Plan to perform experiments and practices to use the results to solve broad-based Computer engineering problems. ‘+ Engineering tools: Apply relevant Computer technologies and tools with an understanding of the limitations, + Communication: Communicate effectively in oral and written form. Competency and Practical skills: This practical is expect to develop the following skills: Design and Execute Data Manipulation Language Queries 1. Creating the database table, 2. Insert single or multiple rows into the table. 3. Update single and multiple rows of the table, 4, Delete single and multiple rows of the table. Relevant Course Outcome(s): ‘© Create and Manage Database using SQL commands Practical Outcome (POs): a) Create and Execute DML commands using SQL. Relevant Affective domain related Outcome(s): 1. Follow safety measures 2. Follow ethical practices. Minimum Theoretical Background: Data Manipulation Language(DML): DML statements are used to insert single as well as multiple rows/tuples, update single or multiple rows/tuples in the table, delete single or multiple rows/tuples from the table and to retrieve the data ic. rows/tuples from the table. The different DML commands used are: 1) INSERT 2) UPDATE 3) DELETE 4) SELECT 1) INSERT INTO: This statement is used to add new rows/tuples into the relation/table. There are three type of INSERT INTO queries: Maharashira State Board of Technical Education 3 Database Management System (22319) + Inserting a single record * Inserting a multiple records + Inserting a records from another relation/table 2) UPDATE-SET-WHERE: This statement is used to update or modify single or multiple rows/tuples of the relation/table. 3) DELETE: This statement is used to delete single or multiple rows/tuples from the relation/table. When all rows/tuples are deleted the structure of relation/table is still retained. 4) SELECT : This statement is used to retrieve information from the table/relation. The DISTINCT keyword with select is used to retrieve only distinct rows/tuples. You can use WHERE clause to retrieve the rows/tuples with specific conditions. WHERE clause filters the rows retrived from the relation/table and gives only the rows/tuples satisfying the conditions. VIII. Procedure: i. _ Using the appropriate database to create table by applying integrity constraints. ii, Insert single or multiple rows by using INSERT command. iii, Display the contents of the table using SELECT command, iv. Update single or multiple rows using UPDATE-SET-WHERE command by giving specific condition in WHERE clause. v. Display the contents of the table using SELE updations. vi, Delete single or multiple rows using DELETE command. Use WHERE clause by giving specific condition in WHERE clause to delete particular rows from the table. vii. Display the contents of the table using SELECT command to check whether rows are deleted. command to check the IX. Resources required: Nee ce Oe Specification Quantity Remarks T_| Hardware ‘Computer (3-15 preferable), Computer RAM minimum 2 GB and System onwards, HDD of 160GB Z| Operating system | Windows Tand Above/LINUX version 5.0 or | As per batch Forall later size Experiments 3_| Software Any RDBMS software (MySQLisoL server/Oracle 0g Express Edition ) Precautions: 1. All SQL statements must end with a semicolon (3). 2. Follow safety practices “Maharashira State Board of Technical Education 24 Database Management System (22319) XI. Resources used: 'S. No] Name of Resource Specification T_ | Computer System with broad specifications 2 | Software 3 | Any other resource used XIL. Result (Output of the Executed Queries): Practical Related Questions: Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Create a table EMPLOYEE with following schema: Emp(Emp_no, E_name,, Dept_no, Dept_name,Job_id , Salary,hiredate) 2, Insert muitiple rows in the above table Emp using single INSERT command of SQL. 3. Execute the following queries ,debug the errors and write the output: a. Insert into Emp(Emp_no,E_name,Dept_no,Dept_name,Job_id,Salary,hiredate) Values(1, "Shreyas’,100,Sales,111,40000,"28-09-2014"); b. Delete Emp where E_name=Shreyas; cc, Update set salary ~50000 where dept_no-production ._ Select * from where salary >=25000 and <=60000 Theory Question: (1)Analyze the difference between drop & delet (2)How to delete multiple records? (3)Mention TRUE/FALSE, Justify “After ‘drop table’, the structure of the database remain same”. (Space for answers) Maharashira Stale Board of Technical Education 25

You might also like