? Database Management

Size: px
Start display at page:

Download "? Database Management"

Transcription

1 ? Database Management

2 Subject: DATABSE MANAGEMENT Credits: 4 SYLLABUS Introduction to data base management system Data versus information, record, file; data dictionary, database administrator, functions and responsibilities; file-oriented system versus database system Database system architecture Introduction, schemas, sub schemas and instances; data base architecture, data independence, mapping, data models, types of database systems Data base security Threats and security issues, firewalls and database recovery; techniques of data base security; distributed data base Data warehousing and data mining Emerging data base technologies, internet, database, digital libraries, multimedia data base, mobile data base, spatial data base Lab: Working over Microsoft Access Suggested Readings: 1. A Silberschatz, H Korth, S Sudarshan, Database System and Concepts ; fifth Edition; McGraw-Hill 2. Rob, Coronel, Database Systems, Seventh Edition, Cengage Learning

3 DATABASE MANAGEMENT SYSTEM DATABASE MANAGEMENT COURSE OVERVIEW This course provides an immediately useable tools and the techniques in the methods of database management system, requirements analysis, definition, specification and design etc. It provides participants with the details if the tools, techniques and methods to lead or participate in the front-end phases. Database systems are designed to manage large bodies of information.management of data involves both defining structures for storage of information & providing way for manipulation of data. In addition, the database system must ensure safety of data. DBMS is collection of programs that enables you to store, modify, and extract important information from a database. There are many different types of DBMS, ranging from small sys-tems that run on personal computers to huge systems that run on mainframes. The students on completion of the course shall develop the following skills and competencies: Database DBMS Database System Application File System Data Ionsistency Objectives To help you to learn DBMS and design technique: what it is and how one goes about doing it. The primary goal of DBMS is to provide an environment that is both convenient & efficient for people to use in retrieving & storing information.. Database systems are designed to store large bodies of information. By the end of this material, you will be equipped with good knowledge of technical information that will help you develop & understand DBMS ii

4 DATABASE MANAGEMENT DATABASE Lesson No. Topic Page No. INTRODUCTION TO DBMS CONTENT MANAGEMENT Lesson 1 Introduction to Database I 1 Lesson 2 Introduction to Database II 5 Lesson 3 Tutorial 8 Lesson 4 Database Concepts I 9 Lesson 5 Database Concepts II 13 DATA MODELS IN DATABASES Lesson 6 Data Models 17 RELATIONAL DATA BASE MANAGEMENT SYSTEM Lesson 7 Relational Database Management System I 21 Lesson 8 Relational Database Management System II 27 Lesson 9 E-R Model I 31 Lesson 10 E-R Model II 36 STRUCTURED QUERY LANGUAGES Lesson 11 Structured Query Language(SQL) I 40 Lesson 12 LAB 45 Lesson 13 Lab 46 Lesson 14 SQL II 47 Lesson 15 LAB 55 Lesson 16 LAB 56 Lesson 17 SQL III 57 Lesson 18 Lab 62 Lesson 19 Lab 63 Lesson 20 SQL IV 64 Lesson 21 Lab 67 Lesson 22 Lab 68 Lesson 23 Integrity and security 69 Lesson 24 LAB 75 Lesson 25 LAB 76 Lesson 26 PL/SQL 77 Lesson 27 Lab 82 Lesson 28 Lab 83 Lesson 29 Database Triggers 84 Lesson 30 LAB 89 v

5 DATABASE MANAGEMENT CONTENT Lesson No. Topic Page No. Lesson 31 LAB 90 Lesson 32 Database Cursors 91 Lessom 33 LAB 100 Lesson 34 LAB 101 NORMALIZATION Lesson 35 Normalisation I 102 Lesson 36 Normalisation I I 107 Lesson 37 Normalisation III 112 FILE ORGANIZATION METHODS Lesson 38 File Organization Method I 118 Lesson 39 File Organization Method II 123 DATABASE MANAGEMENT DATA BASE OPERATIONAL MAINTENANCE Lesson 40 Transactions Management 130 Lesson 41 Concurrency Control I 136 Lesson 42 Concurency Control II 141 Lesson 43 Concurrency Control III 146 Lesson 44 Database Recovery 152 vi

6 LESSON 1: INTRODUCTION TO DATABASE I Lessons Objective Database Database management system Essentials of data Benefits of DBMS Database system application Purpose of database system 1.1 What is Database Management System(DBMS) A database can be termed as a repository of data. A collection of actual data which constitutes the information regarding an organisation is stored in a database. For ex. There are 1000 students in a college & we have to store their personal details, marks details etc., these details will be recorded in a database. A collection of programs that enables you to store, modify, and extract information from a database is known as DBMS.The primary goal of a DBMS is to provide a way to store & retrieve database information that is both convenient & efficient. Actual data storage Database systems are designed to manage large bodies of information.management of data involves both defining structures for storage of information & providing way for manipulation of data. In addition, the database system must ensure safety of data. DBMS is collection of programs that enables you to store, modify, and extract important information from a database. There are many different types of DBMS, ranging from small sys-tems that run on personal computers to huge systems that run on mainframes. Good data management is an essential prerequisite to corporate success. Data Information Information Knowledge Knowledge Judgment Judgment Decision Decision Success provided that data is: complete accurate timely easily available 1.2 Database System Applications There are many different types of DBMSs, ranging from small systems that run on personal computers to huge systems that run on mainframes. Database are applied in wide no. of applications. Following are some of the examples :- Banking: For customer information, accounts, loans & other banking transactions Airlines: For reservation & schedule information Universities: For student information, course registration,grades etc. Credit card transaction: For purchase of credit cards & generation of monthly statements. Tlecommunication: For keeping records of calls made, generating monthly billetc. Finance: For storing information about holdings, sales & purchase of financial statements Sales: For customer,product & purchase information Manufacturing: For management of supply chain. Human Resource: For recording information about employees,salaries,tax,benefits etc. We can say that when ever we need to have a computerised system, we need a database system 1.3 Purpose of Database system A file system is one in which we keep the information in operating system files. Before the evolution of DBMS, organisations used to store information in file systems. A typical file processing system is supported by a conventional operating system. The system stores permanent records in various files & it need application program to extract records, or to add or delete records. We will compare both systems with the help of an example. There is a saving bank enterprise that keeps information about all customers & saving accounts. Following manipulations has to be done with the system A program to debit or credit an account A program to add a new account. A program to find balance of an account. A program to generate monthly statements. As the need arises new applications can be added at a particular point of time as checking accounts can be added in a saving account. Using file system for storing data has got following disadvantages:- 1. Data Redundancy and Inconsistency Different programmers work on a single project, so various files are created by different programmers at some interval of time. So various files are created in different formats & different programs are written in different programming language. DATABASE MANAGEMENT 1

