Database Management Systems
|
|
- Julian Banks
- 6 years ago
- Views:
Transcription
1 S.Y. B.Sc. (IT) : Sem. III Database Management Systems Time : 2½ Hrs.] Prelim Question Paper Solution [Marks : 75 Q.1 Attempt the following (any THREE) [15] Q.1 (a) Explain database system and give its applications along with purpose of database [5] systems. (A) Databases are widely used. Here are some representative applications : Enterprise Information Banking and Finance Universities Airlines Telecommunication Purpose of Database Systems : System programmers wrote these application programs to meet the needs of the university. Keeping organizational information in a file-processing system has a number of major disadvantages: Data redundancy and inconsistency : This redundancy leads to higher storage and access cost. In addition, it may lead to data inconsistency; that is, the various copies of the same data may no longer agree. Difficulty in accessing data : The conventional file-processing environments do not allow needed data to be retrieved in a convenient and efficient manner. More responsive data-retrieval systems are required for general use. Data isolation : Because data are scattered in various files, and files may be in different formats, writing new application programs to retrieve the appropriate data is difficult. Integrity problems : The data values stored in the database must satisfy certain types of consistency constraints. Atomicity problems : In many applications, it is crucial that, if a failure occurs, the data be restored to the consistent state that existed prior to the failure. Concurrent-access anomalies : For the sake of overall performance of the system and faster response, many systems allow multiple users to update the data simultaneously. Security problems : Not every user of the database system should be able to access all the data. Q.1 (b) Explain 3 levels of database architecture. [5] (A) A database system is a collection of interrelated data and a set of programs that allow users to access and modify these data. A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data are stored and maintained. Data Abstraction : Developers hide the complexity from users through several levels of abstraction, to simplify users interactions with the system: Physical level : The lowest level of abstraction describes how the data are actually stored. The physical level describes complex low-level data structures in detail. Logical level : The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data. The logical level thus describes the entire database in terms of a small number of relatively simple structures. 1
2 This is referred to as physical data independence. Database administrators, who must decide what information to keep in the database, use the logical level of abstraction. View level : The highest level of abstraction describes only part of the entire database. The view level of abstraction exists to simplify their interaction with the system. The system may provide many views for the same database. Q.1 (c) Explain types of attributes with examples. [5] (A) Simple and composite attributes : Composite attributes, on the other hand, can be divided into subparts (that is, other attributes). For example, an attribute name could be structured as a composite attribute consisting of first name, middle initial, and last name. Example Simple attribute eid Composite attribute ename, FN, MN, LN Single-valued and multivalued attributes: The attributes in our examples all have a single value for a particular entity. For instance, the student ID attribute for a specific student entity refers to only one student ID. Such attributes are said to be single valued. There may be instances where an attribute has a set of values for a specific entity. Suppose we add to the instructor entity set phone number attribute. This type of attribute is said to be multivalued. Example Single valued attribute eid Multivalued attribute Phno. Derived attribute: The value for this type of attribute can be derived from the values of other related attributes or entities. As another example, suppose that the instructor entity set has an attribute age that indicates the instructor s age. If the instructor entity set also has an attribute date of birth, we can calculate age from date of birth and the current date. Thus, age is a derived attribute. Q.1 (d) List and explain 12 codd s Rules. [5] (A) 1. Information : All information in a relational database must be logically represented as column values in rows within tables. 2. Guaranteed access : Every value in a table is guaranteed to be accessible through a combination of table name, primary key value, and column name. 3. Systematic treatment of nulls : Nulls must be represented and treated in a systematic way, independent of data type. 2
3 4. Dynamic online catalog based on the relational model : The metadata must be stored and managed as ordinary data that is, in tables within the database. Such data must be available to authorized users using the standard database relational language. 5. Comprehensive data sublanguage : The relational database may support many languages; however, it must support one well-defined, declarative language as well as data definition, view definition, data manipulation (interactive and by program), integrity constraints, authorization, and transaction management (begin, commit, and rollback). 6. View updating : Any view that is theoretically updatable must be updatable through the system. 7. High-level insert, update, and delete : The database must support set-level inserts, updates, and deletes. 8. Physical data independence : Application programs and ad hoc facilities are logically unaffected when physical access methods or storage structures are changed. 9. Logical data independence : Application programs and ad hoc facilities are logically unaffected when changes are made to the table structures that preserve the original table values (changing order of columns or inserting columns). 10. Integrity independence : All relational integrity constraints must be definable in the relational language and stored in the system catalog, not at the application level. 11. Distribution independence : The end users and application programs are unaware of and unaffected by the data location (distributed vs. local databases). 12. Nonsubversion : If the system supports low-level access to the data, users must not be allowed to bypass the integrity rules of the database. 13. Rule zero : All preceding rules are based on the notion that to be considered relational, a database must use its relational facilities exclusively for management. Q.1 (e) Draw an ER diagram for Hospital Management System. [5] (A) Q.2 Attempt the following (any THREE) [15] Q.2 (a) Explain different types of keys with examples. [5] (A) Types of Keys : (a) Superkey : An attribute or combination of attributes that uniquely identifies each row in a table. 3
4 (b) Candidate key : A minimal (irreducible) superkey; a superkey that does not contain a subset of attributes that is itself a superkey (c) Primary key : A candidate key selected to uniquely identify all other attribute values in any given row; cannot contain null entries. (d) Foreign key : An attribute or combination of attributes in one table whose values must either match the primary key in another table or be null. (e) Secondary key : An attribute or combination of attributes used strictly for data retrieval purposes. Q.2 (b) Explain features of good relational database design. [5] (A) 1. Design Alternative: Larger Schemas : This suggests that using inst dept is a bad idea since it stores the budget amounts redundantly and runs the risk that some user might update the budget amount in one tuple but not all, and thus create inconsistency. 2. Design Alternative: Smaller Schemas : (a) Consider an extreme case where all we had were schemas consisting of one attribute. No interesting relationships of any kind could be expressed. (b) The flaw in this decomposition arises from the possibility that the enterprise has two employees with the same name. Fig. : Loss of information via a bad decomposition. (c) The two original tuples appear in the result along with two new tuples that incorrectly mix data values pertaining to the two employees named Kim. Although we have more tuples, we actually have less information in the following sense. We can indicate that a certain street, city, and salary pertain to someone named Kim, but we are unable to distinguish which of the Kims. Thus, our decomposition is unable to represent certain important facts about the university employees. Clearly, we would like to avoid such decompositions. We shall refer to such decompositions as being lossy decompositions, and, conversely, to those that are not as lossless decompositions. 4
5 Q.2 (c) Explain 1NF, 2NF with examples. [5] (A) First normal form (1NF) As per the rule of first normal form, an attribute (column) of a table cannot hold multiple values. It should hold only atomic values. Example : Suppose a company wants to store the names and contact details of its employees. It creates a table that looks like this : emp_id emp_name emp_address emp_mobile 101 Herschel New Delhi Jon Kanpur Ron Chennai Lester Bangalore Second normal form (2NF) A table is said to be in 2NF if both the following conditions hold: Table is in 1NF (First normal form) No non-prime attribute is dependent on the proper subset of any candidate key of table. An attribute that is not part of any candidate key is known as non-prime attribute. Example: teacher_id subject teacher-age 111 Maths Physics Biology Physics Chemistry 40 Candidate Keys: {teacher_id, subject} Non prime attribute: teacher_age The table is in 1 NF because each attribute has atomic values. However, it is not in 2NF because non prime attribute teacher_age is dependent on teacher_id alone which is a proper subset of candidate key. This violates the rule for 2NF as the rule says no nonprime attribute is dependent on the proper subset of any candidate key of the table. To make the table complies with 2NF we can break it in two tables like this: teacher_details table : teacher_id teacher_age Teacher_subject table : teacher_id teacher_age 111 Maths 111 Physics 222 Biology 333 Physics 333 Chemistry Now the tables comply with Second normal form (2NF). 5
6 Q.2 (d) Define Relational algebra? Explain selection & projection operation. [5] (A) 1. The relational algebra is a procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation as their result. The fundamental operations in the relational algebra are select, project, union, set difference, Cartesian product, and rename. In addition to the fundamental operations, there are several other operations namely, set intersection, natural join, and assignment. 2. The Select Operation : The select operation selects tuples that satisfy a given predicate. We use the lowercase Greek letter sigma to denote selection. Thus, to select those tuples of the instructor relation where the instructor is in the Physics department, we write: dept_name = Physiscs (instructor) 3. The Project Operation : Suppose we want to list all instructors ID, name, and salary, but do not care about the dept name. The project operation allows us to produce this relation. The project operation is a unary operation that returns its argument relation, with certain attributes left out. Since a relation is a set, any duplicate rows are eliminated. Projection is denoted by the uppercase Greek letter pi. ID, name, salary (instructor) Q.2 (e) Explain different types of joins with example. [5] (A) SQL joins combine records coming from more than one table using the common values (columns) between those tables. Join is denoted as Different types of joins (i) inner joins (ii) Equijoins (a) Equijoin with using construct (b) Natural join (iii) Cross join (iv) Outer Join Full-outer join Right outer join Left outer join (i) Inner joins : It is similar to basic join operator. Example : SELECT * FROM FACAULTY INNER JOIN DEPT. ON FACULTY.DEPT_ID = Dept.Dept_ID (ii) Equijoins : Equijoin performs a join against equality or matching column (s) values of the associated tables. An equal sign (=) is used as comparison operator in the where clause to refer quality. Select * From table 1 Join table 2 [On (join_condition) (a) Equijoin with the USING construct : applicable with columns having same name. SELECT * FROM FACULTY INNER JOIN Dept. USING (Dept_SD); 6
7 (b) Natural Join : Natural join is a type of Equijoin and is structured in such a way that, columns with same name of associate tables will appear once only. It was created to get rid of the second attribute in an Equijoin condition. Denoted by * SYNTAX : Select * From table 1 * or Natural Join table 2; (iii) Cross Join : Cross Join produces a result set which is the number of rows in the first table multiplied by number of row in the second table, if no WHERE clause is used along with CROSS JOIN. This kind of result is called as Cartesian Product. If WHERE clause is used with CROSS JOIN, it functions like INNER JOIN. Select * From table 1 Cross new table 2 (iv) Outer Join : (i) In NATURAL JOIN row tuples without a matching (or related) tuple are eliminated from the join result. Tuples with null in the join attributes are also eliminated. This amounts to loss of information. (ii) A set of operations, called outer joins, can be used when we want to keep all the tuples in R, or all those in S, or all those in both relations in the result of the join, regardless of whether or not they have matching tuples in the other relation. (iii) The left outer join operation keeps energy tuple in the first relation R in R S; if no matching tuple is found in S, then the attributes of S on the join result are filled or padded with null values. (iv) A similar operation, right outer join, keeps energy tuple in the second or right relations in result. A third operation, full outer join keeps all tuples in both the left & right relation when no matching tuples are found padding them with null values as needed. SYNTAX OF LEFT OUTER JOIN Select * From table 1 Left outer join table 2 On table 1.column_name = table 2, column_name; RIGHT OUTER JOIN : Select * From table 1 Right outer join table 2 On table 1.column_name = table 2, column_name; Full-outer join : Select * From table 1 Full Outer join table 2 ON Table 1.column_name = table 2.column_name; 7
8 Q.3 Attempt the following (any THREE) [15] Q.3 (a) Explain different types of constraints. [5] (A) There are different types of constraints: a. Domain Integrity Constraints: The domain constraints are considered as the most basic form of integrity constraints. Domain is a set of permitted values for an attribute. Constraints: o Not Null By setting the NOT NULL constraint we can assure that a column does not hold a NULL value. o Unique UNIQUE Constraint as the name suggests, can take only unique values in a column or set of columns. It keeps uniqueness of the table. o Default When a user does not provide a value to the column while inserting the records in the table, the DEFAULT constraint provides a default value to that column. b. Entity Integrity Constraints: Primary Key Constraint o Under Entity Integrity Constraint Primary key is the main factor. o Primary key uniquely identifies each record in a table. It must have unique values and cannot hold null values i.e. Primary key is the combination of NOT NULL & UNIQUE constraints. c. Referential Integrity Constraint: Foreign Key o The Foreign key constraint is also known as Referential Integrity Constraint. In this constraint one field is common in between two tables. o Foreign key represent relationships between tables. There is parent child relationship between two tables having common column. o The master table can be referenced as parent while the transaction table is considered as child. The common field will work as primary key in parent table while foreign key in child table. Q.3 (b) Write short note on DDL, DML & DCL. [5] (A) 1. Data Definition Language (DDL) The DDL is also used to specify the structure of each table, set of associated values with each attribute, integrity constraints, security and authorization information for all the tables and physical storage structure of all the tables on the disk. Let s take SQL for instance to categorize the statements that comes under DDL. o To create the database instance CREATE o To alter the structure of database ALTER o To drop database instances DROP o To rename database instances RENAME 2. Data Manipulation Language (DML) The Data Manipulation Language (DML) is used for accessing and manipulating data in a database. DML provides a set of functionalities to support the basic data manipulation operations on the data stored in the database. It allows users to access, insert, update, and delete data from the database. o To access or read records from table SELECT o To insert record into the table INSERT o Update the records in table UPDATE o Delete the records from the table DELETE 8
9 3. Data Control Language (DCL) Data Control Language (DCL) is used to control the user access to the database related elements like tables, views, functions, procedures and packages. It provides different levels of access to the objects in the database. o To grant access to user GRANT o To revoke access from user REVOKE Grant : GRANT is used to provide the privileges to the users on the database objects. Revoke: REVOKE removes the privileges given on the database objects. 4. Transaction Control Language (TCL) TCL statements allow you to control and manage transactions to maintain the integrity of data within SQL statements. o BEGIN Transaction opens a transaction o COMMIT Transaction commits (Save permanently) transactions o ROLLBACK Transaction ROLLBACK (Cancels, undo) transactions in case of any Q.3 (c) Explain view objects in SQL with example. [5] (A) 1. Security in View A view is a virtual table containing the records of one or more tables based on SQL statement executed. Just like a real table, view contains rows and columns. You can add SQL functions, WHERE clause, and JOIN statements to a view and present the data as if the data were coming from one single table. The changes made in a table gets automatically reflected in original table and vice versa. 2. Data Independence in View A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but 4 instead is derived from one or more underlying base tables. in other words, there is no stored file that directly represents the view instead a definition of view is stored in data dictionary. 3. Creating View a. Creating view having specific fields but all the records from existing table c. Creating new view having specific records but all the fields from existing table 4. Updating View a. Update query is used to update the records of view. Updation in view reflects the original table also. Means the same changes will be made in the original table also. Syntax 9
10 b. Restrictions on Modification of Views In case of view containing joins between multiple tables, only insertion and updation in the view is allowed, deletion is not allowed Data modification is not allowed in the view which is based on union queries. Data modification is not allowed in the view where GROUP BY or DISTINCT statements are used. In view the text and image columns can t be modified. 5. Dropping View DROP query is used to delete a view. Q.3 (d) Explain aggregate functions with examples. [5] (A) MIN returns the smallest value in a given column MAX returns the smallest value in a given column SUM returns the sum of the numeric values in a given column AVG returns the average value of a given column COUNT returns the total number of values in a given column COUNT (*) Returns the number of rows in a table Aggregate functions are used to compute against a "returned column of numeric data" from your SELECT statement. Example SELECT AVG(salary) FROM employee; SELECT Count(*) FROM employee; Q.3 (e) Write SQL Queries for the given database Employee (eid, ename, street, city) Works (eid, cid, salary) Company (cid, cname, city) (A) (i) Modify the database so that Jack now lives in Mumbai. (ii) Give all employees of ANZ corporation a 10% raise in salary. (iii) Find all employee id who live in same cities as the company for which they work. (iv) Give total number of employees. (v) Find the highest paid employee. [5] (1) Update employee SET city = Mumbai where ename = Jack (2) Update works SET salary = Salary * 1.1 where (id) IN (select cid from Company where / name = ANZ Corporation ); (3) Select distinct eid, ename From employee, works, company where employee.eid = works.cid 10
11 AND works.cid = Company.cid AND employee.city, Company.City; (4) Select Count (*) As total employees from Employee; (5) Select eid from works where salary = (select max / salary) from works) Q.4 Attempt the following (any THREE) [15] Q.4 (a) Describe ACID property for a transaction. [5] (A) 1. Atomicity Atomicity is based on the concept that each transaction be all or nothing : if any one part of the transaction in a sequence fails, then the entire transaction fails, and there will be no change in database state. This property states that, either all operations contained by a transaction are done successfully or none of them complete at all. To maintain the consistency of data this property is very useful. 2. Consistency The consistency property ensures that the transaction executed on the database system will bring the database from original consistent state to another. 3. Isolation The isolation property ensures that the system state should be same that would be obtained if transactions were executed sequentially, i.e., one after the other. The effect of any incomplete transaction should not be visible to other transaction. This can be achieved isolation. 4. Durability The durability property ensures that after transaction is committed successfully the updates made should remain permanent in the database even in the event of power loss, crashes or errors. Q.4 (b) List & explain different states through which transaction goes during its [5] execution. (A) 1. There are five states of transaction. During execution, transaction will be in one of the following state. 2. Active This is the first state of transaction. In this state the transaction is being executed. This state is entry point to every transaction. Transactions which are in active state indicate that their execution has been started. 3. Partially Committed When a transaction completes all operations, it will enter into partially committed state. Even when the last operation has been performed; data is still not saved to the database. 4. Failed If execution of transaction cannot proceed due to failure of the system or failure in database, then the transaction is said to be in failed state. 5. Abort In case of a failed transaction, the modification done in database during transaction processing must be rolled back to ensure the atomicity and consistency of database. The transaction enters into Abort state. The transaction is thus in abort state after roll back operation is performed. It is the end of transaction when any fault occurs. 11
12 6. Committed If without any error a transaction gets completed successfully it will come into committed state which will allow to made changes permanent into database. This is the last step of a transaction, if it executes without any failure. Either transaction may goes through active -partially committed - committed or through active - Failed - aborted, or through active - partially committed - failed - abort. Q.4 (c) Explain concept of schedule & its types. [5] (A) 1. Schedule: a. A schedule is a collection of several transactions that can be executed in a predefined order as a single unit, b. Schedule may combine the operations of one transaction with other transaction. These operations must be in same sequence as they occur in their individual transactions. c. Depending on the arrangement of these transactions, schedule can be divided into two types: Serial Schedule and Concurrent Schedule. 2. Types of Schedule a. Serial Schedule In serial schedule all the transactions in the schedule are executed one after another. Operations of different transactions are not interspersed with each other. For example, account M has Rs. 500 and account N has Rs initially. Transaction T1 transfers Rs. 200 from account M to N and Transaction T2 transfers Rs. 100 from account M to N. T1 and T2 can be scheduled in two ways for execution: I. Schedule 1 : Serial schedule for T1 followed by T2 b. Concurrent Schedule: Concurrent schedule is a schedule where, several transactions are executed simultaneously. The operations of one transaction can be mixed with operations of other transaction. Schedule 3 Concurrent schedule for T1 and T2 12
13 After execution of both transactions M holds Rs. 200 and N holds. Rs In this example concurrent schedule also provides same result as the above two serial schedules provide. But not all the concurrent schedules provide result in consistent state. Q.4 (d) Explain lock-based protocol. [5] (A) 1. Two-Phase Locking (2PL) a) In this scheme, each transaction makes lock and unlock request in 2 phases: A Growing Phase (or An Expanding Phase or First Phase) : In this phase, new locks on the desired data item can be acquired but none can be released. A Shrinking Phase (or Second Phase) : In this phase, existing locks can be released but no new locks can be acquired. b) In the beginning, the transaction is in growing phase in which it acquire lock as per requirement. After completing the work, the transaction releases the locks and enters into shrinking phase. The transaction cannot request for new locks after_releasing the locks. c) The point in the schedule where the transaction acquires its final lock is called as lock point. d) In Serializability the main issue is regarding write operation. The parallel write operations may create inconsistency in the database. The parallel read operations do not create any problem. e) In serial schedule, as the transactions are executed one after other, there is no risk of parallel write operations which may lead to inconsistency. 2. Strict Two-Phase Locking In Strict two phase locking protocol the first step of acquiring all the locks is same as first phase of two phase locking protocol. But the difference in Strict two phase locking and two phase locking is that Strict two phase locking protocol does not release the lock after using it. It holds all the locks till it does not reach to commit point. Q.4 (e) Explain deadlock detection. [5] (A) 1. Detecting deadlock situation in advance is always good instead of aborting a transaction. A deadlock avoidance mechanism is used to detect deadlock situation in advance. An algorithm that examines the state of the system is called periodically to check the occurance of deadlock. In deadlock avoidance wait-for graph method is used. 2. Wait-for Graph: Wait-for-graph scheme uses a graph (set of edges and vertices (nodes)) to detect deadlock in the system. A node is created when a transaction enters into system. When a transaction T, requests for a lock on resource X which is held by some other transaction T1, a directed edge is created from T to T1. 13
14 This edge is removed when T releases resource X, and T1 locks that resource. Waitfor graph indicates which transaction is waiting for another transaction to complete. A graph with cycle indicates the occurrence of deadlock in the system. The wait for graph has following situation o Transaction Ti is waiting for transaction T2 and T3 o Transaction T3 is waiting for transaction T2 o Transaction T2 is waiting for transaction T4 Here the graph has no cycle; hence it is not in deadlock state. Consider the transaction T4 is requesting an item held by T3 then a directed edge from T4 to T3 will be drawn. Now the graph has a cycle T2- T4- T3-*T2 Here the transactions T2, T3 AND T4 are in deadlock state. Q.5 Attempt the following (any THREE) [15] Q.5 (a) What is PL/SQL and explain the advantages of PL/SQL. [5] (A) 1. PL/SQL : It offers a procedural extension that allows for modularity, variable declaration, loops and other logic constructs, and advanced exception handling. PL/SQL is a combination of SQL along with the procedural features of programming languages. It is a database-oriented programming language that is a powerful extension of SQL with procedural capabilities. The key strength of PL/SQL is its tight integration with the Oracle database. 2. PL/SQL Engine : PL/SQL engine is a tool used to define, compile, and run PL/SQL program units. 14
15 Advantages of PL/SQL : 1. Block Structure: PL/ SQL consist of blocks of code, which can be nested within each other. Each block forms a unit or a logical module and is stored in the database so that it can be reused. 2. Tight Integration with SQL: PL/SQL is tightly integrated with SQL, which is popular and most widely used database manipulation language. 3. Procedural Language Capability : PL/SQL includes procedural language constructs such as conditional statements and looping constructs. 4. High Performance : PL/SQL allows sending the entire block of statements to the database, thereby reducing traffic between the application and the database. 5. High Productivity : PLISQL allows writing compact code for manipulating data. PL/SQL can query, change, and automatically update data in a database. 6. Portability : PL/SQL applications can run on any operating system and platform where Oracle Database is running. 7. Scalability : Stored subprograms of PL/SQL increase scalability by centralizing application processing on the database server. 8. Manageability : PL/SQL stored subprograms have only one copy maintained on the database server which can be changed without having to affect the applications invoking them, thereby increasing the maintainability. 9. Support for Object-Oriented Programming : PL/SQL supports object-oriented programming and the use of Abstract Data Types (ADTs). 10. Support for Developing Web Applications : PL/SQL allows creating applications that generate web pages that directly access the database. 11. Support for Developing Server Pages : PL/SQL Server Pages (PSPs) allows developing web pages with dynamic content. 12. Error Handling : PL/SQL handles exceptions effectively during the execution of a PL/SQL program. Q.5 (b) State & explain the various data types of PL/SQL. [5] (A) 1. Every PL/SQL variable, constant or a parameter has a data type which determines its storage structure, the values that can be assigned to it and operations that can be performed on it. 2. Scalar Data Type (a) Numeric Data Type (b) Character Data Type (c) Boolean Data Type (d) DateTime Data Type : 3. %Type Attribute : A special attribute known as %TYPE allows us to declare a data item of the same data type as previously declared variable or column of the table without having to remember it. The item declared with %TYPE is called the referencing item, and the previously declared item is called the referenced item. 4. Handling Variables in PL/SQL : Variables must be declared before they are used. The PL/SQL variables can be a scalar type such as DATE, NUMBER, VARCHAR2, BOOLEAN, LONG and CHAR, or a composite type, such as VARRAY. Only TRUE, FALSE or NULL can be assigned to BOOLEAN type of variables. Q.5 (c) Explain the various forms of IF statements used in PL/SQL. [5] (A) 1. IF Statements : An IF statement executes a sequence of statements, depending on the value of a condition. When the condition is satisfied, the necessary option will be executed. There are three forms of IF statements: IF-THEN, IF-THEN-ELSE, and IF-THEN-ELSIF. 15
16 2. IF-THEN Statement : The simplest form of IF statement associates a condition with a sequence statements enclosed by the keywords THEN and END IF (not ENDIF). IF- Then executes the statement or a block of statements if the condition returns true. 3. IF-THEN-ELSE Statement : In this type of IF statement there is a keyword ELSE followed by an alternative sequence of statements which can execute when the condition with if evaluates to false. 4. NESTED IF-THEN- ELSE statements : IF statements can also be nested inside other IF statements. This allows us to check more than one condition in a series and execute the appropriate block of statements depending on the conditions. Q.5 (d) Define cursors and give its types. [5] (A) 1. Cursor is a pointer to the private area in SQL that stores information about processing a specific DML statement. The drawback with select statement is that it returns only one row at a time in a PL/SQL block. 16
17 2. Cursors can be classified as : Implicit Cursor These cursors are also called as internal cursors and are managed by Oracle itself Explicit Cursor These are User-defined Cursor used for external Processing Implicit Cursor : 1. Implicit cursor is a session cursor which is opened every time you run a SELECT or DML statement in the PL/SQL block. An implicit cursor closes after its associated statement run but its attributes values remain available until another SELECT or DML statement is executed. Cursor attributes return information about the state of the cursor. The syntax for an implicit cursor attribute is SQLattribute(e.g. SQL%FOUND). SQLauribute will always refer to the recently run DML or SELECT INTO statement. 2. Implicit cursor attributes are : SQL%ISOPEN SQL % FOUND SQL%NOTFOUND SQL % ROWCOUNT 3. Drawbacks of Implicit Cursors : The implicit cursor has the following drawbacks: Implicit cursors are less efficient than an explicit cursor. Implicit cursors are more vulnerable to data errors. Implicit cursors provide less flexibility to implement programming control. Explicit Cursor : The Cursor which is declared by user is called as Explicit Cursor. Following are the steps of using an explicit Cursor: DECLARE Cursor in the declaration section. OPEN the cursor in the Execution Section. FETCH the data from cursor into PL/SQL variables or records in the Execution Section. CLOSE the cursor in the Execution Section before we end the PL/SQL Block. Example : Q.5 (e) Define and Explain Triggers. [5] (A) 1. A trigger is a PL/SQL block structure or stored procedure that defines an action the database should take when some data base related event occurs. It plays automatically depending on the particular condition. A trigger is fired or executed when a DML statements like Insert, Delete, Update is executed on a database table. A trigger is 17
18 triggered automatically at predefined timing and event, when an associated DML statement is executed. Triggers are useful in achieving security and auditing. It also maintains referential integrity and data integrity. 2. Advantages of using Triggers : To check the integrity of data. To catch errors in business logic. SQL triggers run the scheduled tasks SQL triggers are very useful to audit the changes of data in tables. 3. Disadvantages of using SQL Triggers : SQL triggers only can provide an extended validation and they cannot replace all the validations. SQL triggers may increase the overhead of the database server. 4. Types of Triggers : (a) BEFORE Triggers : BEFORE triggers are also used to derive specific column values before completing a triggering INSERT or UPDATE statement. (b) AFTER Triggers : The Oracle-defined AFTER ROW trigger, We can create as many triggers of the preceding different types as we need for each type of DML statement (INSERT,UPDATE, or DELETE). 5. Creating Triggers : Database trigger consist of four parts: (a) The trigger type (b) The triggering event (c) Trigger condition (d) Trigger body 18
SQL Interview Questions
SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic
More informationTechno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601
Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Database Management System Subject Code: CS 601 Multiple Choice Type Questions 1. Data structure or the data stored
More information5. Single-row function
1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing
More informationDatabase Management System 9
Database Management System 9 School of Computer Engineering, KIIT University 9.1 Relational data model is the primary data model for commercial data- processing applications A relational database consists
More informationII B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.
Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Re-accredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated
More informationData about data is database Select correct option: True False Partially True None of the Above
Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another
More informationQ.2 e) Time stamping protocol for concurrrency control Time stamping ids a concurrency protocol in which the fundamental goal is to order transactions globally in such a way that older transactions get
More informationB.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1
Basic Concepts :- 1. What is Data? Data is a collection of facts from which conclusion may be drawn. In computer science, data is anything in a form suitable for use with a computer. Data is often distinguished
More informationIn-Sem Paper Solution Subject: Database Management System (2015 Patter) August, Answer: [1]
In-Sem Paper Solution Subject: Database Management System (2015 Patter) August, 2018 Answer: [1] Ans: Weak entity set always appears in association with identifying relationship with total participation
More informationDatabase Management Systems Paper Solution
Database Management Systems Paper Solution Following questions have been asked in GATE CS exam. 1. Given the relations employee (name, salary, deptno) and department (deptno, deptname, address) Which of
More informationUNIT-IV (Relational Database Language, PL/SQL)
UNIT-IV (Relational Database Language, PL/SQL) Section-A (2 Marks) Important questions 1. Define (i) Primary Key (ii) Foreign Key (iii) unique key. (i)primary key:a primary key can consist of one or more
More informationDatabase Technology Introduction. Heiko Paulheim
Database Technology Introduction Outline The Need for Databases Data Models Relational Databases Database Design Storage Manager Query Processing Transaction Manager Introduction to the Relational Model
More informationCS6302 DBMS 2MARK & 16 MARK UNIT II SQL & QUERY ORTIMIZATION 1. Define Aggregate Functions in SQL? Aggregate function are functions that take a collection of values as input and return a single value.
More informationSample Question Paper
Sample Question Paper Marks : 70 Time:3 Hour Q.1) Attempt any FIVE of the following. a) List any four applications of DBMS. b) State the four database users. c) Define normalization. Enlist its type. d)
More informationOracle Database 11g: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL
More informationDATABASE MANAGEMENT SYSTEMS
www..com Code No: N0321/R07 Set No. 1 1. a) What is a Superkey? With an example, describe the difference between a candidate key and the primary key for a given relation? b) With an example, briefly describe
More informationIntroduction to SQL/PLSQL Accelerated Ed 2
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course
More informationOracle Database: Introduction to SQL/PLSQL Accelerated
Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL
More informationSolved MCQ on fundamental of DBMS. Set-1
Solved MCQ on fundamental of DBMS Set-1 1) Which of the following is not a characteristic of a relational database model? A. Table B. Tree like structure C. Complex logical relationship D. Records 2) Field
More informationSankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment
Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment Introductory concepts of DBMS 1. Explain detailed 3-level architecture
More informationBabu Banarasi Das National Institute of Technology and Management
Babu Banarasi Das National Institute of Technology and Management Department of Computer Applications Question Bank (Short-to-Medium-Answer Type Questions) Masters of Computer Applications (MCA) NEW Syllabus
More informationOracle PL SQL Training & Certification
About Intellipaat Intellipaat is a fast-growing professional training provider that is offering training in over 150 most sought-after tools and technologies. We have a learner base of 600,000 in over
More informationEssay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).
Question 1 Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). By specifying participation conditions By specifying the degree of relationship
More informationSql Server Syllabus. Overview
Sql Server Syllabus Overview This SQL Server training teaches developers all the Transact-SQL skills they need to create database objects like Tables, Views, Stored procedures & Functions and triggers
More informationUnit I. By Prof.Sushila Aghav MIT
Unit I By Prof.Sushila Aghav MIT Introduction The Need for Databases Data Models Relational Databases Database Design Storage Manager Query Processing Transaction Manager DBMS Applications DBMS contains
More informationIntroduction to Computer Science and Business
Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline
More informationA7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS
A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered
More informationBasant Group of Institution
Basant Group of Institution Visual Basic 6.0 Objective Question Q.1 In the relational modes, cardinality is termed as: (A) Number of tuples. (B) Number of attributes. (C) Number of tables. (D) Number of
More informationMahathma Gandhi University
Mahathma Gandhi University BSc Computer science III Semester BCS 303 OBJECTIVE TYPE QUESTIONS Choose the correct or best alternative in the following: Q.1 In the relational modes, cardinality is termed
More informationChapter 3: The Relational Database Model
Chapter 3: The Relational Database Model Student: 1. The practical significance of taking the logical view of a database is that it serves as a reminder of the simple file concept of data storage. 2. You
More informationPL/SQL Block structure
PL/SQL Introduction Disadvantage of SQL: 1. SQL does t have any procedural capabilities. SQL does t provide the programming technique of conditional checking, looping and branching that is vital for data
More informationOracle Syllabus Course code-r10605 SQL
Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic
More informationOracle Database: SQL and PL/SQL Fundamentals NEW
Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the
More information8) A top-to-bottom relationship among the items in a database is established by a
MULTIPLE CHOICE QUESTIONS IN DBMS (unit-1 to unit-4) 1) ER model is used in phase a) conceptual database b) schema refinement c) physical refinement d) applications and security 2) The ER model is relevant
More informationRelational Database Management System 2014
Unit-1: Procedural SQL data types Fill in the blank: 1. are used to defining a fully relational database. 2. Data can be presented to the user in different logical combinations, called. 3. Changes to the
More informationOracle Database: SQL and PL/SQL Fundamentals Ed 2
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals
More informationD.K.M COLLEGE FOR WOMEN(AUTONOMOUS),VELLORE DATABASE MANAGEMENT SYSTEM QUESTION BANK
D.K.M COLLEGE FOR WOMEN(AUTONOMOUS),VELLORE DATABASE MANAGEMENT SYSTEM QUESTION BANK UNIT I SECTION-A 2 MARKS 1. What is meant by DBMs? 2. Who is a DBA? 3. What is a data model?list its types. 4. Define
More informationTable of Contents. PDF created with FinePrint pdffactory Pro trial version
Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.
More informationDATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?
DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS Complete book short Answer Question.. QUESTION 1: What is database? A database is a logically coherent collection of data with some inherent meaning, representing
More informationTHE RELATIONAL DATABASE MODEL
THE RELATIONAL DATABASE MODEL Introduction to relational DB Basic Objects of relational model Properties of relation Representation of ER model to relation Keys Relational Integrity Rules Functional Dependencies
More informationRelational Model: History
Relational Model: History Objectives of Relational Model: 1. Promote high degree of data independence 2. Eliminate redundancy, consistency, etc. problems 3. Enable proliferation of non-procedural DML s
More informationDatabase Management System. Fundamental Database Concepts
Database Management System Fundamental Database Concepts CONTENTS Basics of DBMS Purpose of DBMS Applications of DBMS Views of Data Instances and Schema Data Models Database Languages Responsibility of
More informationROEVER ENGINEERING COLLEGE
ROEVER ENGINEERING COLLEGE ELAMBALUR, PERAMBALUR- 621 212 DEPARTMENT OF INFORMATION TECHNOLOGY DATABASE MANAGEMENT SYSTEMS UNIT-1 Questions And Answers----Two Marks 1. Define database management systems?
More informationChapter 1: Introduction
Chapter 1: Introduction Chapter 2: Intro. To the Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS is Collection of
More informationOracle SQL & PL SQL Course
Oracle SQL & PL SQL Course Complete Practical & Real-time Training Job Support Complete Practical Real-Time Scenarios Resume Preparation Lab Access Training Highlights Placement Support Support Certification
More informationDeccansoft softwareservices-microsoft Silver Learing Partner. SQL Server Syllabus
SQL Server Syllabus Overview: Microsoft SQL Server is one the most popular Relational Database Management System (RDBMS) used in Microsoft universe. It can be used for data storage as well as for data
More informationRelational Database Management Systems Oct/Nov I. Section-A: 5 X 4 =20 Marks
Relational Database Management Systems Oct/Nov 2014 1 I. Section-A: 5 X 4 =20 Marks 1. Data Model A conceptual method of structuring data is called Data Model. The development of systems based on following
More informationVU Mobile Powered by S NO Group All Rights Reserved S NO Group 2013
1 CS403 Final Term Solved MCQs & Papers Mega File (Latest All in One) Question # 1 of 10 ( Start time: 09:32:20 PM ) Total Marks: 1 Each table must have a key. primary (Correct) secondary logical foreign
More informationInterview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]
Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] 1. What is DBMS? A Database Management System (DBMS) is a program that controls creation, maintenance and use
More informationIntroduction to Computer Science and Business
Introduction to Computer Science and Business This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database design by creating a
More informationQ.1 Short Questions Marks 1. New fields can be added to the created table by using command. a) ALTER b) SELECT c) CREATE. D. UPDATE.
ID No. Knowledge Institute of Technology & Engineering - 135 BE III SEMESTER MID EXAMINATION ( SEPT-27) PAPER SOLUTION Subject Code: 2130703 Date: 14/09/27 Subject Name: Database Management Systems Branches:
More information1. Considering functional dependency, one in which removal from some attributes must affect dependency is called
Q.1 Short Questions Marks 1. Considering functional dependency, one in which removal from some attributes must affect dependency is called 01 A. full functional dependency B. partial dependency C. prime
More informationnormalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model
Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your
More informationChapter 3: Introduction to SQL
Chapter 3: Introduction to SQL Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 3: Introduction to SQL Overview of the SQL Query Language Data Definition Basic Query
More informationPrinciples of Data Management
Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what
More informationChapter 1 Chapter-1
Chapter 1 Chapter-1 Data: Data are the raw facts that can be obtained after some experiments or observations. Raw data is of no use until and unless we process it to find some useful information form it.
More informationSample Copy. Not For Distribution.
Exam Made Easy i Publishing-in-support-of, EDUCREATION PUBLISHING RZ 94, Sector - 6, Dwarka, New Delhi - 110075 Shubham Vihar, Mangla, Bilaspur, Chhattisgarh - 495001 Website: www.educreation.in Copyright,
More informationCourse Logistics & Chapter 1 Introduction
CMSC 461, Database Management Systems Spring 2018 Course Logistics & Chapter 1 Introduction These slides are based on Database System Concepts book th edition, and the 2009 CMSC 461 slides by Dr. Kalpakis
More informationOracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant
Oracle Developer Track Course Contents Sandeep M Shinde Oracle Application Techno-Functional Consultant 16 Years MNC Experience in India and USA Trainer Experience Summary:- Sandeep M Shinde is having
More informationUNIT I. Introduction
UNIT I Introduction Objective To know the need for database system. To study about various data models. To understand the architecture of database system. To introduce Relational database system. Introduction
More informationUNIT 2 Set Operators
Course Title: Database Systems ( M.C.A 1 st Semester ) (Evening Batch) UNIT 2 Set Operators Set operators are used to join the results of two (or more) SELECT statements.the SET operators available in
More information1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data
1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements
More information20461: Querying Microsoft SQL Server 2014 Databases
Course Outline 20461: Querying Microsoft SQL Server 2014 Databases Module 1: Introduction to Microsoft SQL Server 2014 This module introduces the SQL Server platform and major tools. It discusses editions,
More informationCMSC 461 Final Exam Study Guide
CMSC 461 Final Exam Study Guide Study Guide Key Symbol Significance * High likelihood it will be on the final + Expected to have deep knowledge of can convey knowledge by working through an example problem
More informationOracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query
Oracle SQL(Structured Query Language) Introduction of DBMS Approach to Data Management Introduction to prerequisites File and File system Disadvantages of file system Introduction to TOAD and oracle 11g/12c
More informationRelational Database Language
DATA BASE MANAGEMENT SYSTEMS Unit IV Relational Database Language: Data definition in SQL, Queries in SQL, Insert, Delete and Update Statements in SQL, Views in SQL, Specifying General Constraints as Assertions,
More informationQuestion Bank PL/SQL Fundamentals-I
Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL
More informationOracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training
More informationM.C.A. (CBCS) Sem.-III Examination November-2013 CCA-3004 : Database Concepts and Tools. Faculty Code: 003 Subject Code:
003-007304 M.C.A. (CBCS) Sem.-III Examination November-2013 CCA-3004 : Database Concepts and Tools Faculty Code: 003 Subject Code: 007304 Time: 21/2 Hours] [Total Marks: 70 I. Answer the following multiple
More informationCS121 MIDTERM REVIEW. CS121: Relational Databases Fall 2017 Lecture 13
CS121 MIDTERM REVIEW CS121: Relational Databases Fall 2017 Lecture 13 2 Before We Start Midterm Overview 3 6 hours, multiple sittings Open book, open notes, open lecture slides No collaboration Possible
More informationDatabase Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 20 Concurrency Control Part -1 Foundations for concurrency
More informationCS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION
CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION INSTRUCTOR: Grant Weddell TIME: 150 minutes WRITE YOUR NAME AND ID HERE: NOTE 1: This is a closed book examination. For example,
More informationSQL STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE SQL Structured Query Language 4.1 Introduction Originally, SQL was called SEQUEL (for Structured English QUery Language) and implemented at IBM Research as the interface for an
More informationOracle Database 10g: Introduction to SQL
ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database
More informationExam code: Exam name: Database Fundamentals. Version 16.0
98-364 Number: 98-364 Passing Score: 800 Time Limit: 120 min File Version: 16.0 Exam code: 98-364 Exam name: Database Fundamentals Version 16.0 98-364 QUESTION 1 You have a table that contains the following
More informationCS2255 DATABASE MANAGEMENT SYSTEMS QUESTION BANK UNIT I
CS2255 DATABASE MANAGEMENT SYSTEMS CLASS: II YEAR CSE SEM:04 STAFF INCHARGE: Mr S.GANESH,AP/CSE QUESTION BANK UNIT I 2 MARKS List the purpose of Database System (or) List the drawback of normal File Processing
More informationINDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables
INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating
More informationIntroduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 10: Transaction processing. November 14, Lecturer: Rasmus Pagh
Introduction to Databases, Fall 2005 IT University of Copenhagen Lecture 10: Transaction processing November 14, 2005 Lecturer: Rasmus Pagh Today s lecture Part I: Transaction processing Serializability
More informationEDUVITZ TECHNOLOGIES
EDUVITZ TECHNOLOGIES Oracle Course Overview Oracle Training Course Prerequisites Computer Fundamentals, Windows Operating System Basic knowledge of database can be much more useful Oracle Training Course
More informationRelational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity
COSC 416 NoSQL Databases Relational Model (Review) Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was proposed by E. F. Codd
More informationE-R diagrams and database schemas. Functional dependencies. Definition (tuple, attribute, value). A tuple has the form
E-R diagrams and database schemas Functional dependencies Definition (tuple, attribute, value). A tuple has the form {A 1 = v 1,..., A n = v n } where A 1,..., A n are attributes and v 1,..., v n are their
More informationCS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C
CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C 0 0 3 2 LIST OF EXPERIMENTS: 1. Creation of a database and writing SQL queries to retrieve information from the database. 2. Performing Insertion,
More informationRajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10
Rajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10 RAJIV GANDHI COLLEGE OF ENGINEERING & TECHNOLOGY, KIRUMAMPAKKAM-607 402 DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK
More informationDHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI
DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI Department of Computer Science and Engineering CS6302- DATABASE MANAGEMENT SYSTEMS Anna University 2 & 16 Mark Questions & Answers Year / Semester: II / III
More informationName :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM
Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2012 2012 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.
More informationBusiness Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m
Business Analytics Let s Learn SQL-PL SQL (Oracle 10g) SQL PL SQL [Oracle 10 g] RDBMS, DDL, DML, DCL, Clause, Join, Function, Queries, Views, Constraints, Blocks, Cursors, Exception Handling, Trapping,
More informationChapter 3: Introduction to SQL
Chapter 3: Introduction to SQL Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 3: Introduction to SQL Overview of the SQL Query Language Data Definition Basic Query
More informationDatabase Management
Database Management - 2011 Model Answers 1. a. A data model should comprise a structural part, an integrity part and a manipulative part. The relational model provides standard definitions for all three
More informationA Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time
SQL Basics & PL-SQL Complete Practical & Real-time Training Sessions A Unit of SequelGate Innovative Technologies Pvt. Ltd. ISO Certified Training Institute Microsoft Certified Partner Training Highlights
More informationDATABASES SQL INFOTEK SOLUTIONS TEAM
DATABASES SQL INFOTEK SOLUTIONS TEAM TRAINING@INFOTEK-SOLUTIONS.COM Databases 1. Introduction in databases 2. Relational databases (SQL databases) 3. Database management system (DBMS) 4. Database design
More informationRelational Database design. Slides By: Shree Jaswal
Relational Database design Slides By: Shree Jaswal Topics: Design guidelines for relational schema, Functional Dependencies, Definition of Normal Forms- 1NF, 2NF, 3NF, BCNF, Converting Relational Schema
More informationCT13 DATABASE MANAGEMENT SYSTEMS DEC 2015
Q.1 a. Explain the role of concurrency control software in DBMS with an example. Answer: Concurrency control software in DBMS ensures that several users trying to update the same data do so in a controlled
More informationQuery Processing & Optimization
Query Processing & Optimization 1 Roadmap of This Lecture Overview of query processing Measures of Query Cost Selection Operation Sorting Join Operation Other Operations Evaluation of Expressions Introduction
More informationIntro to Transactions
Reading Material CompSci 516 Database Systems Lecture 14 Intro to Transactions [RG] Chapter 16.1-16.3, 16.4.1 17.1-17.4 17.5.1, 17.5.3 Instructor: Sudeepa Roy Acknowledgement: The following slides have
More informationThe SQL data-definition language (DDL) allows defining :
Introduction to SQL Introduction to SQL Overview of the SQL Query Language Data Definition Basic Query Structure Additional Basic Operations Set Operations Null Values Aggregate Functions Nested Subqueries
More informationU1. Data Base Management System (DBMS) Unit -1. MCA 203, Data Base Management System
Data Base Management System (DBMS) Unit -1 New Delhi-63,By Vaibhav Singhal, Asst. Professor U2.1 1 Data Base Management System Data: Data is the basic raw,fact and figures Ex: a name, a digit, a picture
More informationQuerying Microsoft SQL Server
Querying Microsoft SQL Server Course 20461D 5 Days Instructor-led, Hands-on Course Description This 5-day instructor led course is designed for customers who are interested in learning SQL Server 2012,
More informationSYED AMMAL ENGINEERING COLLEGE
UNIT-I INTRODUCTION TO DBMS CS6302- Database Management Systems Two Marks 1. What is database? A database is logically coherent collection of data with some inherent meaning, representing some aspect of
More informationOracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led
Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Course Description This training starts with an introduction to PL/SQL and then explores the benefits of this powerful programming
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 7 Introduction to Structured Query Language (SQL) Objectives In this chapter, students will learn: The basic commands and
More information