CPS510 Database System Design Primitive SYSTEM STRUCTURE
|
|
- Kerry Blake
- 5 years ago
- Views:
Transcription
1 CPS510 Database System Design Primitive SYSTEM STRUCTURE Naïve Users Application Programmers Sophisticated Users Database Administrator DBA Users Application Interfaces Application Programs Query Data Base Schema Data Manipulation Language Pre-compiler (DML) Query Processor Data Definition Language Compiler (DDL) Application Programs Object Code Database Management System Data Base Manager Other Services Other OS Services Memory Manager Operating System File Manager Other Files Data Files Disk Storage - Physical Data Dictionary
2 Introduction A database can be defined as a set of Master files organized and administered in a flexible way, so that the files in the database can be easily adapted to new unforeseen tasks! Relational Database Management Systems Hierarchical Database Management Systems Network Database Management Systems Inverted Files DBMS There are 3 forms of database description - the ANSI/SPARC, 1975 (and so on...) 1. Conceptual Schema (Conceptual View) Machine-and-software independent description of the total database. It is also referred to as a logical database. 2. Internal Schema (Internal View) Description of the physical database! It is close to the machine level and describes such things as file organization and access paths. 3. External Schema (User View) User-oriented description of part of the database. It corresponds to a way in which a program needs to "view" the database. Since there are many purposes to which the data in a database maybe put, there will be many different external schemas (or schemata) corresponding to different programs interpreting the database in particular ways. A DBMS is software used to read/write, maintain, and provide among other things, security and integrity for the data.
3 Facilities Standard methods used by DBMSs to implement relationships Data dictionary, docs, etc... Data independence (i.e. the possibility of changing the physical database without having to make alterations to old programs that operate on the database.) Example: consider the File: CODE NAME ADDRESS TELEPHONE SALARY Database languages (QUEL, SQL, etc) Report generators/screen generators Recovery facilities Concurrency facilities File protection Elements of the Conceptual Schema Definition: A conceptual schema maybe thought of as a model of the enterprise using it. The Description of the Conceptual Schema may include a description of: 1. The kinds of logical files and record types comprising the db. 2. The fields included in the record type 3. The relationships between the different record types of the db. 4. Any limitations in the values that can be taken by individual fields, as well as, constraints upon the relationships between records.
4 Entities/Attributes An Entity is an item or a concept in the real world about which we want to report data. The data associated with an Entity is called Attribute (field names in a record). An entity type is a classification of all the entities describing the same type of item or concept from the real world. A description of an Entity type in the conceptual database includes: An unique name for each entity type. A field containing a unique identifier for each individual Entity called a key. A description of all attributes or fields of the entity type. An indication of the number of occurrences of an entity type the Database will be required to hold - known as the cardinal number of the entity type. Some attributes which maybe in an entity Mandatory or optional depending on whether fields should or should not always have a value. Single-valued or multi-valued. Multi-valued Attributes are stored in repeating fields Aggregate or simple. Corresponding to whether an attribute is formed from a combination of other attributes or NOT. Relationships Relationship: is used to describe a connection between Entities. Relation: is used to designate a logical table describing a set of similar Entities. (File = Relation = Table)
5 Data Models A data model is a method used to describe the Entity types and relationships of the Conceptual Database. E-R Entity / Relationship (or E-R-A) The E-R is used for top-down analysis of new systems. E-R Diagrams (Frank (1971) Chen (1976)) Bachman Diagrams (1969) or Data Structure Diagrams Relational Model (see the paradigm) The Relational Model for bottom-up of existing Relations User View Diagrams for bottom-up also. E r Examples E-R Bachman n m E 1 r 2 E 2 1 m E 1 r 2 E 2 E E 1 m r Tree n m r Graph/Network 1 1 E 1 r 2 E 2 E 1 r E 2 Order 3 E 3
6 The Design of the Conceptual Schema User Requirements E-R design of the DB Real World Stage 1 Choice of a Model Conceptual schema independent of concrete DBMS Normalization Stage 2 Normalization Adjusted diagrams and normalized Relational model Logical Optimization and Adjustments to a concrete DBMS Stage 3 Optimization Data Dictionary Database Description
7 Normal forms Normalization Formulate constraints on the structures of table, in the database to obtain a logical database that is like the "External world". By applying different sets of constraints results in differently structured tables and normal forms. Terminology Relation = table = file Tuple = record Attribute = a field Domain = field's value area Example: A sales person file (Before normalization) SNR City Code PNR Qty PNR Qty PNR Qty PNR Qty PNR Qty S1 Athens S2 Toronto 30 P1 200 P3 100 S4 Kingston 20 P5 200 P8 100 S5 Toronto 30 P1 50 P3 500 P4 800 P5 500 P NF (First Normal Form - FNF) Each tuple must contain a unique identifier. Tuples have only atomic values in their A's (i.e. repeating groups are excluded)
8 The file after normalization. 1NF SNR City Code PNR Qty S1 Athens S2 Toronto 30 P1 200 S2 Toronto 30 P2 100 S4 Kingston 20 P5 200 S4 Kingston 20 P8 100 S5 Toronto 30 P1 50 S5 Toronto 30 P3 500 S5 Toronto 30 P4 800 S5 Toronto 30 P5 500 S5 Toronto 30 P Functional Dependency Assume that X and Y are fields in the same record (SC, City). Field Y is said to be functionally dependent on field X, if and only if, for all pairs of records in the file, that if they have the same value in field X, then they also have in field Y. Field Y is said to be fully functionally dependent on X if Y is functionally dependent on X, and NOT functionally dependent on any subset of X's possible subfields. A field on which another field is fully functional dependent is called the determinant for that field. Field Y is said to be transitively functionally dependent on X if there is some other field Z such that X determines the value of Z and Z determines the value of Y.
9 2NF (Second Normal Form - SNF) A relation is in 2NF if it is in 1NF and if all non-identifier fields are fully functional dependent on the record's identifier Example given with SC and City or with SNR and Name SNR S1 S2 S4 S5 Name CB BB RR PO 3NF (Third Normal Form) The relation is in 3NF if it is in 2NF and the record's non-identifier fields are NOT transitively dependent on the record's id field. The non-key fields must contain data that is attached to the identifier field, to the entire identifier and nothing but the identifier field. (this is omitted from the 2NF) Example The sales person table is represented as two tables satisfying the 3NF provided that SC (Sales Code) and City are independent. a) b) SNR PNR Qty S2 P1 200 S2 P2 100 S4 P5 200 S4 P8 100 SNR SC City S1 10 Athens S2 30 Toronto S4 20 Kingston S5 30 Toronto S5 P1 50 S5 P3 500 S5 P4 800 S5 P5 500 S5 P8 1000
10 3.5NF (Boyce/Codd Normal Form B/C NF) This NF makes use of the determinant. A field is the Determinant for other fields in the tuple, if all the fields make up a description of a type of object or concept from the external world in such a way that the determinant can be used as id key field for the new type of object or concept. Now we can define a relation in B/C NF as one in which any determinant attribute can be used as the tuples' id field. Note: The 3NF contains a constraint which the B/C does not: A relation is in the B/C normal form may well contain several different unique id fields, which the math derivation of the 3NF does not allow! The 3.5NF is more practical than the 3NF. 4NF (Fourth Normal Form) Multi-valued dependency (between attributes) It holds between two A's in a table if the second A can assume different values for a given value in the first A. If a relation contains two multi-value dependencies, these may depend on or be independent of each other, respectively. A relationship of order n, (please see order 3 in the E-R diagram example), will usually include many multi-valued dependencies (MD). If these are independent of each other, the relationship of order n can be reduced to l:n relationships and n:m relationships. A Table satisfies the 4NF if it satisfies the 3NF and if the table contains several MDs which are dependent of each other. If a table does not satisfy the 4NF because it may contain two independent MDs, then the table can be normalized by splitting it up into two different tables, each of which contains one of the MDs. Note: if the MDs are dependent on each other, the tables normally cannot be split. Problems with maintenance and updating! 5NF (Fifth Normal Form) Theoretical value. A relation R is in 5NF if and only if every join dependency (projection - join NF). Possible to reduce a R containing two MDs which are dependent on each other
11 Example: Relationship of order 3 Assume that a database contains a relation for each one of: vehicle dealers, vehicle manufacturers, vehicle types. Note: There is an N:M relationship between dealers and manufacturers. And a N:M relationship between dealers and types a) Show that C.B. and M.M. each sell Ford and GM products. b) Show that C.B. sells cars and buses and M.M. sells cars and trucks. Dealer Manufacturer C.B. Ford C.B. GM M.M. Ford M.M. GM Dealer C.B. C.B. M.M. M.M. Type Car Bus Car Truck a) MD between dealer and manufacturer. b) MD between dealer and type. The 2 tables can be implemented as a simple table with three columns. The MDs are in the same table. The 2 MDs are independent of each other if the "contents" of the first row mean that C.B. sells only Ford cars. if the MDs are independent, it is possible that C.B. doesn't sell Ford cars, only Ford buses if the MD are dependent, C.B. sells Ford's cars. 4NF Dealer Manufacturer Type C.B. Ford Car C.B. Ford Bus C.B. GM Car C.B. GM Bus M.M. Ford Car M.M. Ford Bus M.M. GM Car M.M. GM Bus 5NF Dealer Manufacturer Dealer Type C.B. Ford C.B. Car C.B. GM C.B. Bus M.M. Ford M.M. Truck Manufacturer Type Ford Car Ford Bus GM Car GM Truck
12 Data Definition in DB2 The principal data definition statements are: CREATE TABLE ALTER TABLE DROP TABLE CREATE VIEW DROP VIEW CREATE INDEX DROP INDEX CREATE TABLE There are two formats for the CREATE TABLE statement: e.g. e.g. 1. CREATE TABLE table-name (column-definition [, column-definition ]... [, primary-key-definition] [, alternate-key-definition [, alternate-key-definition]...]) [, foreign-key-definition, [foreign-key-definition...j) [ other parameters]; where a column-definition is column data-type [NOT NULL [ WITH DEFAULT I UNIQUE]] CREATE TABLE S S# CHAR(5) NOT NULL, SNAME CHAR(20) NOT NULL WITH DEFAULT, STATUS SMALLINT NOT NULL WITH DEFAULT, CITY CHAR(15) NOT NULL WITH DEFAULT, PRIMARY KEY (S#)); 2. CREATE TABLE table-name LIKE table [other parameters]; This format allows the user to create a table with, the same "shape" as another. The new table inherits only the column definitions from the old one. CREATE TABLE SCOPY LIKE S This would generate a table identical to a table generated with the following CREATE TABLE statement:
13 CREATE TABLE SCOPY S# CHAR(5) NOT NULL, SNAME CHAR(20) NOT NULL WITH DEFAULT, STATUS SMALLINT NOT NULL WITH DEFAULT, CITY CHAR(15) NOT NULL WITH DEFAULT); Note that the new table does not inherit any primary, alternate, or foreign key definitions. Nor would it inherit any UNIQUE specifications. DB2 does not allow any such specifications to be stated explicitly either. ALTER TABLE A new column can be added to a table at any time using the ALTER TABLE command: e.g. ALTER TABLE table-name ADD column data-type [NOT NULL WITH DEFAULT]; ALTER TABLE S ADD DISCOUNT SMALLINT DROP TABLE An existing table can be destroyed at any time by means of the DROP TABLE statement: DROP TABLE table-name; Foreign Key, and Referential Integrity in DB2 The referential integrity rule states that the database must not contain any unmatched foreign key values. That is non-null foreign keys for which there does not exist a matching value of the corresponding primary key are not allowed. The syntax of a foreign key definition is as follows: FOREIGN KEY [foreign-key] (column [,column]...]), REFERENCES table [ON DELETE effect] where effect is RESTRICT, CASCADE, or SET NULL.
14 e.g. CREATE TABLE SP ( S# CHAR(5) NOT NULL, P# CHAR( 6) NOT NULL, QTY INTEGER, PRIMARY KEY (S#, P#), FOREIGN KEY SFK (S#) REFERENCES S ON DELETE CASCADE FOREIGN KEY PFK (P#) REFERENCES P ON DELETE RESTRICT); The ON DELETE clause defines the delete rule for the target table with respect to this foreign key; that is, it defines what happens if an attempt is made to delete a row from the target table. RESTRICT: the delete is restricted to the case where there are no matching rows in table T2 (it is rejected is any such rows exist). CASCADE: the delete cascades to delete all matching rows in table T2 also. Note: if the key in T2 references yet another table T3, the delete rule for that key is applied as well. That is a single delete statement can cascade through a large number of tables if you are not careful. SET NULL: the foreign key must have NULLs allowed. The target row is deleted and the foreign key is set to NULL in all matching rows in table T2. INDEXES The CREATE INDEX takes the general form: e.g. CREATE [UNIQUE] INDEX index ON table-name (column [order] [, column [order]]...) [other parameters] ; CREATE INDEX X ON T(P, Q, DESC, R); This creates an index called X on table T in which entries are ordered by ascending R-value, within descending Q-value and within ascending P-value. The columns P, Q and R need not be contiguous, nor need be all the same data type, nor need they all be fixed or varying length. The UNIQUE option specifies that no two rows in the indexed tables will be allowed to take on the same values for the indexed column or column combinations at the same time. Indexes can be dropped by issuing a DROP INDEX command. e.g. DROP INDEX X
15 Physical Database Structures File Organizations Sequential Organization: Records are stored according to a fixed sequence. Random Organization: Records are retrieved by transforming the id field (key) to a block address. Index Organization: Records can be searched through an index that contains references to the records in a file. List Organization: There are various forms. Usually, records are chained together by pointer fields. Note: There are primary and secondary File Organizations: Primary is based on the physical storage of the individual records, but the secondary is not. Keys Super Key: An attribute (or combination of attribute) that uniquely identifies each entity. Candidate Key: A minimal super key that does not contain a subset of attributes that itself is a super key Primary Key: A candidate key selected to uniquely identify all other attribute values in any given row. It cannot contain null values. (chosen by the DB designer). Secondary Key: An attribute (or combination of attributes) used strictly for data retrieval purposes. Foreign Key: An attribute (or combination of attributes) in a table whose value must either match the primary key in another table or be null Entity Sets Weak: An entity set does not have sufficient attributes to form a primary key. Strong: An entity set which has as a primary key. Integrity Rules Entity integrity: No null values in primary key guarantees that each entity will have a unique identity. Referential Integrity: Foreign key should match another primary key or be null. Makes it possible for an Attribute NOT to have a corresponding Attribute, but it will still be impossible to have an invalid entry.
CPS 510 Data Base I. There are 3 forms of database descriptions the ANSI/SPARK, 1975 and so on
Introduction DBMS 1957 A database can be defined as a set of Master files, organized & administered in a flexible way, so that the files in the database can be easily adapted to new unforeseen tasks! Relation
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 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 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 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 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 informationAssignment Session : July-March
Faculty Name Class/Section Subject Name Assignment Session : July-March 2018-19 MR.RAMESHWAR BASEDIA B.Com II Year RDBMS Assignment THEORY ASSIGNMENT II (A) Objective Question 1. Software that defines
More informationReview for Exam 1 CS474 (Norton)
Review for Exam 1 CS474 (Norton) What is a Database? Properties of a database Stores data to derive information Data in a database is, in general: Integrated Shared Persistent Uses of Databases The Integrated
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 informationDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM For COMPUTER SCIENCE DATABASE MANAGEMENT. SYSTEM SYLLABUS ER model. Relational model: relational algebra, tuple calculus, SQL. Integrity constraints, normal forms. File organization,
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 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 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 informationThe DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.
Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting
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 informationSQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210
SQL: Concepts Todd Bacastow IST 210: Organization of Data 2/17/2004 1 Design questions How many entities are there? What are the major entities? What are the attributes of each entity? Is there a unique
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 informationIntroduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure
Databases databases Terminology of relational model Properties of database relations. Relational Keys. Meaning of entity integrity and referential integrity. Purpose and advantages of views. The relational
More informationDATA MODELS. RECORD-BASED Models: OBJECT-BASED Models: HYBRID_BASED LOGICAL Models: PHYSICAL DATA Model. Here we have the following Models:
DATA MODELS Here we have the following Models: Record-based Logical Models Object-based Logical Models Hybrid-based Logical Models Physical Data Models RECORD-BASED Models: Hierarchical Model - based on
More informationThe Relational Model. Relational Data Model Relational Query Language (DDL + DML) Integrity Constraints (IC)
The Relational Model Relational Data Model Relational Query Language (DDL + DML) Integrity Constraints (IC) Why Study the Relational Model? Most widely used model in Commercial DBMSs: Vendors: IBM, Microsoft,
More informationDistributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science
Distributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science 1 Distributed Database Systems Basic concepts and Definitions Data Collection of facts and figures concerning an object
More informationChapter 4. The Relational Model
Chapter 4 The Relational Model Chapter 4 - Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations and relations in the relational model.
More informationReview -Chapter 4. Review -Chapter 5
Review -Chapter 4 Entity relationship (ER) model Steps for building a formal ERD Uses ER diagrams to represent conceptual database as viewed by the end user Three main components Entities Relationships
More informationDatabase Applications (15-415)
Database Applications (15-415) The Relational Model Lecture 3, January 18, 2015 Mohammad Hammoud Today Last Session: The entity relationship (ER) model Today s Session: ER model (Cont d): conceptual design
More informationCOGS 121 HCI Programming Studio. Week 03 - Tech Lecture
COGS 121 HCI Programming Studio Week 03 - Tech Lecture Housekeeping Assignment #1 extended to Monday night 11:59pm Assignment #2 to be released on Tuesday during lecture Database Management Systems and
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 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 informationIntroduction to Databases
Introduction to Databases 1 Objectives Most common types of digital information processing enter file-based systems Why database systems came around DBMS environment: components / roles Is it all worth
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 informationTop 88 Question Asked in Part I of MIS 150 EXAM #1 (Chapter 1-4, Appendix C) Exams questions gathered from old tests dating back to Fall 2000
Top 88 Question Asked in Part I of MIS 150 EXAM #1 (Chapter 1-4, Appendix C) Exams questions gathered from old tests dating back to Fall 2000 1. Name one data model that emphasizes the concept of reusable
More information; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES
4541.564; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room 302-208) ADVANCED DATABASES Syllabus Text Books Exams (tentative dates) Database System Concepts, 5th Edition, A. Silberschatz, H. F.
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 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 informationDATABASE MANAGEMENT SYSTEM COURSE CONTENT
1 DATABASE MANAGEMENT SYSTEM COURSE CONTENT UNIT II DATABASE SYSTEM ARCHITECTURE 2 2.1 Schemas, Sub-schemas, and Instances 2.2 Three-level ANSI SPARC Database Architecture: Internal level, Conceptual Level,
More informationDATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems
DATABASE MANAGEMENT SYSTEMS UNIT I Introduction to Database Systems Terminology Data = known facts that can be recorded Database (DB) = logically coherent collection of related data with some inherent
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 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 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 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 informationRelational Data Structure and Concepts. Structured Query Language (Part 1) The Entity Integrity Rules. Relational Data Structure and Concepts
Relational Data Structure and Concepts Structured Query Language (Part 1) Two-dimensional tables whose attributes values are atomic. At every row-and-column position within the table, there always exists
More informationCourse Outline Faculty of Computing and Information Technology
Course Outline Faculty of Computing and Information Technology Title Code Instructor Name Credit Hours Prerequisite Prerequisite Skill/Knowledge/Understanding Category Course Goals Statement of Course
More informationLayers. External Level Conceptual Level Internal Level
Layers External Level Conceptual Level Internal Level Objective of 3 Layer Arch. Separate each user s view of database from the way database is physically represented. Each user should be able to access
More informationDomain Constraints Referential Integrity Assertions Triggers. Authorization Authorization in SQL
Chapter 6: Integrity and Security Domain Constraints Referential Integrity Assertions Triggers Security Authorization Authorization in SQL 6.1 Domain Constraints Integrity constraints guard against accidental
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 informationD B M G. SQL language: basics. Managing tables. Creating a table Modifying table structure Deleting a table The data dictionary Data integrity
SQL language: basics Creating a table Modifying table structure Deleting a table The data dictionary Data integrity 2013 Politecnico di Torino 1 Creating a table Creating a table (1/3) The following SQL
More informationReview. The Relational Model. Glossary. Review. Data Models. Why Study the Relational Model? Why use a DBMS? OS provides RAM and disk
Review The Relational Model CS 186, Fall 2006, Lecture 2 R & G, Chap. 3 Why use a DBMS? OS provides RAM and disk Review Why use a DBMS? OS provides RAM and disk Concurrency Recovery Abstraction, Data Independence
More informationThe Relational Model
The Relational Model UVic C SC 370, Fall 2002 Daniel M. German Department of Computer Science University of Victoria September 25, 2002 Version: 1.03 3 1 The Relational Model (1.03) CSC 370 dmgerman@uvic.ca
More informationSQL Simple Queries. Chapter 3.1 V3.01. Napier University
SQL Simple Queries Chapter 3.1 V3.01 Copyright @ Napier University Introduction SQL is the Structured Query Language It is used to interact with the DBMS (database management system) SQL can Create Schemas
More informationRelational Model. Topics. Relational Model. Why Study the Relational Model? Linda Wu (CMPT )
Topics Relational Model Linda Wu Relational model SQL language Integrity constraints ER to relational Views (CMPT 354 2004-2) Chapter 3 CMPT 354 2004-2 2 Why Study the Relational Model? Most widely used
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 informationThe Relational Model. Outline. Why Study the Relational Model? Faloutsos SCS object-relational model
The Relational Model CMU SCS 15-415 C. Faloutsos Lecture #3 R & G, Chap. 3 Outline Introduction Integrity constraints (IC) Enforcing IC Querying Relational Data ER to tables Intro to Views Destroying/altering
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 information2011 DATABASE MANAGEMENT SYSTEM
Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2011 2011 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.
More information- Database: Shared collection of logically related data and a description of it, designed to meet the information needs of an organization.
أساسيات قواعد بيانات 220) DataBase fundamentals (IS Lecture 1: Ch1 -Principles of DataBases- File-Based Systems: Collection of application programs that perform services for the end users. (e.g: reports).
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 informationChapter 4. Basic SQL. Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Chapter 4 Basic SQL Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4 Outline SQL Data Definition and Data Types Specifying Constraints in SQL Basic Retrieval Queries
More informationCPS 510 Data Base I. Query: find all SNRs whose scodes are greater than some SNRs whose name is CB.
11. ANY Query: find all SNRs whose scodes are greater than some SNRs whose name is CB. SQL: SELECT snr FROM s x WHERE scodes > ANY ( SELECT scode FROM s y WHERE y.sname= CB ); snr S2 S4 S5 12. ALL Query:
More informationCOSC344 Database Theory and Applications. σ a= c (P) Lecture 3 The Relational Data. Model. π A, COSC344 Lecture 3 1
COSC344 Database Theory and Applications σ a= c (P) S P Lecture 3 The Relational Data π A, C (H) Model COSC344 Lecture 3 1 Overview Last Lecture Database design ER modelling This Lecture Relational model
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 informationThe Relational Model. Week 2
The Relational Model Week 2 1 Relations A relation is a more concrete construction, of something we have seen before, the ER diagram. name S.S.N students street city A relation is (just!) a table! We will
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
CHAPTER 6 Basic SQL Slide 6-2 Chapter 6 Outline SQL Data Definition and Data Types Specifying Constraints in SQL Basic Retrieval Queries in SQL INSERT, DELETE, and UPDATE Statements in SQL Additional Features
More informationLecture2: Database Environment
College of Computer and Information Sciences - Information Systems Dept. Lecture2: Database Environment 1 IS220 : D a t a b a s e F u n d a m e n t a l s Topics Covered Data abstraction Schemas and Instances
More informationIntroduction to Information Systems
Table of Contents 1... 2 1.1 Introduction... 2 1.2 Architecture of Information systems... 2 1.3 Classification of Data Models... 4 1.4 Relational Data Model (Overview)... 8 1.5 Conclusion... 12 1 1.1 Introduction
More informationEGCI 321: Database Systems. Dr. Tanasanee Phienthrakul
1 EGCI 321: Database Systems Dr. Tanasanee Phienthrakul 2 Chapter 10 Data Definition Language (DDL) 3 Basic SQL SQL language Considered one of the major reasons for the commercial success of relational
More informationData Modeling using ER Model
Data Modeling using ER Model Database design process - requirements collection and analysis: database requirements and functional requirements - conceptual DB design using a high-level model: easier to
More informationBasic SQL. Dr Fawaz Alarfaj. ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation
Basic SQL Dr Fawaz Alarfaj Al Imam Mohammed Ibn Saud Islamic University ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation MIDTERM EXAM 2 Basic
More informationNorthern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester
1. List four significant differences between a file-processing system and a DBMS. 2. Explain the difference between physical and logical data independence. 3. What are five main functions of a database
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 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 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 informationThe Relational Model and Normalization
The Relational Model and Normalization 1. Introduction 2 2. Relational Model Terminology 3 4. Normal Forms 11 5. Multi-valued Dependency 21 6. The Fifth Normal Form 22 The Relational Model and Normalization
More informationIndex. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,
A Access control, 165 granting privileges to users general syntax, GRANT, 170 multiple privileges, 171 PostgreSQL, 166 169 relational databases, 165 REVOKE command, 172 173 SQLite, 166 Aggregate functions
More informationTransforming ER to Relational Schema
Transforming ER to Relational Schema Transformation of ER Diagrams to Relational Schema ER Diagrams Entities (Strong, Weak) Relationships Attributes (Multivalued, Derived,..) Generalization Relational
More informationChapter 1 SQL and Data
Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational
More informationIntroduction to SET08104
Introduction to SET08104 SET08104 Database Systems Copyright @ Napier University Introduction Before Databases: Each application suite had independent master files. Duplication of data could lead to inconsistencies
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 informationWeek. Lecture Topic day (including assignment/test) 1 st 1 st Introduction to Module 1 st. Practical
Name of faculty: Gaurav Gambhir Discipline: Computer Science Semester: 6 th Subject: CSE 304 N - Essentials of Information Technology Lesson Plan Duration: 15 Weeks (from January, 2018 to April, 2018)
More informationChapter 11: Data Management Layer Design
Systems Analysis and Design With UML 2.0 An Object-Oriented Oriented Approach, Second Edition Chapter 11: Data Management Layer Design Alan Dennis, Barbara Wixom, and David Tegarden 2005 John Wiley & Sons,
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 informationVALLIAMMAI ENGINEERING COLLEGE
VALLIAMMAI ENGINEERING COLLEGE III SEMESTER - B.E COMPUTER SCIENCE AND ENGINEERING QUESTION BANK - CS6302 DATABASE MANAGEMENT SYSTEMS UNIT I 1. What are the disadvantages of file processing system? 2.
More informationSystems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases
Systems Analysis and Design in a Changing World, Fourth Edition Chapter : Designing Databases Learning Objectives Describe the differences and similarities between relational and object-oriented database
More informationCISC 3140 (CIS 20.2) Design & Implementation of Software Application II
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Email Address: meyer@sci.brooklyn.cuny.edu Course Page: http://www.sci.brooklyn.cuny.edu/~meyer/ CISC3140-Meyer-lec4
More informationThe Relational Model. Roadmap. Relational Database: Definitions. Why Study the Relational Model? Relational database: a set of relations
The Relational Model CMU SCS 15-415/615 C. Faloutsos A. Pavlo Lecture #3 R & G, Chap. 3 Roadmap Introduction Integrity constraints (IC) Enforcing IC Querying Relational Data ER to tables Intro to Views
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 informationThe Relational Model. Why Study the Relational Model? Relational Database: Definitions
The Relational Model Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in
More informationAdministrivia. The Relational Model. Review. Review. Review. Some useful terms
Administrivia The Relational Model Ramakrishnan & Gehrke Chapter 3 Homework 0 is due next Thursday No discussion sections next Monday (Labor Day) Enrollment goal ~150, 118 currently enrolled, 47 on the
More informationBasic SQL. Basic SQL. Basic SQL
Basic SQL Dr Fawaz Alarfaj Al Imam Mohammed Ibn Saud Islamic University ACKNOWLEDGEMENT Slides are adopted from: Elmasri & Navathe, Fundamentals of Database Systems MySQL Documentation Basic SQL Structured
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 informationIntroduction to Data Management. Lecture #4 (E-R Relational Translation)
Introduction to Data Management Lecture #4 (E-R Relational Translation) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Today
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 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 informationChapter 11 Database Concepts
Chapter 11 Database Concepts INTRODUCTION Database is collection of interrelated data and database system is basically a computer based record keeping system. It contains the information about one particular
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 informationThe Relational Model. Chapter 3
The Relational Model Chapter 3 Why Study the Relational Model? Most widely used model. Systems: IBM DB2, Informix, Microsoft (Access and SQL Server), Oracle, Sybase, MySQL, etc. Legacy systems in older
More informationKeys, SQL, and Views CMPSCI 645
Keys, SQL, and Views CMPSCI 645 SQL Overview SQL Preliminaries Integrity constraints Query capabilities SELECT-FROM- WHERE blocks, Basic features, ordering, duplicates Set ops (union, intersect, except)
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 informationDB Creation with SQL DDL
DB Creation with SQL DDL Outline SQL Concepts Data Types Schema/Table/View Creation Transactions and Access Control Objectives of SQL Ideally, database language should allow user to: create the database
More informationCMP-3440 Database Systems
CMP-3440 Database Systems Logical Design Lecture 03 zain 1 Database Design Process Application 1 Conceptual requirements Application 1 External Model Application 2 Application 3 Application 4 External
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 informationThe Relational Model. Database Management Systems
The Relational Model Fall 2017, Lecture 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody Allen
More information