7 DATABASE MANAGEMENT Same information is repeated.for ex name & address may appear in saving account file as well as in checking account. This redundancy sesults in higher storage space & access cost.it also leads to data inconsistency which means that if we change some record in one place the change will not be reflected in all the places. For ex. a changed customer address may be reflected in saving record but not any where else. 2. Difficulty in Accesing data Accessing data from a list is also a difficulty in file system.suppose we want to see the records of all customers who has a balance less than $10,000, we can either check the list & find the names manually or write an application program.if we write an application program & at some later time, we need to see the records of customer who have a balance of less than $20,000, then again a new program has to be written. It means that file processing system do not allow data to be accessed in a convenient manner. 3. Data Isolation As the data is stored in various files, & various files may be stored in different format, writing application program to retrieve the data is difficult. 4. Integrity Problems Sometimes, we need that data stored should satisfy certain constraints as in a bank a minimum deposit should be of $100. Developers enforce these constraints by writing appropriate programs but if later on some new constraint has to be added then it is difficult to change the programs to enforce them. 5. Atomicity Problems Any mechanical or electrical devive is subject to failure, and so is the computer system. In this case we have to ensure that data should be restored to a consistent state.for example an amount of $50 has to be transferred from Account A to Account B. Let the amount has been debited from account A but have not been credited to Account B and in the mean time, some failure occurred. So, it will lead to an inconsistent state. So,we have to adopt a mechanism which ensures that either full transaction hould b executed or no transaction should be excuted i.e. the fund transfer should be atomic. 6. Concurrent access Problems Many systems allows multiple users to update the data simultaneously. It can also lead the data in an inconsistent state.suppose a bank account contains a balance of $ 500 & two customers want to withdraw $100 & $50 simultaneously. Both the transaction reads the old balance & withdraw from that old balance which will result in $450 & &400 which is incorrect. 7.Security Problems All the user of database should not be able to access all the data. For example a payroll Personnel needs to access only that part of data which has information about various employees & are not needed to access information about customer accounts. Points to Ponder A DBMS contains collection of inter-related data & collection of programs to access the data. The primary goal of DBMS is to provide an environment that is both convenient & efficient for people to use in retrieving & storing information. DBMS systems are ubiquitous today & most people interact either directly or indirectly with database many times every day. Database systems are designed to store large bodies of information. A major purpose of a DBMS is to provide users with an abstract view of data i.e. the system hides how the data is stored & maintained. Review Terms Database DBMS Database System Application File System Data Ionsistency Consistency constraints Atomicity Redundancy Data isolation Data Security Students Activity 1. What is database?explain with example? 2. What is DBMS?Explain with example? 3. List four significant difference between file system & DBMS? 2

8 4. What are the advantages of DBMS? 5. Explain various applications of database? 10. Explain consistency constraints in database? DATABASE MANAGEMENT 6. Explain data inconsistency with example? 7. Explain data security? Why it is needed?explain with example? 8. Explain isolation & atomicity property of database? 9. Explain why redundancy should be avoided in database? 3

9 DATABASE MANAGEMENT Student Notes 4

10 Lesson Objective Data abstraction View of data Levels of data Physical level Logical level View level Database language DDL,DML View of Data A database contains a no. of files & certain programs to access & modify these files.but the actual data is not shown to the user, the system hides actual details of how data is stored & maintained. Data Abstraction Data abstraction is the process of distilling data down to its essentials. The data when needed should be retrieved efficiently. As all the details are not of use for all the users, so we hide the actual(complex) details from users. Various level of abstraction to data is provided which are listed below:- Physical level It is the lowest level of abstraction & specifies how the data is actually stored. It describes the complex data structure in details. LESSON 2: INTRODUCTION TO DATABASE II View level This level contains the actual data which is shown to the users. This is the highest level of abstraction & the user of this level need not know the actual details(complexity) of data storage. DATABASE MANAGEMENT Logical level It is the next level of abstraction & describes what data are stored in database & what relationship exists between varius data. It is less complex than physical level & specifies simple structures. Though the complexity of physical level is required at logical level, but users of logical level need not know these complexities. Database Language As a language is required to understand any thing, similarly to create or manipulate a database we need to learn a language.database language is divided into mainly 2 parts :- 1. DDL(Data definition language) 2. DML(Data Manipulation language) Data Definition Language (DDL) Used to specify a database scheme as a set of definitions expressed in a DDL 1. DDL statements are compiled, resulting in a set of tables stored in a special file called a data dictionary or data directory. 2. The data directory contains metadata (data about data) 3. The storage structure and access methods used by the database system are specified by a set of definitions in a 5

11 DATABASE MANAGEMENT special type of DDL called a data storage and definition language 4. basic idea: hide implementation details of the database schemes from the users Data Manipulation Language (DML) 1. Data Manipulation is: retrieval of information from the database insertion of new information into the database deletion of information in the database modification of information in the database 2. A DML is a language which enables users to access and manipulate data. The goal is to provide efficient human interaction with the system. 3. There are two types of DML: procedural: the user specifies what data is needed and how to get it nonprocedural: the user only specifies what data is needed Easier for user May not generate code as efficient as that produced by procedural languages 4. A query language is a portion of a DML involving information retrieval only. The terms DML and query language are often used synonymously. Points to Ponder DBMS systems are ubiquitous today & most people interact either directly or indirectly with database many times every day. Database systems are designed to store large bodies of information. A major purpose of a DBMS is to provide users with an abstract view of data i.e. the system hides how the data is stored & maintained. Structure of a database is defined through DDL. & manipulated through DML. DDL statements are compiled, resulting in a set of tables stored in a special file called a data dictionary or data directory. A query language is a portion of a DML involving information retrieval only. The terms DML and query language are often used synonymously. Review Terms Data Security Data Views Data Abstraction Physical level Logical level View level Database language Ddl Dml Query language Students Activity 1. Define data abstraction? 2. How many views of data abstraction are there? Explain in details? 3. Explain database language? Differentiate between DDL & DML? 6

12 Student Notes DATABASE MANAGEMENT 7

13 DATABASE MANAGEMENT LESSON 3: TUTORIAL 8

14 Lesson objective Data dictionary Meta data Database schema Database Instance Data independence Data Dictionary English language dictionaries define data in terms such as known facts or things used as a basis for inference or reckoning, typically (in modern usage) operated upon or manipulated by computers, or Factual information used as a basis for discussion, reasoning, or calculation Data dictionary may cover the whole organisation, a part of the organisation or a database. In its simplest form, the data dictionary is only a collection of data element definitions. More advanced data dictionary contains database schema with reference keys, still more advanced data dictionary contains entity-relationship model of the data elements or objects. Parts of Data Dictionary 1. Data Element Definitions Data element definitions may be independent of table definitions or a part of each table definition Data element number Data element number is used in the technical documents. Data element name (caption) Commonly agreed, unique data element name from the application domain. This is the real life name of this data element. Short description Description of the element in the application domain. Security classification of the data element Organisation-specific security classification level or possible restrictions on use. This may contain technical links to security systems. Related data elements List of closely related data element names when the relation is important. Field name(s) Field names are the names used for this element in computer programs and database schemas. These are the technical names, often limited by the programming languages and systems. Code format Data type (characters, numeric, etc.), size and, if needed, special representation. Common programming language notation, input masks, etc. can be used. LESSON 4: DATABASE CONCEPTS I Null value allowed Null or non-existing data value may be or may not be allowed for an element. Element with possible null values needs special considerations in reports and may cause problems, if used as a key. Default value Data element may have a default value. Default value may be a variable, like current date and time of the day (DoD). Element coding (allowed values) and intra-element validation details or reference to other documents Explanation of coding (code tables, etc.) and validation rules when validating this element alone in the application domain. Inter-element validation details or reference to other documents Validation rules between this element and other elements in the data dictionary. Database table references Reference to tables the element is used and the role of the element in each table. Special indication when the data element is the key for the table or a part of the key. Definitions and references needed to understand the meaning of the element Short application domain definitions and references to other documents needed to understand the meaning and use of the data element. Source of the data in the element Short description in application domain terms, where the data is coming. Rules used in calculations producing the element values are usually written here. Validity dates for the data element definition Validity dates, start and possible end dates, when the element is or was used. There may be several time periods the element has been used. History references Date when the element was defined in present form, references to superseded elements, etc. External references References to books, other documents, laws, etc. Version of the data element document Version number or other indicator. This may include formal version control or configuration management references, but such references may be hidden, depending on the system used. Date of the data element document Writting date of this version of the data element document. DATABASE MANAGEMENT 9

