Illustrative Example of Logical Database Creation
|
|
- Theodora Morris
- 6 years ago
- Views:
Transcription
1 Illustrative Example of Logical Database Creation A small RAQUEL DB is created to illustrate what is involved as regards the logical schemas of a RAQUEL DB. Create a Database or ExampleDB <==Database ExampleDB <==Database[ User-ID ] The first statement assumes a DB with no access control this can be convenient for a single-user DB while the second assumes a DB with access control 1. Where logically possible, as here, RAQUEL allows parameters to be elided; the first statement illustrates the elision. These statements create a DB Schema called ExampleDB. Its creation incorporates the creation of all the system schemas within it, but no optional schemas. Of concern here are those schemas that support the logical relational model. The system schemas are the Logical Schema, Virtual Schema, Source Schema and Sink Schema, which are therefore all created. The optional schemas are the subschemas, and no subschemas are created. (Alternatively the set of subschemas is empty). Create Real Relvars First the DB must be opened so that the driver application (which delivers the RAQUEL statements to the DBMS for execution) can access the contents of the DB. The contents provide the environment and hence the scope for the RAQUEL statements that are executed thereafter. or ExampleDB <==Open ExampleDB <== Open[ User-ID ] depending on whether access permission is required or not. The User-ID parameter cannot be elided if access permission is required. To create real relvars (as opposed to optional subschemas), the Logical Schema must now be opened to provide the environment for this : Logical <==Open or Logical <== Open[ User-ID ] Let two real (or base) relvars, DEPT and EMP, now be created :- 1 The possibilities for access security in RAQUEL are not yet finalised, so there are no further details regarding security controls, passwords, permissions, etc. Page 1 of 10
2 DEPT <==Attribute[ DeptNo <== Text; Budget <== Number; Area <== { { North } { South } } ] EMP <==Attribute[ EmpNo <== Text; EName <== Text; DeptNo <== Text; Salary <== Number; Tax <== Number ] Notes : 1. The 2 attribute assignments create 2 real relvars by assigning a relational type (= reltype) to a relvar name. The type consists of a set of named attributes together with a data type for each attribute. Relvar DEPT has 3 attributes and EMP has 5 attributes. Both relvars have a relvalue which is an empty set of tuples. Both relvars have a default candidate key which consists of all the attributes in the relvar. 2. For simplicity, straightforward scalar data types are used as attribute types. The attribute Area has a type which consists of the 2 values North and South and which is expressed as a relvalue of 2 tuples of one attribute. (Relvalues are used to express a set of values). Because both values are text values, the type is treated as a subset of the Text scalar data type, with all the scalar operators applicable to Text values being applicable to values of this type. The type has not been given a name and so cannot be referenced by name. The relvars DEPT and EMP are now given the desired candidate keys :- DEPT <==Key[ Primary <== DeptNo ] EMP <==Key[ Primary <== EmpNo ] Notes : 1. Each relvar is only given one candidate key, which in both cases is called Primary. 2. When a relvar is assigned at least one candidate key, any default candidate key is removed as part of the same assignment. A foreign key is now assigned to EMP to ensure that its DeptNo attribute values are always values appearing in DEPT :- ( EMP Project[ DeptNo ] ) <==Integrity[ DeptNoForeignKey ] # Sub= ( DEPT Project[ DeptNo ] ) Notes : Page 2 of 10
3 1. The expression on the RHS of the <==Integrity assignment # Sub= ( DEPT Project[ DeptNo ] ) is assigned to the unnamed view (a form of pseudovariable) on the LHS EMP Project[ DeptNo ] as an integrity constraint. Every time the value of the unnamed view is to be changed, which will arise whenever a DeptNo attribute value of EMP is entered or amended, then the constraint must first be executed to check whether the change yields a valid result, and the change can only be made if it does. The name of the integrity constraint, DeptNoForeignKey, is given as the parameter of the <==Integrity assignment. 2. In the integrity constraint # Sub= ( DEPT Project[ DeptNo ] ) # represents the unnamed view on the LHS of the assignment, i.e. it represents EMP Project[ DeptNo ] Sub= is the textual representation of the mathematical. Hence the integrity constraint is that the DeptNo values in EMP must be a subset of or equal to the DeptNo values in DEPT. 3. <==Integrity is the standard assignment for assigning any kind of integrity constraint. Using a special assignment for referential integrity constraints has not been found beneficial. Referential integrity has been generalised to an Inclusion Constraint as first defined by E. F. Codd, and it is this kind of constraint which is assigned. The inclusion constraint is expressed as a set comparison between two sets of attributes, neither of which need be a candidate key. As well as Sub=, other set comparisons available are =, Sub meaning, and Super and Super= meaning and respectively. Create A Sink Relvar One or more sink relvars need to be created to receive the answers to queries. Therefore the Logical Schema must be closed (to exit from it) and the Sink Schema opened (to enter it), since the DBMS keeps each category of relvar in its own schema. Logical <==Close Sink <==Open or Sink <== Open[ User-ID ] Let a sink called USER now be created :- USER ==Sink[ /usr/user/userresults ] The sink relvar is bound to a specific file, which in this case is assumed to be a Unix/Linux file whose full name is /usr/user/userresults. The physical entity to which the relvar is bound could in principle be anything suitable. Page 3 of 10
4 The Sink Schema is now exited :- Sink <==Close The Physical Handling of Data When real relvars are created, such as DEPT and EMP, the physical storage to hold their relvalues is automatically created using the DBMS defaults. (The defaults are the standard ones or revised defaults specified as part of the DBMS installation). No further work is required, unless different physical storage arrangements to the defaults are immediately required. In order to provide Physical Data Independence, whatever initial physical storage arrangements are created, they can be changed at any time thereafter without losing the value(s) of the relevant relvar(s). When sink relvars are created, such as USER, the specification of the physical location and nature of the relvar outside the DB is an integral part of its creation; there are no defaults as they are not meaningful in this situation. The same applies to source relvars. However a sink or source relvar can be re-assigned at a later time to another physical entity if required; in this sense Physical Data Independence is provided. When a DB Schema is created, it may be useful if the driver application that supplies the creation statement to the DBMS immediately follows it with statements to create a suitable sink relvar (perhaps as a default). Adjust the DB for Ease of Use The following Venn diagram shows the all the relvars that have now been created within ExampleDB :- DB Schema ExampleDB Schema Virtual DEPT EMP USER Schema Logical Schema Sink Schema Source Each relvar is held in its appropriate standard schema. To use the DB raises the following concerns : 1. To access the relvars DEPT and EMP, first the schema ExampleDB must be accessed and then the schema Logical. Page 4 of 10
5 2. The sink relvar USER cannot be used with DEPT and EMP since it is in a different schema, the Sink Schema. (In fact to use USER requires that first the schema ExampleDB be accessed and then the schema Sink). A user can be in only one schema at any point in time. To solve these difficulties, a subschema can be created and the relvars DEPT, EMP and USER copied into it. A driver application can then directly enter that subschema let it be called CompanyDB - which would appear to that application as a complete DB containing DEPT, EMP and USER. Pictured as a Venn diagram, the situation would be :- DB Schema ExampleDB Subschema CompanyDB Schema Virtual DEPT EMP USER Schema Logical Schema Sink Schema Source The Subschema CompanyDB is drawn partly outside the DB Schema ExampleDB to illustrate the fact that it is visible outside ExampleDB. With the statement CompanyDB <==Open or CompanyDB <== Open[ User-ID ] a user can directly enter CompanyDB and use it (assuming the relevant access permissions) and know nothing at all about the existence of ExampleDB and its contents. As CompanyDB includes a sink relvar, queries can be executed that retrieve answers to that sink. The RAQUEL statements to produce the subschema are : 1. Ensure the driver application is at the schema level within the DB Schema ExampleDB. If the application has not yet opened ExampleDB, execute ExampleDB <==Open or ExampleDB <== Open[ User-ID ] If the application is using schema Logical or schema Sink within ExampleDB, execute Logical <==Close or Sink <==Close to raise the application s environment to be that of the schemas that are members of ExampleDB. Page 5 of 10
6 2. Create the subschema : or as required. CompanyDB <==Subschema CompanyDB <==Subschema[ User-ID ] 3. Copy the required relvars into CompanyDB : CompanyDB <--Copy { { DEPT } { EMP } { USER } } The names of the relvars to be copied into CompanyDB are expressed as a relvalue (of 3 tuples of one attribute) which contains their names. The <--Copy assignment executes at the schema level, so it requires both its left-hand operand and its right-hand operand to be schemas. However a schema comprises a set of members and is construed as a relvalue whose tuples constitute the members of the set. Therefore a relvalue is acceptable as a right-hand operand. DEPT, EMP and USER are not written with speech marks because they are not text values but relvar name values. If any of DEPT, EMP or USER did not exist in the Logical or Sink Schemas, the statement would not execute but return an error message. The DBMS looks in the system schemas to find the relevant relvars to copy into subschema CompanyDB. The relvars are not literally copied into CompanyDB, as this would result in 2 copies of each relvar. Rather the accessibility of the relvars is copied so that each relvar is accessible both from its system relvar and subschema CompanyDB. Alternative statements that could be used would be :- CompanyDB <--Copy Logical CompanyDB <--Copy Sink They would copy the contents of Logical and Sink into CompanyDB, which what is required in this case Note that this approach permits algebra expressions of schema variables to form the RHS operand of the <--Copy assignment. Therefore one could also write :- CompanyDB <--Copy Logical Union Sink Finally, an alternative approach that is simpler is :- 1. Create a DB Schema. In the example it would be ExampleDB. 2. Create a subschema within it. In the example it would be CompanyDB. Page 6 of 10
7 3. Create all the required relvars within the subschema. These relvars can be of any category. In the example they would be DEPT, EMP and USER. The DBMS automatically makes them all accessible in their respective system schemas, in this case the schemas Logical and Sink, at the time of their creation in the subschema. This approach requires no copying. Subschemas and their relvars are created as required, using the same statements as before, and the DBMS ensures that it keeps track of the overall DB situation by automatically making all relvars accessible in their respective system schemas. However relvars (of any category) that are to appear subsequently in a subschema additional to the original one, need to be copied to the additional subschema(s). They may be copied from the original subschema or the relevant system schema. Using Virtual Relvars (or Views) Let it be decided that, since the company falls naturally into a northern part and a southern part, that it would be useful to have a set of relvars that holds data on just the northern departments and employees, and another set that holds data on just the southern departments and employees. For consistency, the relvars in each set should be virtual relvars (or views) whose values are derived from those of the real relvars DEPT and EMP. For convenience let it also be decided that there be a subschema to hold the northern set of views and another subschema to hold the southern set. Finally let it be decided that, given the usage of the subschemas, it would be useful to have a second sink just to receive the answers to queries on the northern departments and employees, and a third sink just to receive the answers to queries on the southern departments and employees. Assuming the environment is that of the DB Schema ExampleDB, this could be accomplished as follows : 1. Create the subschemas : CompanyNorth <==Subschema CompanySouth <==Subschema 2. Access the CompanyNorth subschema : CompanyNorth <==Open 3. Create 2 appropriate virtual relvars for the northern subschema : DeptsNorth <--View DEPT Restrict[ Area = North ] EmpsNorth <--View EMP Project[ EmpNo, EName, DeptNo ] Join[[ DeptNo ] DeptsNorth Both virtual relvars appear in both the CompanyNorth subschema and in the Virtual schema. The expression defining view DeptsNorth is the restriction Page 7 of 10
8 of DEPT that returns all the northern departments. The expression defining view EmpsNorth first projects out the relevant attributes from EMP - the nonpayment data is assumed not to be of interest. That result is then left semijoined on DeptNo with the view DeptsNorth to yield just those tuples from it that represent employees from the northern departments. 4. Create a suitable sink relvar for the northern subschema : UsersNorth ==Sink[ /usr/usernorth/results ] The sink relvar UsersNorth appears in both the CompanyNorth subschema and in the Sink schema. 5. Access the CompanySouth subschema : CompanyNorth <==Close CompanySouth <==Open 6. Create 2 appropriate virtual relvars for the southern subschema : DeptsSouth <--View DEPT Restrict[ Area = South ] EmpsSouth <--View EMP Project[ EmpNo, EName, DeptNo ] Join[[ DeptNo ] DeptsSouth The corresponding views are created for southern departments and employees. 7. Create a suitable sink relvar for the southern subschema : UsersSouth ==Sink[ /usr/usersouth/results ] The corresponding sink relvar is created for southern departments and employees. 8. Exit the CompanySouth subschema : CompanySouth <==Close If preferred, the contents of the CompanySouth subschema could have been created first and those of the CompanyNorth subschema second. Suppose that by mistake, all 4 virtual relvars and both sink relvars had been created in the CompanyNorth subschema, leaving the CompanySouth subschema empty. To rectify the problem, views DeptsSouth and EmpsSouth and sink UsersSouth need to be moved out of CompanyNorth into CompanySouth. The problem may be solved as follows : 1. Execute any necessary statements to arrive at the schema level of abstraction within the DB Schema. 2. Move relvars DeptsSouth, EmpsSouth and UsersSouth to subschema CompanySouth : CompanySouth <--Move { { DeptsSouth } { EmpsSouth } { UsersSouth } } Page 8 of 10
9 The <--Move assignment executes at the schema level just the <--Copy assignment does; but as with <--Copy, a suitable relvalue can be used in lieu of a schema. The DBMS uses the system schemas to move the relevant relvars into subschema CompanySouth from CompanyNorth, leaving the remainder in CompanyNorth. The relvars are not literally moved to CompanySouth. Rather the accessibility of the relvars is changed so that each relvar is accessible from its system relvar and subschema CompanySouth, instead of from its system relvar and subschema CompanyNorth. A Venn diagram of the DB now looks as follows :- Subschema CompanyDB DB Schema ExampleDB Subschema CompanyNorth Schema Virtual UsersNorth DeptsNorth EmpsNorth DEPT EMP USER UsersSouth DeptsSouth EmpsSouth Schema Logical Schema Sink Subschema CompanySouth Schema Source Using RAQUEL Database Schemas The schemas are part of the RAQUEL formal model. Therefore they can be used in any way desired. It is suggested that there are two main kinds of usage. Firstly usage by end-user driver applications, which will typically use subschema(s) containing just those relvars relevant to the application(s); however in a small DB, this could be all the relvars in the DB. Secondly usage by DB Administration Tool driver applications, which will typically use system schemas and the DB Schema; however where a DB Page 9 of 10
10 contains many relvars, it may be useful to have several subschemas which together partition a system schema. Using Sources and Sinks Sources and sinks are part of the RAQUEL formal model. Therefore they can be used in any way desired. They will typically be used to associate a DB with external data locations, sinks in particular being used to receive the results of DB queries. However if the situation were pushed to the limit, one could envisage a pseudo DB consisting solely of a set of sources and sinks. The relvars of such a pseudo DB would not be under the complete control and management of the DBMS because they are external; but nevertheless within the limits this imposes, a driver application could manipulate the pseudo DB via the DBMS just as if would a proper DB. Page 10 of 10
Illustrative Example of Logical Database Creation
Illustrative Example of Logical Database Creation A small RAQUEL DB is created to illustrate what is involved as regards the logical schemas of a RAQUEL DB. Create a Database or ExampleDB
More informationIllustrative Example of Physical Schema Usage
Example of Physical Usage 14 th February 2014 (30 th March 2001) Illustrative Example of Physical Usage The example assumes that a small RAQUEL DB and its relational model schemas have already been created.
More informationStored Relvars 18 th April 2013 (30 th March 2001) David Livingstone. Stored Relvars
Stored Relvars Introduction The purpose of a Stored Relvar (= Stored Relational Variable) is to provide a mechanism by which the value of a real (or base) relvar may be partitioned into fragments and/or
More informationRAQUEL s Relational Operators
Contents RAQUEL s Relational Operators Introduction 2 General Principles 2 Operator Parameters 3 Ordinary & High-Level Operators 3 Operator Valency 4 Default Tuples 5 The Relational Algebra Operators in
More informationExamples of Relational Value Assignments
Examples of Relational Value Assignments Example Relvars - First Set Let relvar EMP contain sample data of the ID number and name of employees, displayed in tabular format as :- No Name 1 Jack 2 Jill Example
More informationAmendments & Transactions
Slide 1 Amendments & Transactions Objectives of the Lecture : To consider amendments to a relation; To consider transactions in SQL. Slide 2 Relational Amendment Strictly speaking, relational amendment
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 informationRAQUEL Parser Code Design
Parser Input A sequence of pointers-to-tokens. RAQUEL Parser Code Design Parser Output A tree of tokens linked together by pointers AND a sequence of error codes. Pre Conditions None. Post Conditions Length(
More informationChapter 3. Introducation to Relational Database 9/2/2014 CSC4341 1
Chapter 3 Introducation to Relational Database 9/2/2014 CSC4341 1 Relational Model Structure aspect Data in the database is perceived by the user as tables and nothing but tables Integrity aspect Those
More informationNULLs & Outer Joins. Objectives of the Lecture :
Slide 1 NULLs & Outer Joins Objectives of the Lecture : To consider the use of NULLs in SQL. To consider Outer Join Operations, and their implementation in SQL. Slide 2 Missing Values : Possible Strategies
More informationGeneralising Relational Algebra Set Operators
Generalising Relational lgebra Set Operators Introduction The relational algebra join operators, Natural Join and Generalised (or Theta) Join, can both be generalised to so that they incorporate semi joins
More informationDatabase Modelling. Lecture 5 Part 1: Updating Database 1/6/2015 1
Database Modelling Lecture 5 Part 1: Updating Database 1/6/2015 1 Learning Objectives 1. To consider how to do insertions and deletions in SQL 2. To consider amendments (updates) to a relation 3. To consider
More informationDatabases. Relational Model, Algebra and operations. How do we model and manipulate complex data structures inside a computer system? Until
Databases Relational Model, Algebra and operations How do we model and manipulate complex data structures inside a computer system? Until 1970.. Many different views or ways of doing this Could use tree
More informationCreating SQL Tables and using Data Types
Creating SQL Tables and using Data Types Aims: To learn how to create tables in Oracle SQL, and how to use Oracle SQL data types in the creation of these tables. Outline of Session: Given a simple database
More informationThe Logical Design of the Tokeniser
Page 1 of 21 The Logical Design of the Tokeniser Purpose 1. To split up a character string holding a RAQUEL statement expressed in linear text, into a sequence of character strings (called word tokens),
More informationDC62 Database management system JUNE 2013
Q2 (a) Explain the differences between conceptual & external schema. Ans2 a. Page Number 24 of textbook. Q2 (b) Describe the four components of a database system. A database system is composed of four
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 informationRelational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan
Relational Model DCS COMSATS Institute of Information Technology Rab Nawaz Jadoon Assistant Professor COMSATS IIT, Abbottabad Pakistan Management Information Systems (MIS) Relational Model Relational Data
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 informationDOWNLOAD PDF INSIDE RELATIONAL DATABASES
Chapter 1 : Inside Microsoft's Cosmos DB ZDNet Inside Relational Databases is an excellent introduction to the topic and a very good resource. I read the book cover to cover and found the authors' insights
More informationChapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases
Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
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 informationChapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)
Chapter 10 Normalization Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in Tuples and Update Anomalies 1.3 Null
More informationChapter 2. DB2 concepts
4960ch02qxd 10/6/2000 7:20 AM Page 37 DB2 concepts Chapter 2 Structured query language 38 DB2 data structures 40 Enforcing business rules 49 DB2 system structures 52 Application processes and transactions
More informationInformal Design Guidelines for Relational Databases
Outline Informal Design Guidelines for Relational Databases Semantics of the Relation Attributes Redundant Information in Tuples and Update Anomalies Null Values in Tuples Spurious Tuples Functional Dependencies
More informationElmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
More informationThe Relational Model
The Relational Model What is the Relational Model Relations Domain Constraints SQL Integrity Constraints Translating an ER diagram to the Relational Model and SQL Views A relational database consists
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 informationPart III. Data Modelling. Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1
Part III Data Modelling Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1 Outline of this part (I) 1 Introduction to the Relational Model and SQL Relational Tables Simple Constraints
More informationSQL Structured Query Language Introduction
SQL Structured Query Language Introduction Rifat Shahriyar Dept of CSE, BUET Tables In relational database systems data are represented using tables (relations). A query issued against the database also
More informationFunctional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys)
1 / 13 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant d Information in Tuples and Update Anomalies 1.3 Null Values in Tuples 1.4 Spurious Tuples
More informationUNIT 3 DATABASE DESIGN
UNIT 3 DATABASE DESIGN Objective To study design guidelines for relational databases. To know about Functional dependencies. To have an understanding on First, Second, Third Normal forms To study about
More informationCS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010
CS403- Database Management Systems Solved MCQS From Midterm Papers April 29,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS403- Database Management Systems MIDTERM EXAMINATION - Spring
More informationThe Syntax of Relational Operators
The Syntax of Relational Operators This document records the syntax i.e. keywords and parameters - of all the operators at the relational level of abstraction. Note : these operators are all members of
More informationRelational Model and Relational Algebra
UNIT-III Relational Model and Relational Algebra 1) Define the following terms with an example for each. 8 Marks (Jun / July2014) Super key: A set of attributes SK of R such that no two tuples in any valid
More informationChapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies
Chapter 14 Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies Copyright 2012 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines
More informationCS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam
CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam Question No: 1 ( Marks: 1 ) - Please choose one Which of the following is NOT a feature of Context DFD?
More informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 5 Structured Query Language Hello and greetings. In the ongoing
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 informationRelational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions.
COSC 304 Introduction to Database Systems Relational Model and Algebra Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was
More informationTo understand the concept of candidate and primary keys and their application in table creation.
CM0719: Database Modelling Seminar 5 (b): Candidate and Primary Keys Exercise Aims: To understand the concept of candidate and primary keys and their application in table creation. Outline of Activity:
More informationKing Fahd University of Petroleum and Minerals
1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25
More informationThe Relational Model. Chapter 3. Comp 521 Files and Databases Fall
The Relational Model Chapter 3 Comp 521 Files and Databases Fall 2012 1 Why Study the Relational Model? Most widely used model by industry. IBM, Informix, Microsoft, Oracle, Sybase, etc. It is simple,
More informationRelational Database Management Systems Oct I. Section-A: 5 X 4 =20 Marks
Relational Database Management Systems Oct 2015 1 I. Section-A: 5 X 4 =20 Marks 1. Data Consistency Files and application programs are created by different programmers over a long period of time, the files
More information6. Relational Algebra (Part II)
6. Relational Algebra (Part II) 6.1. Introduction In the previous chapter, we introduced relational algebra as a fundamental model of relational database manipulation. In particular, we defined and discussed
More informationChapter 2 Introduction to Relational Models
CMSC 461, Database Management Systems Spring 2018 Chapter 2 Introduction to Relational Models These slides are based on Database System Concepts book and slides, 6th edition, and the 2009 CMSC 461 slides
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 informationCS2 Current Technologies Note 1 CS2Bh
CS2 Current Technologies Note 1 Relational Database Systems Introduction When we wish to extract information from a database, we communicate with the Database Management System (DBMS) using a query language
More informationWe shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple.
Logical Database design Earlier we saw how to convert an unorganized text description of information requirements into a conceptual design, by the use of ER diagrams. The advantage of ER diagrams is that
More informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 3 Relational Model Hello everyone, we have been looking into
More information5 Integrity Constraints and Triggers
5 Integrity Constraints and Triggers 5.1 Integrity Constraints In Section 1 we have discussed three types of integrity constraints: not null constraints, primary keys, and unique constraints. In this section
More informationDatabases - 4. Other relational operations and DDL. How to write RA expressions for dummies
Databases - 4 Other relational operations and DDL How to write RA expressions for dummies Step 1: Identify the relations required and CP them together Step 2: Add required selections to make the CP Step
More informationFurther GroupBy & Extend Operations
Slide 1 Further GroupBy & Extend Operations Objectives of the Lecture : To consider whole relation Grouping; To consider the SQL Grouping option Having; To consider the Extend operator & its implementation
More informationBachelor in Information Technology (BIT) O Term-End Examination
No. of Printed Pages : 6 I CSI-14 I Bachelor in Information Technology (BIT) O Term-End Examination cn Cn1 June, 2010 CD cp CSI-14 : DATA ANALYSIS AND DATABASE DESIGN Time : 3 hours Maximum Marks : 75
More informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 13 Constraints & Triggers Hello and welcome to another session
More informationDatabase Systems Relational Model. A.R. Hurson 323 CS Building
Relational Model A.R. Hurson 323 CS Building Relational data model Database is represented by a set of tables (relations), in which a row (tuple) represents an entity (object, record) and a column corresponds
More informationDatabase Modelling. Lecture 4 (b): Database Integrity, Keys & Constraints. Akhtar Ali 10/14/2014 1
Database Modelling Lecture 4 (b): Database Integrity, Keys & Constraints Akhtar Ali 10/14/2014 1 Learning Objectives 1. To consider Referential Integrity & Foreign Keys 2. To consider Referential Integrity
More informationRelational Design: Characteristics of Well-designed DB
1. Minimal duplication Relational Design: Characteristics of Well-designed DB Consider table newfaculty (Result of F aculty T each Course) Id Lname Off Bldg Phone Salary Numb Dept Lvl MaxSz 20000 Cotts
More informationRelational Data Model
Relational Data Model 1. Relational data model Information models try to put the real-world information complexity in a framework that can be easily understood. Data models must capture data structure
More informationFunctional Dependencies and Finding a Minimal Cover
Functional Dependencies and Finding a Minimal Cover Robert Soulé 1 Normalization An anomaly occurs in a database when you can update, insert, or delete data, and get undesired side-effects. These side
More informationDatabases 1. Daniel POP
Databases 1 Daniel POP Week 4 Agenda The Relational Model 1. Origins and history 2. Key concepts 3. Relational integrity 4. Relational algebra 5. 12+1 Codd rules for a relational DBMSes 7. SQL implementation
More informationSQL. Char (30) can store ram, ramji007 or 80- b
SQL In Relational database Model all the information is stored on Tables, these tables are divided into rows and columns. A collection on related tables are called DATABASE. A named table in a database
More informationObjectives. After completing this lesson, you should be able to do the following:
Objectives After completing this lesson, you should be able to do the following: Describe the types of problems that subqueries can solve Define subqueries List the types of subqueries Write single-row
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 informationDATABASE TECHNOLOGY - 1DL124
1 DATABASE TECHNOLOGY - 1DL124 Summer 2007 An introductury course on database systems http://user.it.uu.se/~udbl/dbt-sommar07/ alt. http://www.it.uu.se/edu/course/homepage/dbdesign/st07/ Kjell Orsborn
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 informationDBMS. Relational Model. Module Title?
Relational Model Why Study the Relational Model? Most widely used model currently. DB2,, MySQL, Oracle, PostgreSQL, SQLServer, Note: some Legacy systems use older models e.g., IBM s IMS Object-oriented
More informationA Summary of Out of the Tar Pit
A Summary of Out of the Tar Pit Introduction This document summarises some points from the paper Out of the Tar Pit (written by Ben Moseley and Peter Marks, dated 6 th February 2006) which are relevant
More informationThe Relational Model Constraints and SQL DDL
The Relational Model Constraints and SQL DDL Week 2-3 Weeks 2-3 MIE253-Consens 1 Schedule Week Date Lecture Topic 1 Jan 9 Introduction to Data Management 2 Jan 16 The Relational Model 3 Jan. 23 Constraints
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 informationChapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Example of a Relation attributes (or columns) tuples (or rows) 2.2 Attribute Types The
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 informationThe Relational Model
The Relational Model Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to DB Mgmt) Relational Model
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 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 informationIEEE LANGUAGE REFERENCE MANUAL Std P1076a /D3
LANGUAGE REFERENCE MANUAL Std P1076a-1999 2000/D3 Clause 10 Scope and visibility The rules defining the scope of declarations and the rules defining which identifiers are visible at various points in the
More informationThe Relational Model. Chapter 3. Comp 521 Files and Databases Fall
The Relational Model Chapter 3 Comp 521 Files and Databases Fall 2014 1 Why the Relational Model? Most widely used model by industry. IBM, Informix, Microsoft, Oracle, Sybase, MySQL, Postgres, Sqlite,
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 informationNormalization is based on the concept of functional dependency. A functional dependency is a type of relationship between attributes.
Lecture Handout Database Management System Lecture No. 19 Reading Material Database Systems Principles, Design and Implementation written by Catherine Ricardo, Maxwell Macmillan. Section 7.1 7.7 Database
More informationPart V. Working with Information Systems. Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1
Part V Working with Information Systems Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1 Outline of this part 1 Introduction to Database Languages Declarative Languages Option 1: Graphical
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 informationFAQ: Relational Databases in Accounting Systems
Question 1: What is the definition of a schema as it relates to a database? What are the three levels? Answer 1: A schema describes the logical structure of a database. The three levels of schemas are
More informationCS2300: File Structures and Introduction to Database Systems
CS2300: File Structures and Introduction to Database Systems Lecture 9: Relational Model & Relational Algebra Doug McGeehan 1 Brief Review Relational model concepts Informal Terms Formal Terms Table Relation
More informationDatabase Design Process
Database Design Process Real World Functional Requirements Requirements Analysis Database Requirements Functional Analysis Access Specifications Application Pgm Design E-R Modeling Choice of a DBMS Data
More informationIBM A Assessment: DB2 9 Fundamentals-Assessment. Download Full Version :
IBM A2090-730 Assessment: DB2 9 Fundamentals-Assessment Download Full Version : http://killexams.com/pass4sure/exam-detail/a2090-730 C. 2 D. 3 Answer: C QUESTION: 294 In which of the following situations
More informationChapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations
Chapter 3B Objectives Relational Set Operators Learn About relational database operators SELECT & DIFFERENCE PROJECT & JOIN UNION PRODUCT INTERSECT DIVIDE The Database Meta Objects the data dictionary
More informationCOSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan
COSC 304 Introduction to Database Systems SQL DDL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Overview Structured Query Language or SQL is the standard query language
More informationQuery Processing SL03
Distributed Database Systems Fall 2016 Query Processing Overview Query Processing SL03 Distributed Query Processing Steps Query Decomposition Data Localization Query Processing Overview/1 Query processing:
More informationADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.
4541.564; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room 301-203) ADVANCED DATABASES Copyright by S.-g. Lee Review - 1 General Info. Text Book Database System Concepts, 6 th Ed., Silberschatz,
More informationCOMP7640 Assignment 2
COMP7640 Assignment 2 Due Date: 23:59, 14 November 2014 (Fri) Description Question 1 (20 marks) Consider the following relational schema. An employee can work in more than one department; the pct time
More informationdoc. RNDr. Tomáš Skopal, Ph.D. RNDr. Michal Kopecký, Ph.D.
course: Database Systems (NDBI025) SS2017/18 doc. RNDr. Tomáš Skopal, Ph.D. RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague
More informationCSE 565 Computer Security Fall 2018
CSE 565 Computer Security Fall 2018 Lecture 12: Database Security Department of Computer Science and Engineering University at Buffalo 1 Review of Access Control Types We previously studied four types
More informationCreating and Managing Tables Schedule: Timing Topic
9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe 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 informationObjective. The goal is to review material covered in Chapters 1-5. Do the following questions from the book.
CSCE 4523 Assignment 2 - Due Sunday, Feb. 19, 2017; 11:59pm on Blackboard This assignment may be done in pairs (undergrads only). Grad students must do the assignment individually. Objective The goal is
More informationInformation Systems. Relational Databases. Nikolaj Popov
Information Systems Relational Databases Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria popov@risc.uni-linz.ac.at Outline The Relational Model (Continues
More informationSemantic Errors in Database Queries
Semantic Errors in Database Queries 1 Semantic Errors in Database Queries Stefan Brass TU Clausthal, Germany From April: University of Halle, Germany Semantic Errors in Database Queries 2 Classification
More informationThe Relational Model
The Relational Model UVic C SC 370, Fall 2002 Daniel M. German Department of Computer Science University of Victoria 3 1 The Relational Model CSC 370 dmgerman@uvic.ca Overview How is data represented in
More informationRelational Database Model. III. Introduction to the Relational Database Model. Relational Database Model. Relational Terminology.
III. Introduction to the Relational Database Model Relational Database Model In 1970, E. F. Codd published A Relational Model of Data for Large Shared Data Banks in CACM. In the early 1980s, commercially
More information