15 DATABASE MANAGEMENT Quality control references Organisation-specific quality control endorsements, dates, etc. Data element notes Short notes not included in above parts. Table Definitions Table definition is usually available with SQL command help table Tablename Table name Table owner or database name List of data element (column) names and details Key order for all the elements, which are possible keys Possible information on indexes Possible information on table organisation Technical table organisation, like hash, heap, B+ -tree, AVL - tree, ISAM, etc. may be in the table definition. Duplicate rows allowed or not allowed Possible detailed data element list with complete data element definitions Possible data on the current contents of the table The size of the table and similar site specific information may be kept with the table definition. Security classification of the table Security classification of the table is usually same or higher than its elements. However, there may be views accessing parts of the table with lower security. Database schema It is the overall structure is called a database schema. Database schema is usually graphical presentation of the whole database. Tables are connected with external keys and key colums. When accessing data from several tables, database schema will be needed in order to find joining data elements and in complex cases to find proper intermediate tables. Some database products use the schema to join the tables automatically. Database system has several schemas according to the level of abstraction.the physical schema describes the database design at physical level. The logical schema describes the database design at logical level.a database can also have sub-schemas(view level) that describes different views of database. Database Instance 1. Databases change over time. 2. The information in a database at a particular point in time is called an instance of the database 3. Analogy with programming languages: Data type definition - scheme Value of a variable - instance Meta-Data Meta-data is definitional data that provides information about or documentation of other data managed within an application or environment. For example, meta-data would document data about data elements or attributes, (name, size, data type, etc) and data about records or data structures (length, fields, columns, etc) and data about data (where it is located, how it is associated, ownership, etc.). Meta-data may include descriptive information about the context, quality and condition, or characteristics of the data. Data Independence 1. The ability to modify a scheme definition in one level without affecting a scheme definition in a higher level is called data independence. 2. There are two kinds: Physical data independence The ability to modify the physical scheme without causing application programs to be rewritten Modifications at this level are usually to improve performance Logical data independence The ability to modify the conceptual scheme without causing application programs to be rewritten Usually done when logical structure of database is altered 3. Logical data independence is harder to achieve as the application programs are usually heavily dependent on the logical structure of the data. An analogy is made to abstract data types in programming languages. Points to Ponder Data dictionary is a collection of data elements & its definition. Database Schema is the overall structure of a database. Database instance is the structure of a database at a particular time. Meta-data is the data about data. The ability to modify a scheme definition in one level without affecting a scheme definition in a higher level is called data independence. Review Terms Database Instance Schema Database Schema Physical schema Logical schema Physical data independence Database Language DDL DML Query Language Data dictionary Metadata 10

16 Student Activity 1. What is difference between database Schema & database instance? DATABASE MANAGEMENT 2. What do you understand by the structure of a database? 3. Define physical schema and logical schema? 4. Define data independence?explain types of data independence? 5. Define data dictionary, meta-data? 6. Define various elements of data dictionary? 11

17 DATABASE MANAGEMENT Student Notes 12

18 Lesson Objective Database manager Database user Database administrator Role of Database administrator Role of Database user Database architecture Database Manager The database manager is a program module which provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. 1. Databases typically require lots of storage space (gigabytes). This must be stored on disks. Data is moved between disk and main memory (MM) as needed. 2. The goal of the database system is to simplify and facilitate access to data. Performance is important. Views provide simplification. 3. So the database manager module is responsible for Interaction with the file manager: Storing raw data on disk using the file system usually provided by a conventional operating system. The database manager must translate DML statements into low-level file system commands (for storing, retrieving and updating data in the database). Integrity enforcement: Checking that updates in the database do not violate consistency constraints (e.g. no bank account balance below $25) Security enforcement: Ensuring that users only have access to information they are permitted to see Backup and recovery: Detecting failures due to power failure, disk crash, software errors, etc., and restoring the database to its state before the failure Concurrency control: Preserving data consistency when there are concurrent users. 4. Some small database systems may miss some of these features, resulting in simpler database managers. (For example, no concurrency is required on a PC running MS- DOS.) These features are necessary on larger systems Database Administrator The database administrator is a person having central control over data and programs accessing that data. Duties of the database administrator include: Scheme definition: the creation of the original database scheme. This involves writing a set of definitions in a DDL (data storage and definition language), compiled by the DDL compiler into a set of tables stored in the data dictionary. LESSON 5: DATABASE CONCEPTS II Storage structure and access method definition: writing a set of definitions translated by the data storage and definition language compiler Scheme and physical organization modification: writing a set of definitions used by the DDL compiler to generate modifications to appropriate internal system tables (e.g. data dictionary). This is done rarely, but sometimes the database scheme or physical organization must be modified. Granting of authorization for data access: granting different types of authorization for data access to various users Integrity constraint specification: generating integrity constraints. These are consulted by the database manager module whenever updates occur. Database Users The database users fall into several categories: Application programmers are computer professionals interacting with the system through DML calls embedded in a program written in a host language (e.g. C, PL/1, Pascal). These programs are called application programs. The DML precompiler converts DML calls (prefaced by a special character like $, #, etc.) to normal procedure calls in a host language. The host language compiler then generates the object code. Some special types of programming languages combine Pascal-like control structures with control structures for the manipulation of a database. These are sometimes called fourth-generation languages. They often include features to help generate forms and display data. Sophisticated users interact with the system without writing programs. They form requests by writing queries in a database query language. These are submitted to a query processor that breaks a DML statement down into instructions for the database manager module. Specialized users are sophisticated users writing special database application programs. These may be CADD systems, knowledge-based and expert systems, complex data systems (audio/video), etc. Naive users are unsophisticated users who interact with the system by using permanent application programs (e.g. automated teller machine). 1. Database systems are partitioned into modules for different functions. Some functions (e.g. file systems) may be provided by the operating system. DATABASE MANAGEMENT 13

19 DATABASE MANAGEMENT 2. Components include: File manager manages allocation of disk space and data structures used to represent information on disk. Database manager: The interface between low-level data and application programs and queries. Query processor translates statements in a query language into low-level instructions the database manager understands. (May also attempt to find an equivalent but more efficient form.) DML precompiler converts DML statements embedded in an application program to normal procedure calls in a host language. The precompiler interacts with the query processor. DDL compiler converts DDL statements to a set of tables containing metadata stored in a data dictionary. In addition, several data structures are required for physical system implementation: Data files: store the database itself. Data dictionary: stores information about the structure of the database. It is used heavily. Great emphasis should be placed on developing a good design and efficient implementation of the dictionary. Indices: provide fast access to data items holding particular values. Database System Architecture Database systems are partitioned into modules for different functions. Some functions (e.g. file systems) may be provided by the operating system. Components Include File manager manages allocation of disk space and data structures used to represent information on disk. Database manager: The interface between low-level data and application programs and queries. Query processor translates statements in a query language into low-level instructions the database manager understands. (May also attempt to find an equivalent but more efficient form.) DML precompiler converts DML statements embedded in an application program to normal procedure calls in a host language. The precompiler interacts with the query processor. DDL compiler converts DDL statements to a set of tables containing metadata stored in a data dictionary. In addition, several data structures are required for physical system implementation: Data files: store the database itself. Data dictionary: stores information about the structure of the database. It is used heavily. Great emphasis should be placed on developing a good design and efficient implementation of the dictionary. Indices: provide fast access to data items holding particular values. Naïve Users Application Interfaces Application Program object code DML PreCompiler File Manager Data files Application Programs Application programs Data storage Data dictionary Sophisticated Users Query Query processor DDL compiler Database Manager Database Administrator Database Schema Points to Ponder Database manager is a program module which provides the interface between the low-level data stored in the database and the application programs Database administrator is a person having central control over data Database user is a person who access the database at various level. Data files: store the database itself. Data dictionary: stores information about the structure of the database. DML precompiler converts DML statements embedded in an application program to normal procedure calls in a host language. File manager manages allocation of disk space and data structures used to represent information on disk. Review Terms Database Instance Schema Database Schema Physical schema Logical schema Physical data independence 14

20 Database Language DDL DML Query Language Data dictionary Metadata Database Administrator Database User Student Activity 1. What are the various kinds of database users? DATABASE MANAGEMENT 2. What do you understand by the structure of a database? 3. Define physical schema and logical schema? 4. Define file manager, dml compiler,data files? 15

21 DATABASE MANAGEMENT Student Notes 16

22 Lesson objective LESSON 6: DATA MODELS Understsnding data models Different types of data models Hierchachical data model network data model Relational model Data models are a collection of conceptual tools for describing data, data relationships, data semantics and data constraints. A data model is a description of both a container for data and a methodology for storing and retrieving data from that container. Actually, there isn t really a data model thing. Data models are abstractions, oftentimes mathematical algorithms and concepts. You cannot really touch a data model. But nevertheless, they are very useful. The analysis and design of data models has been the cornerstone of the evolution of databases. As models have advanced so has database efficiency. There are various kinds of data models i.e. in a database records can be arranged in various ways.the various ways in which data can be represented are:- 1. Hierarchial data model 2. Network data model 3. Relational Model 4. E-R-Model The Hierarchical Model Organization of the records is as a collection of trees. As its name implies, the Hierarchical Database Model defines hierarchically-arranged data. Perhaps the most intuitive way to visualize this type of relationship is by visualizing an upside down tree of data. In this tree, a single table acts as the root of the database from which other tables branch out. You will be instantly familiar with this relationship because that is how all windows-based directory management systems (like Windows Explorer) work these days. Relationships in such a system are thought of in terms of children and parents such that a child may only have one parent but a parent can have multiple children. Parents and children are tied together by links called pointers (perhaps physical addresses inside the file system). A parent will have a list of pointers to each of their children. If we want to create a structure where in a course various students are there & these students are given certain marks in assignment. However, as you can imagine, the hierarchical database model has some serious problems. For one, you cannot add a record to a child table until it has already been incorporated into the parent table. This might be troublesome if, for example, you wanted to add a student who had not yet signed up for any courses. Worse, yet, the hierarchical database model still creates repetition of data within the database. You might imagine that in the database system shown above, there may be a higher level that includes multiple course. In this case, there could be redundancy because students would be enrolled in several courses and thus each course tree would have redundant student information. Redundancy would occur because hierarchical databases handle one-to-many relationships well but do not handle many-tomany relationships well. This is because a child may only have one parent. However, in many cases you will want to have the child be related to more than one parent. For instance, the relationship between student and class is a many-to-many. Not only can a student take many subjects but a subject may also be taken by many students. How would you model this relationship simply and efficiently using a hierarchical database? The answer is that you wouldn t. Though this problem can be solved with multiple databases creating logical links between children, the fix is very kludgy and awkward. Faced with these serious problems, the computer brains of the world got together and came up with the network model. Network Databases In many ways, the Network Database model was designed to solve some of the more serious problems with the Hierarchical Database Model. Specifically, the Network model solves the problem of data redundancy by representing relationships in terms of sets rather than hierarchy. The model had its origins in DATABASE MANAGEMENT 17

23 DATABASE MANAGEMENT the Conference on Data Systems Languages (CODASYL) which had created the Data Base Task Group to explore and design a method to replace the hierarchical model. The network model is very similar to the hierarchical model actually. In fact, the hierarchical model is a subset of the network model. However, instead of using a single-parent tree hierarchy, the network model uses set theory to provide a tree-like hierarchy with the exception that child tables were allowed to have more than one parent. This allowed the network model to support many-to-many relationships. Visually, a Network Database looks like a hierarchical Database in that you can see it as a type of tree. However, in the case of a Network Database, the look is more like several trees which share branches. Thus, children can have multiple parents and parents can have multiple children. The Sequence of Columns is Insignificant The Sequence of Rows is Insignificant Each Column Has a Unique Name Certain fields may be designated as keys, which means that searches for specific values of that field will use indexing to speed them up. Where fields in two different tables take values from the same set, a join operation can be performed to select related records in the two tables by matching values in those fields. Often, but not always, the fields will have the same name in both tables. For example, an orders table might contain (customer-id, product-code) pairs and a products table might contain (product-code, price) pairs so to calculate a given customer s bill you would sum the prices of all products ordered by that customer by joining on the product-code fields of the two tables. This can be extended to joining multiple tables on multiple fields. Because these relationships are only specified at retreival time, relational databases are classed as dynamic database management system. The RELATIONAL database model is based on the Relational Algebra. A basic understanding of the relational model is necessary to effectively use relational database software such as Oracle, Microsoft SQL Server, or even personal database systems such as Access or Fox, which are based on the relational model. Nevertheless, though it was a dramatic improvement, the network model was far from perfect. Most profoundly, the model was difficult to implement and maintain. Most implementations of the network model were used by computer programmers rather than real users. What was needed was a simple model which could be used by real end users to solve real problems. Relational Model The relational model was formally introduced by Dr. E. F. Codd in 1970 and has evolved since then, through a series of writings. The model provides a simple, yet rigorously defined, concept of how users perceive data. Network model solves the problem of data redundancy by representing relationships in terms of sets. A relational database is a collection of twodimensional tables. The organization of data into relational tables is known as the logical view of the database. That is, the form in which a relational database presents data to the user and the programmer. The way the database software physically stores the data on a computer disk system is called the internal view. The internal view differs from product to product and does not concern us here. A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. In such a database the data and relations between them are organised in tables. A table is a collection of records and each record in a table contains the same fields. Properties of Relational Tables Values Are Atomic Each Row is Unique Column Values Are of the Same Kind Points to Ponder Data models are a collection of conceptual tools for describing data, data relationships, data semantics and data constraints. Types of data models are:- 1. Hierarchial data model 2. Network data model 3. Relational Model 4. E-R-Model The Hierarchical Database Model defines hierarchicallyarranged data. Network model solves the problem of data redundancy by representing relationships in terms of sets. Network model solves the problem of data redundancy by representing relationships in terms of sets. Review Terms Data models Hierchical data model Network data model Relational data model 18

24 Students Activity 1. Define data models? DATABASE MANAGEMENT 2. Define hierarchichal data model? 3. Define relational data model? 4. Define relational data model? 19

25 DATABASE MANAGEMENT Student Notes 20

26 LESSON 7: RELATIONAL DATABASE MANAGEMENT SYSTEM I Lesson Objective Understanding RDBMS Understanding data structures Understanding data manipulation Understanding various relational algebra operation Understanding data integrity The relational model was proposed by E. F. Codd in It deals with database management from an abstract point of view. The model provides specifications of an abstract database management system.to use the database management systems based on the relational model however, users do not need to master the theoretical foundations. Codd defined the model as consisting of the following three components: 1. Data Structure - a collection of data structure types for building the database. 2. Data Manipulation - a collection of operators that may be used to retrieve, derive or modify data stored in the data structures. 3. Data Integrity - a collection of rules that implicitly or explicitly define a consistent database state or changes of states Data Structure Often the information that an organisation wishes to store in a computer and process is complex and unstructured. For example, we may know that a department in a university has 200 students, most are full-time with an average age of 22 years, and most are females. Since natural language is not a good language for machine processing, the information must be structured for efficient processing. In the relational model the information is structures in a very simple way We consider the following database to illustrate the basic concepts of the relational data model. The above database could be mapped into the following relational schema which consists of three relation schemes. Each relation scheme presents the structure of a relation by specifying its name and the names of its attributes enclosed in parenthesis. Often the primary key of a relation is marked by underlining. student(student_id, student_name, address) enrolment(student_id, subject_id) subject(subject_id, subject_name, department) An example of a database based on the above relational model is: student_id student_name address The relation student student_id Peta Williams John Smith Arun Kumar Peter Chew Reena Rani Kathy Garcia Chris Watanabe subject_id CP302 CP302 CP304 MA111 CP302 CH001 9, Davis Hall 9, Davis Hall 90, Second Hall 88, Long Hall 88, Long Hall 88, Long Hall 11, Main Street The relation enrolment subject_id subject_name department CP302 Database Management Comp. Science CP304 Software Engineering Comp. Science CH001 Introduction to Chemistry Chemistry PH101 Physics Physics MA111 Pure Mathematics Mathematics We list a number of properties of relations: 1. Each relation contains only one record type. 2. Each relation has a fixed numer of columns that are explicitly named. Each attribute name within a relation is unique. 3. No two rows in a relation are the same. 4. Each item or element in the relation is atomic, that is, in each row, every attribute has only one value that cannot be decomposed and therefore no repeating groups are allowed. 5. Rows have no ordering associated with them. 6. Columns have no ordering associated with them (although most commercially available systems do). The above properties are simple and based on practical considerations. The first property ensures that only one type of information is stored in each relation. The second property involves naming each column uniquely. This has several benefits. The names can be chosen to convey what each column is and the names enable one to distinguish between the column and its domain. Furthermore, the names are much easier to remember than the position of the position of each column if the number of columns is large. The third property of not having duplicate rows appears obvious but is not always accepted by all users and designers of DBMS. The property is essential since no sensible context free DATABASE MANAGEMENT 21

27 DATABASE MANAGEMENT meaning can be assigned to a number of rows that are exactly the same. The next property requires that each element in each relation be atomic that cannot be decomposed into smaller pieces. In the relation model, the only composite or compound type (data that can be decomposed into smaller pieces) is a relation. This simplicity of structure leads to relatively simple query and manipulative languages. The relation is a set of tuples and is closely related to the concept of relation in mathematics. Each row in a relation may be viewed as an assertion. For exaple, the relation student asserts that a student by the name of Reena Rani has student_id and lives at 88, Long Hall. Similarly the relation subject asserts that one of the subjects offered by the Department of Computer Science is CP302 Database Management. In the relational model, a relation is the only compound data structure since relation do not allow repeating groups or pointers. We now define the relational terminology: Relation - essentially a table Tuple - a row in the relation Attribute - a column in the relation Degree of a relation - number of attributes in the relation Cardinality of a relation - number of tuples in the relation Domain - a set of values that an attribute is permitted to take. Same domain may be used by a number of different attributes. Primary key - as discussed in the last chapter, each relation must have an attribute (or a set of attributes) that uniquely identifies each tuple. Each such attribute (or a set of attributes) is called a candidate key of the relation if it satisfies the following properties: (a) the attribute or the set of attributes uniquely identifies each tuple in the relation (called uniqueness), and (b) if the key is a set of attributes then no subset of these attributes has property (a) (called minimality). There may be several distinct set of attributes that may serve as candidate keys. One of the candidate keys is arbitrarily chosen as the primary key of the relation. The three relations above student, enrolment and subject have degree 3, 2 and 3 respectively and cardinality 4, 6 and 5 respectively. The primary key of the the relation student is student_id, of relation enrolment is (student_id, subject_id), and finally the primary key of relation subject is subject_id. The relation student probably has another candidate key. If we can assume the names to be unique than the student_name is a candidate key. If the names are not unique but the names and address together are unique, then the two attributes (student_id, address) is a candidate key. Note that both student_id and (student_id, address) cannot be candidate keys, only one can. Similarly, for the relation subject, subject_name would be a candidate key if the subject names are unique. The relational model is the most popular data model for commercial data processing applications.it is very much simple due to which the programmer s work is reduced. Data Manipulation The manipulative part of relational model makes set processing (or relational processing) facilities available to the user. Since relational operators are able to manipulate relations, the user does not need to use loops in the application programs. Avoiding loops can result in significant increase in the productivity of application programmers. The primary purpose of a database in an enterprise is to be able to provide information to the various users in the enterprise. The process of querying a relational database is in essence a way of manipulating the relations that are the database. For example, one may wish to know 1. names of all students enrolled in CP302, or 2. names of all subjects taken by John Smith. The Relational Algebra 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 operationsnamely, set intersection, natural join, division, and assignment. We will define these operations in terms of the fundamental operations. Fundamental Operations The select, project, and rename operations are called unary operations, because they operate on one relation. The other three operations operate on pairs of relations and are, therefore, called binary operations. Various operations are shown as follows: Operation Projection Selection Renaming Union Intersection Assignment Symbol The Select Operation Operation Cartesian product Symbol The select operation selects tuples that satisfy a given condition.. The argument relation is in parentheses after the σ. Thus, to select those tuples of the loan relation where the branch is Perryridge, we write σ branch-name = Perryridge (loan) If the loan relation is as shown, then the relation that results from the preceding query will be a different relation. We can find all tuples in which the amount lent is more than $1200 writing σ amount>1200 (loan) Join Left outer join Right outer join Full outer join Semijoin 22

28 In general, we allow comparisons using =,, <,, >, in the selection predicate. Furthermore, we can combine several predicates into a larger predicate by using the connectives and (Λ), or (V), and not ( ). Thus, to find those tuples pertaining to loans of more than $1200 made by the Perryridge branch, we write σ branch-name = Perryridge L amount>1200 (loan) Example: The table E (for Employee) enr ename dept 1 Bill A 2 Sarah C 3 John A Example: The table D (for Department) dnr dname A Marketing B Sales C Legal DATABASE MANAGEMENT The selection predicate may include comparisons between two attributes. To Illustrate, consider the relation loan-officer that consists of three attributes: customer-name, banker-name, and loan-number, which specifies that a particular banker is the loan officer for a loan that belongs to some customer. To find all customers who have the same name as their loan officer, we can write σ customer-name = banker-name (loan-officer) Projection Projection is the operation of selecting certain attributes from a relation R to form a new relation S. For example, one may only be interested in the list of names from a relation that has a number of other attributes. Projection operator may then be used. Like selection, projection is an unary operator. II loan-number, amount (loan) Composition of Relational Operations The fact that the result of a relational operation is itself a relation is important. Consider the more complicated query Find those Perryridge customers who live 1500 in Harrison. We write: II customer-name (σ customer-city = Harrison (customer)) Notice that, instead of giving the name of a relation as the argument of the projection operation, we give an expression that evaluates to a relation. In general, since the result of a relational-algebra operation is of the same type (relation) as its inputs, relational-algebra operations can be composed together into a loan-number L-11 L-14 L-15 L-16 L-17 L-23 L-93 amount Loan number and the amount of the loan. Relational-algebra expression. Composing relational-algebra operations into relational-algebra expressions in just like composing arithmetic operations (such as +, -, *, and %) into arithmetic expressions. Cartesian Product The cartesian product of two tables combines each row in one table with each row in the other table. Result Relational algebra enr ename dept dnr dname E X D 1 Bill A A Marketing 1 Bill A B Sales 1 Bill A C Legal 2 Sarah C A Marketing 2 Sarah C B Sales 2 Sarah C C Legal 3 John A A Marketing 3 John A B Sales 3 John A C Legal Seldom useful in practice. Can give a huge result. The Union Operation Consider a query to find the names of all bank customers who have either an account or a loan or both. Note that the customer relation does not contain the information, since a customer does not need to have either an account or a loan at the bank. To answer this query, we need the information in the depositor relation and in the borrower relation. We know how to find the names of all customers with a loan in the bank: II customer-name (borrower) We also know how to find the names of all customers with an account in the bank: II customer-name (depositor) To answer the query, we need the union of these two sets; that is, we need all customer names that appear in either or both of the two relations. We find these data by the binary operation union, denoted, as in set theory, by U. So the expression needed is II customer-name (borrower) U II customer-name (depositor) There are 10 tuples in the result, even though there are seven distinct borrowers and six depositors. This apparent discrepancy occurs because Smith, Jones, and Hayes are borrowers as well as depositors. Since relations are sets, duplicate values are eliminated. customer-name Adams Curry Hayes Jackson Jones Smith Williams Lindsay Johnson Turner 23

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè. CMPT-354-Han-95.3 Lecture Notes September 10, 1995 Chapter 1 Introduction 1.0 Database Management Systems 1. A database management system èdbmsè, or simply a database system èdbsè, consists of æ A collection

More information

1 File Processing Systems

1 File Processing Systems COMP 378 Database Systems Notes for Chapter 1 of Database System Concepts Introduction A database management system (DBMS) is a collection of data and an integrated set of programs that access that data.

More information

Chapter 1: Introduction

Chapter 1: Introduction Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction Management Storage Management Database Administrator Database

More information

Introduction to database management systems

Introduction to database management systems Introduction to database management systems Database management systems module Myself: researcher in INRIA Futurs, Ioana.Manolescu@inria.fr The course: follows (part of) the book "", Fourth Edition Abraham

More information

Lesson 8: Introduction to Databases E-R Data Modeling

Lesson 8: Introduction to Databases E-R Data Modeling Lesson 8: Introduction to Databases E-R Data Modeling Contents Introduction to Databases Abstraction, Schemas, and Views Data Models Database Management System (DBMS) Components Entity Relationship Data

More information

Chapter 1: Introduction. Database Management System (DBMS)

Chapter 1: Introduction. Database Management System (DBMS) Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction Management Storage Management Database Administrator Database

More information

Chapter 1: Introduction

Chapter 1: Introduction Chapter 1: Introduction Database System Concepts, 5th Ed. See www.db book.com for conditions on re use Chapter 1: Introduction Purpose of Database Systems View of Data Database Languages Relational Databases

More information

www.gr8ambitionz.com

www.gr8ambitionz.com Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

More information

DATABASE MANAGEMENT SYSTEM

DATABASE MANAGEMENT SYSTEM REVIEW ARTICLE DATABASE MANAGEMENT SYSTEM Sweta Singh Assistant Professor, Faculty of Management Studies, BHU, Varanasi, India E-mail: sweta.v.singh27@gmail.com ABSTRACT Today, more than at any previous

More information

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati ISM 318: Database Systems Dr. Hamid R. Nemati Department of Information Systems Operations Management Bryan School of Business Economics Objectives Underst the basics of data databases Underst characteristics

More information

BCA. Database Management System

BCA. Database Management System BCA IV Sem Database Management System Multiple choice questions 1. A Database Management System (DBMS) is A. Collection of interrelated data B. Collection of programs to access data C. Collection of data

More information

Database System Concepts

Database System Concepts s Design Chapter 1: Introduction Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2008/2009 Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL Oracle University Contact Us: 1.800.529.0165 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database technology.

More information

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

Chapter 1: Introduction. Database Management System (DBMS) University Database Example This image cannot currently be displayed. Chapter 1: Introduction Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS contains information

More information

IT2305 Database Systems I (Compulsory)

IT2305 Database Systems I (Compulsory) Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

More information

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file? Files What s it all about? Information being stored about anything important to the business/individual keeping the files. The simple concepts used in the operation of manual files are often a good guide

More information

B.Com(Computers) II Year RELATIONAL DATABASE MANAGEMENT SYSTEM Unit- I

B.Com(Computers) II Year RELATIONAL DATABASE MANAGEMENT SYSTEM Unit- I B.Com(Computers) II Year RELATIONAL DATABASE MANAGEMENT SYSTEM Unit- I 1 1. What is Data? A. Data is a collection of raw information. 2. What is Information? A. Information is a collection of processed

More information

ECS 165A: Introduction to Database Systems

ECS 165A: Introduction to Database Systems ECS 165A: Introduction to Database Systems Todd J. Green based on material and slides by Michael Gertz and Bertram Ludäscher Winter 2011 Dept. of Computer Science UC Davis ECS-165A WQ 11 1 1. Introduction

More information

Foundations of Information Management

Foundations of Information Management Foundations of Information Management - WS 2012/13 - Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Data & Databases Data: Simple information Database:

More information

1. INTRODUCTION TO RDBMS

1. INTRODUCTION TO RDBMS Oracle For Beginners Page: 1 1. INTRODUCTION TO RDBMS What is DBMS? Data Models Relational database management system (RDBMS) Relational Algebra Structured query language (SQL) What Is DBMS? Data is one

More information

IT2304: Database Systems 1 (DBS 1)

IT2304: Database Systems 1 (DBS 1) : Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

More information

Introdução às Bases de Dados

Introdução às Bases de Dados Introdução às Bases de Dados 2011/12 http://ssdi.di.fct.unl.pt/ibd1112 Joaquim Silva (jfs@di.fct.unl.pt) The Bases de Dados subject Objective: To provide the basis for the modeling, implementation, analysis

More information

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations 1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/

More information

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to: 14 Databases 14.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define a database and a database management system (DBMS)

More information

CHAPTER 6 DATABASE MANAGEMENT SYSTEMS. Learning Objectives

CHAPTER 6 DATABASE MANAGEMENT SYSTEMS. Learning Objectives CHAPTER 6 DATABASE MANAGEMENT SYSTEMS Management Information Systems, 10 th edition, By Raymond McLeod, Jr. and George P. Schell 2007, Prentice Hall, Inc. 1 Learning Objectives Understand the hierarchy

More information

DATABASE MANAGEMENT SYSTEMS. Question Bank:

DATABASE MANAGEMENT SYSTEMS. Question Bank: DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?

More information

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added? DBMS Questions 1.) Which type of file is part of the Oracle database? A.) B.) C.) D.) Control file Password file Parameter files Archived log files 2.) Which statements are use to UNLOCK the user? A.)

More information

Author: Abhishek Taneja

Author: Abhishek Taneja MCA 202/MS 11 Author: Abhishek Taneja Vetter: Sh. Dharminder Kumar Lesson: Introduction Lesson No. : 01 Structure 1.0 Objectives 1.1 Introduction 1.2 Data Processing Vs. Data Management Systems 1.3 File

More information

Chapter 2. Data Model. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

Chapter 2. Data Model. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel 1 In this chapter, you will learn: Why data models are important About the basic data-modeling

More information

CSE 132A. Database Systems Principles

CSE 132A. Database Systems Principles CSE 132A Database Systems Principles Prof. Victor Vianu 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric:

More information

3. Relational Model and Relational Algebra

3. Relational Model and Relational Algebra ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra

More information

Core Syllabus. Version 2.6 B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS. June 2006

Core Syllabus. Version 2.6 B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS. June 2006 Core Syllabus B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS Version 2.6 June 2006 EUCIP CORE Version 2.6 Syllabus. The following is the Syllabus for EUCIP CORE Version 2.6,

More information

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap. Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap. 1 Oracle9i Documentation First-Semester 1427-1428 Definitions

More information

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation

More information

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation

More information

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

More information

Chapter 1 File Organization 1.0 OBJECTIVES 1.1 INTRODUCTION 1.2 STORAGE DEVICES CHARACTERISTICS

Chapter 1 File Organization 1.0 OBJECTIVES 1.1 INTRODUCTION 1.2 STORAGE DEVICES CHARACTERISTICS Chapter 1 File Organization 1.0 Objectives 1.1 Introduction 1.2 Storage Devices Characteristics 1.3 File Organization 1.3.1 Sequential Files 1.3.2 Indexing and Methods of Indexing 1.3.3 Hash Files 1.4

More information

Overview of Database Management

Overview of Database Management Overview of Database Management M. Tamer Özsu David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Fall 2012 CS 348 Overview of Database Management

More information

Chapter 2 Database System Concepts and Architecture

Chapter 2 Database System Concepts and Architecture Chapter 2 Database System Concepts and Architecture Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Outline Data Models, Schemas, and Instances Three-Schema Architecture

More information

Foundations of Business Intelligence: Databases and Information Management

Foundations of Business Intelligence: Databases and Information Management Foundations of Business Intelligence: Databases and Information Management Content Problems of managing data resources in a traditional file environment Capabilities and value of a database management

More information

Data Hierarchy. Traditional File based Approach. Hierarchy of Data for a Computer-Based File

Data Hierarchy. Traditional File based Approach. Hierarchy of Data for a Computer-Based File Management Information Systems Data and Knowledge Management Dr. Shankar Sundaresan (Adapted from Introduction to IS, Rainer and Turban) LEARNING OBJECTIVES Recognize the importance of data, issues involved

More information

Oracle SQL. Course Summary. Duration. Objectives

Oracle SQL. Course Summary. Duration. Objectives Oracle SQL Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row and column data

More information

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML? CS2Bh: Current Technologies Introduction to XML and Relational Databases Spring 2005 Introduction to Databases CS2 Spring 2005 (LN5) 1 Why databases? Why not use XML? What is missing from XML: Consistency

More information

2. Basic Relational Data Model

2. Basic Relational Data Model 2. Basic Relational Data Model 2.1 Introduction Basic concepts of information models, their realisation in databases comprising data objects and object relationships, and their management by DBMS s that

More information

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001 ICOM 6005 Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001 Readings Read Chapter 1 of text book ICOM 6005 Dr. Manuel

More information

Foundations of Business Intelligence: Databases and Information Management

Foundations of Business Intelligence: Databases and Information Management Chapter 5 Foundations of Business Intelligence: Databases and Information Management 5.1 Copyright 2011 Pearson Education, Inc. Student Learning Objectives How does a relational database organize data,

More information

Foundations of Information Management

Foundations of Information Management Foundations of Information Management - WS 2009/10 Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Alexander Markowetz Born 1976 in Brussels, Belgium

More information

Introduction to Database Systems

Introduction to Database Systems Introduction to Database Systems A database is a collection of related data. It is a collection of information that exists over a long period of time, often many years. The common use of the term database

More information

Chapter 6 FOUNDATIONS OF BUSINESS INTELLIGENCE: DATABASES AND INFORMATION MANAGEMENT Learning Objectives

Chapter 6 FOUNDATIONS OF BUSINESS INTELLIGENCE: DATABASES AND INFORMATION MANAGEMENT Learning Objectives Chapter 6 FOUNDATIONS OF BUSINESS INTELLIGENCE: DATABASES AND INFORMATION MANAGEMENT Learning Objectives Describe how the problems of managing data resources in a traditional file environment are solved

More information

Network Model APPENDIXD. D.1 Basic Concepts

Network Model APPENDIXD. D.1 Basic Concepts APPENDIXD Network Model In the relational model, the data and the relationships among data are represented by a collection of tables. The network model differs from the relational model in that data are

More information

SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6

SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 SUBQUERIES AND VIEWS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 String Comparisons and GROUP BY 2! Last time, introduced many advanced features of SQL, including GROUP BY! Recall:

More information

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY 2.1 Introduction In this chapter, I am going to introduce Database Management Systems (DBMS) and the Structured Query Language (SQL), its syntax and usage.

More information

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2 1 DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2 2 LECTURE OUTLINE Data Models Three-Schema Architecture and Data Independence Database Languages and Interfaces The Database System Environment DBMS

More information

Relational Database Basics Review

Relational Database Basics Review Relational Database Basics Review IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview Database approach Database system Relational model Database development 2 File Processing Approaches Based on

More information

- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically

- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically Normalization of databases Database normalization is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable

More information

Database Systems Introduction Dr P Sreenivasa Kumar

Database Systems Introduction Dr P Sreenivasa Kumar Database Systems Introduction Dr P Sreenivasa Kumar Professor CS&E Department I I T Madras 1 Introduction What is a Database? A collection of related pieces of data: Representing/capturing the information

More information

Overview of Data Management

Overview of Data Management Overview of Data Management Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Winter 2015 CS 348 (Intro to DB Mgmt) Overview of Data Management

More information

5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2

5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2 Class Announcements TIM 50 - Business Information Systems Lecture 15 Database Assignment 2 posted Due Tuesday 5/26 UC Santa Cruz May 19, 2015 Database: Collection of related files containing records on

More information

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World COSC 304 Introduction to Systems Introduction Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca What is a database? A database is a collection of logically related data for

More information

CSE 233. Database System Overview

CSE 233. Database System Overview CSE 233 Database System Overview 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric: web knowledge harvesting,

More information

Introduction to Databases

Introduction to Databases Page 1 of 5 Introduction to Databases An introductory example What is a database? Why do we need Database Management Systems? The three levels of data abstraction What is a Database Management System?

More information

B2.2-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

B2.2-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS B2.2-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 information

Course 103402 MIS. Foundations of Business Intelligence

Course 103402 MIS. Foundations of Business Intelligence Oman College of Management and Technology Course 103402 MIS Topic 5 Foundations of Business Intelligence CS/MIS Department Organizing Data in a Traditional File Environment File organization concepts Database:

More information

Introduction to Computing. Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn

Introduction to Computing. Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn Introduction to Computing Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn Databases The Hierarchy of Data Keys and Attributes The Traditional Approach To Data Management Database A collection of

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle University Contact Us: + 38516306373 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

More information

Foundations of Business Intelligence: Databases and Information Management

Foundations of Business Intelligence: Databases and Information Management Foundations of Business Intelligence: Databases and Information Management Problem: HP s numerous systems unable to deliver the information needed for a complete picture of business operations, lack of

More information

SQL Server. 1. What is RDBMS?

SQL Server. 1. What is RDBMS? SQL Server 1. What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained

More information

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203.

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : II / III Section : CSE - 1 & 2 Subject Code : CS 6302 Subject Name : Database

More information

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction Introduction to Database Systems Winter term 2013/2014 Melanie Herschel melanie.herschel@lri.fr Université Paris Sud, LRI 1 Chapter 1 Introduction After completing this chapter, you should be able to:

More information

Foundations of Business Intelligence: Databases and Information Management

Foundations of Business Intelligence: Databases and Information Management Chapter 6 Foundations of Business Intelligence: Databases and Information Management 6.1 2010 by Prentice Hall LEARNING OBJECTIVES Describe how the problems of managing data resources in a traditional

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along

More information

Oracle 10g PL/SQL Training

Oracle 10g PL/SQL Training Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural

More information

Comp 5311 Database Management Systems. 3. Structured Query Language 1

Comp 5311 Database Management Systems. 3. Structured Query Language 1 Comp 5311 Database Management Systems 3. Structured Query Language 1 1 Aspects of SQL Most common Query Language used in all commercial systems Discussion is based on the SQL92 Standard. Commercial products

More information

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries COMP 5138 Relational Database Management Systems Week 5 : Basic COMP5138 "Relational Database Managment Systems" J. Davis 2006 5-1 Today s Agenda Overview Basic Queries Joins Queries Aggregate Functions

More information

Database Concepts. Database & Database Management System. Application examples. Application examples

Database Concepts. Database & Database Management System. Application examples. Application examples Database & Database Management System Database Concepts Database = A shared collection of logically related (and a description of this data), designed to meet the information needs of an organization.

More information

B.Sc (Computer Science) Database Management Systems UNIT-V

B.Sc (Computer Science) Database Management Systems UNIT-V 1 B.Sc (Computer Science) Database Management Systems UNIT-V Business Intelligence? Business intelligence is a term used to describe a comprehensive cohesive and integrated set of tools and process used

More information

www.dotnetsparkles.wordpress.com

www.dotnetsparkles.wordpress.com Database Design Considerations Designing a database requires an understanding of both the business functions you want to model and the database concepts and features used to represent those business functions.

More information

COMP5138 Relational Database Management Systems. Databases are Everywhere!

COMP5138 Relational Database Management Systems. Databases are Everywhere! COMP5138 Relational Database Management Systems Week 1: COMP 5138 Intro to Database Systems Professor Joseph Davis and Boon Ooi Databases are Everywhere! Database Application Examples: Banking: all transactions

More information

Study Notes for DB Design and Management Exam 1 (Chapters 1-2-3) record A collection of related (logically connected) fields.

Study Notes for DB Design and Management Exam 1 (Chapters 1-2-3) record A collection of related (logically connected) fields. Study Notes for DB Design and Management Exam 1 (Chapters 1-2-3) Chapter 1 Glossary Table data Raw facts; that is, facts that have not yet been processed to reveal their meaning to the end user. field

More information

Instant SQL Programming

Instant SQL Programming Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions

More information

Database Management System

Database Management System ISSN: 2349-7637 (Online) RESEARCH HUB International Multidisciplinary Research Journal Research Paper Available online at: www.rhimrj.com Database Management System Viral R. Dagli Lecturer, Computer Science

More information

Course: CSC 222 Database Design and Management I (3 credits Compulsory)

Course: CSC 222 Database Design and Management I (3 credits Compulsory) Course: CSC 222 Database Design and Management I (3 credits Compulsory) Course Duration: Three hours per week for 15weeks with practical class (45 hours) As taught in 2010/2011 session Lecturer: Oladele,

More information

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design Chapter 6: Physical Database Design and Performance Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS 464 Spring 2003 Topic 23 Database

More information

2) What is the structure of an organization? Explain how IT support at different organizational levels.

2) What is the structure of an organization? Explain how IT support at different organizational levels. (PGDIT 01) Paper - I : BASICS OF INFORMATION TECHNOLOGY 1) What is an information technology? Why you need to know about IT. 2) What is the structure of an organization? Explain how IT support at different

More information

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led Course Description This four-day instructor-led course provides students with the knowledge and skills to capitalize on their skills

More information

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: 3341605 ) Information Technology

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: 3341605 ) Information Technology GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: 3341605 ) Diploma Programme in which this course is offered Information Technology Semester

More information

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 Outline More Complex SQL Retrieval Queries

More information

Database Programming with PL/SQL: Learning Objectives

Database Programming with PL/SQL: Learning Objectives Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs

More information

Database Management. Chapter Objectives

Database Management. Chapter Objectives 3 Database Management Chapter Objectives When actually using a database, administrative processes maintaining data integrity and security, recovery from failures, etc. are required. A database management

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to

More information

Basic Concepts of Database Systems

Basic Concepts of Database Systems CS2501 Topic 1: Basic Concepts 1.1 Basic Concepts of Database Systems Example Uses of Database Systems - account maintenance & access in banking - lending library systems - airline reservation systems

More information

Chapter 1. Database Systems. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

Chapter 1. Database Systems. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel Chapter 1 Database Systems Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel 1 In this chapter, you will learn: The difference between data and information What a

More information

Chapter 14: Databases and Database Management Systems

Chapter 14: Databases and Database Management Systems 15 th Edition Understanding Computers Today and Tomorrow Comprehensive Chapter 14: Databases and Database Management Systems Deborah Morley Charles S. Parker Copyright 2015 Cengage Learning Learning Objectives

More information

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to: D61830GC30 for Developers Summary Duration Vendor Audience 5 Days Oracle Database Administrators, Developers, Web Administrators Level Technology Professional Oracle 5.6 Delivery Method Instructor-led

More information

Chapter 1 Databases and Database Users

Chapter 1 Databases and Database Users Chapter 1 Databases and Database Users Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Outline Introduction An Example Characteristics of the Database Approach Actors

More information

Oracle Database 12c: Introduction to SQL Ed 1.1

Oracle Database 12c: Introduction to SQL Ed 1.1 Oracle University Contact Us: 1.800.529.0165 Oracle Database 12c: Introduction to SQL Ed 1.1 Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,

More information

AS LEVEL Computer Application Databases

AS LEVEL Computer Application Databases AS LEVEL Computer Application Databases YLLSS In the syllabus, we have Applications of databases in society Students should be aware of the uses and applications of databases in everyday life (e.g. the

More information

Fundamentals of Database Design

Fundamentals of Database Design Fundamentals of Database Design Zornitsa Zaharieva CERN Data Management Section - Controls Group Accelerators and Beams Department /AB-CO-DM/ 23-FEB-2005 Contents : Introduction to Databases : Main Database

More information

Database Fundamentals: 1

Database Fundamentals: 1 Database Fundamentals Robert J. Robbins Johns Hopkins University rrobbins@gdb.org Database Fundamentals: 1 What is a Database? General: A database is any collection of related data. Restrictive: A database

More information