Docsity

INTRODUCTION TO DBMS, Study notes of Database Management Systems (DBMS)

Toggle sidebar
bg1
INTRODUCTION TO DBMS
Introduction to Database Systems
oDifference between a file system and a database system
oGoals of DBMS
oDBMS architecture and components
oDBMS languages and interfaces
oFunctions of a DBMS
Database Models
oHierarchical model
oNetwork model
oRelational model
oObject-oriented model
The Relational Model
oLogical view of data
oIntegrity rules
oRelational database operators
oRelational database software classification
oDB keys (primary key, foreign key, super key, candidate key)
oData redundancy
oRelevant examples
Normalization of Database Tables
oNormalization concepts
oFirst normal form (1NF)
oSecond normal form (2NF)
oThird normal form (3NF)
Database Development Life Cycle
oInitial study
oDatabase design (conceptual, logical, physical)
oImplementation (creating database definitions, developing applications,
testing)
oLoading
oTesting
oEvaluation
oOperation & maintenance
Data Modelling: Entity-Relationship Diagrams (ERD)
oReal-world entities and relationships
oEntity sets
oRelationship sets
oAttributes (including multi-value attributes)
oConstraints
oKeys (primary, foreign, super, candidate)
oDegree of relationship
oGeneralization and Specialization (including inheritance)
Physical Database Design
oConversion of logical design to physical design
oForward Engineering to a Live Server in MySQL workbench
SQL - A Standard Navigation Language for Relational Databases
oIntroduction to SQL
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download INTRODUCTION TO DBMS and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

INTRODUCTION TO DBMS

Introduction to Database Systems o Difference between a file system and a database system o Goals of DBMS o DBMS architecture and components o DBMS languages and interfaces o Functions of a DBMS  Database Models o Hierarchical model o Network model o Relational model o Object-oriented model  The Relational Model o Logical view of data o Integrity rules o Relational database operators o Relational database software classification o DB keys (primary key, foreign key, super key, candidate key) o Data redundancy o Relevant examples  Normalization of Database Tables o Normalization concepts o First normal form (1NF) o Second normal form (2NF) o Third normal form (3NF)  Database Development Life Cycle o Initial study o Database design (conceptual, logical, physical) o Implementation (creating database definitions, developing applications, testing) o Loading o Testing o Evaluation o Operation & maintenance  Data Modelling: Entity-Relationship Diagrams (ERD) o Real-world entities and relationships o Entity sets o Relationship sets o Attributes (including multi-value attributes) o Constraints o Keys (primary, foreign, super, candidate) o Degree of relationship o Generalization and Specialization (including inheritance)  Physical Database Design o Conversion of logical design to physical design o Forward Engineering to a Live Server in MySQL workbench  SQL - A Standard Navigation Language for Relational Databases o Introduction to SQL

o Tasks performed by SQL (create, add data, drop, modify tables, set permissions) o Types of SQL CommandsData Definition Language (DDL) (CREATE, DROP, ALTER)  Data Manipulation Language (DML) (INSERT, UPDATE, DELETE)  Data Control Language (DCL) (GRANT, REVOKE)  Data Query Language (DQL) (SELECT) o SELECT statement with examples o WHERE clause o Operators (IN, BETWEEN, LIKE) o LIMIT clause o ORDER BY command o GROUP BY command o Scalar Functions (NOW, ROUND) o SQL JOINS (INNER, RIGHT, LEFT, FULL OUTER) with examples o Subqueries o Views (creation and purpose) o ANY and ALL operators o SHOW Statement (SHOW DATABASES, SHOW TABLES, SHOW CREATE TABLE) o RENAME Table o DROP statement (DROP DATABASE, DROP TABLE) o ALTER statement (ADD column, DELETE column) o Data Types in MySQL o Constraints on database objectsIntroduction to Two-Tier and Three-Tier Architectures, and the Internet Database Environment o Database Architecture representation o Components of a database  Data Warehouse Features o Subject Oriented o Integrated o Time Variant o Non-volatile  Comparison of RDBMS and Object DatabasesDatabase ProgrammingDatabase administration tasksForward Engineering in MySQL workbench (detailed steps)  File Systems and Databases (as a general topic)  Implementation of DB systems on current hardware systems and case studiesAccessing the database using an event-driven programming language (e.g., Visual Basic)Benefits of DBMS (strategic use of data, reduced complexity, reduced redundancy and inconsistency, enhanced integrity, application-data independence, improved security, reduced development and maintenance costs, improved flexibility, increased access and availability)  Basic Concepts of ER Model (Entity, Relationship, Attribute, Entity set)  Records and Fields

Database Models  Database models: hierarchical model, network model, relational model and object- oriented model.  The specifics of the E-R, relational, and object-oriented models are covered in later chapters.  These models can be used in Chapter 1 to reinforce the concept of abstraction, with syntactic details deferred to later in the course.  Relational Model o Refers to a database's data and schema (the database's structure of how those data are arranged). o The term "relational database" was originally defined and coined by Edgar Codd at IBM Almaden Research Center in 1970. o A relational database is a collection of relations (frequently called tables). o Other items are frequently considered part of the database, as they help to organize and structure the data, in addition to forcing the database to conform to a set of requirements. o Table in relational Model o The main highlights of this model are:  Data is stored in tables called relations.  Relations can be normalized.  In normalized relations, values saved are atomic values.  Each row in relation contains unique value.  Each column in relation contains values from a same domain.  Object-Oriented Databases Exercises. The Relational Model  The Relational Model: Logical view of data, integrity rules, relational database operators, relational database software classification, DB keys, data redundancy, relevant examples.  In the relational data model, the data in a database is organized in relations.  A relation is synonymous with a ’table’.  A table consists of columns and rows, which are referred as field and records in DBMS terms, and attributes and tuples in Relational DBMS terms.  Every relation has a schema, which describes the columns, or fields.  Attributes o An attribute is a property or characteristics that hold some information about an entity. o A ‘Customer’ for example, has attributes such as a name, and an address.  Relations o Consider the relations student (student-id, name, program) course (courseno, title, syllabus, credits) course-offering (courseno, secno, year, semester, time, room) instructor (instructor-id, name, dept, title) enrols (student-id, courseno, secno, semester, year, grade) teaches (courseno, secno, semester, year, instructor-id) requires (maincourse, prerequisite).  Relation Schema vs. Relation o A relation schema is a type definition, and a relation is an instance of that schema. o For example, student (ss#, name) is a relation schema.

Relational-Database Design Exercises.  Functional Dependencies o Functional dependency is a constraint between two sets of attributes in a relation from a database. o Certain functional dependencies are called trivial functional dependencies because they are satisfied by all relations. o Compute the closure of the following set F of functional dependencies for relation schema R = (A, B, C, D, E). o List the candidate keys for R. o Using the functional dependencies of Exercise 7.11, compute the canonical cover Fc. Normalization of Database Tables  Normalization of Database Tables: Normalization, first normal form, second normal form, third normal form.  Normalization o Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies. o Normalization rules divide larger tables into smaller tables and links them using relationships. o The purpose of Normalization in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically.  Normalization History o The inventor of the relational model Edgar Codd proposed the theory of normalization of data with.  Consider table below. Before Normalization.  Consider table above. After Normalization.  Second Normal Form (1NF) o For a table to be in the Second Normal Form:  It should be in the First Normal form.  And, it should not have Partial Dependency.  Data dependency.  For a table to be in the Third Normal Form: o It should be in the Second Normal form. o And, it should not have Transitive Functional Dependency.  Third Normal Form (3NF).  Coverage of multivalued dependency theory and normal forms beyond 4NF (that is, PJNF and DKNF) has been moved into Appendix C.  The process of practical relational schema design has been described in significantly more detail, along with some design problems that are not caught by the usual normalization process.  Redesign the database of Exercise 9.1 into first normal form and fourth normal form.  To put the schema into first normal form, we flatten all the attributes into a single relation schema.  The FDs and multivalued dependencies we assume are:- o ename, cname → bday, bmonth, byear o ename →→ cname, bday, bmonth, byear o ename, stype →→ xyear, xcity

 We recommend covering specialization (Section 2.7.1) at least in some detail, since it is an important concept for object-oriented databases (Chapter 8).  The idea of abstraction in database systems deserves emphasis throughout.  The overview of the structure of databases, starting from Section 1.4 is, of necessity, rather brief, and is meant only to give the student a rough idea of some of the concepts.  The student may not initially be able to fully appreciate the concepts described here, but should be able to do so by the end of the course.  Data Modeling: o The Entity-Relationship Diagram.  Real-world entities and relationships o An entity in ER Model is real world unit/ person/ entity, which has some properties called attributes. o For example, in a school database, a student is considered as an entity. o student, teachers, class and course offered can be considered as entities. o An entity occurrence is an instance of an entity. Example a student record in the student entity. o The association among entities is called relationship. o For example, employee entity has relation “works_at” department. o student who “enrolls” for some programme. o Here,” Works_at” and “Enrolls” are called relationship.  Entity sets o An entity set is a collection of similar types of entities. o Entity set may contain entities with attribute sharing similar values. o For example, Students set may contain all the student of a school; likewise Teachers set may contain all the teachers of school from all faculties. o Entities sets need not to be disjoint.  Relationship sets o Relationship of similar type is called relationship set. o Like entities, a relationship too can have attributes. o These attributes are called descriptive attributes.  Attributes o Entities are represented by means of their properties, called attributes. o All attributes have values. o For example, a student entity may have name, class, age as attributes. o There exists a domain or range of values that can be assigned to attributes. o For example, a student's name cannot be a numeric value. It has to be alphabetic. o A student's age cannot be negative, etc. o Attributes are properties of entities. o Attributes are represented by means of eclipses. o Every eclipse represents one attribute and is directly connected to its entity (rectangle).  Types of attributes o Simple attribute: Simple attributes are atomic values, which cannot be divided further. For example, student's height is an atomic value 5 feet. o Composite attribute: Composite attributes are made of more than one simple attribute. For example, a student's complete name may have first_name and. If the attributes are composite, they are further divided in a tree like structure.

Every node is then connected to its attribute. That is composite attributes are represented by eclipses that are connected with an eclipse. o Multi-value attribute: Multi-value attribute may contain more than one values. For example, a person can have more than one phone numbers, email_addresses etc. Multi valued attributes are depicted by double eclipse.  Constraints o Mapping cardinalities define the number of association between two entities. o Cardinality defines the number of entities in one entity set which can be associated to the number of entities of other set via relationship set. o Cardinality is the number of instance of an entity from a relation that can be associated with the relation. o One-to-one: one entity from entity set A can be associated with at most one entity of entity set B and vice versa. When only one instance of entity is associated with the relationship, it is marked as '1'. This reflects that only 1 instance of each entity should be associated with the relationship. It depicts one-to-one relationship. o One-to-many: One entity from entity set A can be associated with more than one entities of entity set B but from entity set B one entity can be associated with at most one entity. When more than one instance of entity is associated with the relationship, it is marked as 'N'. This reflects that only 1 instance of entity on the left and more than one instance of entity on the right can be associated with the relationship. It depicts one-to-many relationship. o Many-to-one: When more than one instance of entity is associated with the relationship, it is marked as 'N'. o Many-to-many: One entity from A can be associated with more than one entity from B and vice versa.  Keys o Key is an attribute or collection of attributes that uniquely identifies an entity among entity set. o For example, reg_number of a student makes her/him identifiable among students. o Primary key. o Foreign key. o Super Key. o Candidate Key.  Degree of relationship o The number of participating entities in a relationship defines the degree of the relationship.  Binary = degree 2  Ternary = degree 3  n-ary = degree  Generalization and Specialization o Generalization In generalization, a number of entities are brought together into one generalized entity based on their similar characteristics. An example, pigeon, house sparrow, crow and dove all can be generalized as Birds. o Generalization illustration. o Specialization Specialization is a process, which is opposite to generalization. In specialization, a group of entities is divided into sub-groups based on their characteristics. Take a group People for example. A person has name, date of birth, gender etc. These properties are common in all persons, human beings.

o Figure 2.14 and Figure 2.15 show alternative E-R diagrams for a university registrar’s office. o Figure 2.16 illustrates the representation of a ternary relationship using binary relationships. o A weak entity set can always be made into a strong entity set by adding to its attributes the primary key attributes of its identifying entity set. o The primary key of a weak entity set can be inferred from its relationship with the strong entity set. If we add primary key attributes to the weak entity set, they will be present in both the entity set and the relationship set and they have to be the same. Hence there will be redundancy. o Figure 2.19 gives one possible generalization–specialization hierarchy for a motor-vehicle sales company, including motorcycles, passenger cars, vans, and buses. o In overlapping generalizations, the same entity may belong to more than one lower-level entity sets. o In a total design constraint, each higher-level entity must belong to a lower- level entity set. The same need not be true in a partial design constraint. o Figure 2.20 shows a lattice structure of generalization and specialization for entity sets A, B, C, X, and Y. A inherits all the attributes of X plus it may define its own attributes. Similarly C inherits all the attributes of Y plus its own attributes. B inherits the attributes of both X and Y. If there is some attribute name which belongs to both X and Y, it may be referred to in B by the qualified name X.name or Y.name. o Figure 2.21 shows a UML equivalent of an E-R diagram with customer and loan entities and a borrower relationship. o Consider the E-R diagram in Figure 2.10, which models an online bookstore.  List the entity sets and their primary keys.  Suppose the bookstore adds music cassettes and compact disks to its collection. The same music item may be present in cassette or compact disk format, with differing prices. Extend the E-R diagram to model this addition, ignoring the effect on shopping baskets.  Now extend the E-R diagram, using generalization, to model the case where a shopping basket may contain any combination of books, music cassettes, or compact disks. o Consider an E-R diagram in which the same entity set appears several times. Why is allowing this redundancy a bad practice that one should avoid whenever possible?. o Consider a university database for the scheduling of classrooms for final exams. This database could be modeled as the single entity set exam, with attributes course-name, section-number, room-number, and time. Alternatively, one or more additional entity sets could be defined, along with relationship sets to replace some of the attributes of the exam entity set. o When designing an E-R diagram for a particular enterprise, you have several alternatives from which to choose.  What criteria should you consider in making the appropriate choice?.  Design three alternative E-R diagrams to represent the university registrar’s office of Exercise 2.4. List the merits of each. Argue in favor of one of the alternatives. o An E-R diagram can be viewed as a graph. What do the following mean in terms of the structure of an enterprise schema?.

 The graph is disconnected.  The graph is acyclic. o Consider the representation of a ternary relationship using binary relationships as described in Section 2.4.3 (shown in Figure 2.16b).  Show a simple instance of E,A,B,C, RA, RB , and RC that cannot correspond to any instance of A,B,C, and R.  Modify the E-R diagram of Figure 2.16b to introduce constraints that will guarantee that any instance of E,A,B,C, RA, RB , and RC that satisfies the constraints will correspond to an instance of A,B,C, and R.  Modify the translation above to handle total participation constraints on the ternary relationship.  The above representation requires that we create a primary key attribute for E. Show how to treat E as a weak entity set so that a primary key attribute is not required. o Design a generalization–specialization hierarchy for a motor-vehicle sales company. Justify your placement of attributes at each level of the hierarchy. Explain why they should not be placed at a higher or lower level. o Figure 2.20 shows a lattice structure of generalization and specialization. For entity sets A, B, and C, explain how attributes are inherited from the higher- level entity sets X and Y. Discuss how to handle a case where an attribute of X has the same name as some attribute of Y. o ER Diagram Representation  Entities are represented by means of rectangles.  Rectangles are named with the entity set they represent.  Relationship is represented by means of diamond-shaped box.  Name of the relationship is written in the diamond-box.  All entities (rectangles), participating in relationship, are connected to it by a line.  Binary relationship and cardinality. Physical Database Design  Physical database design.  Physical Database Schema: o This schema pertains to the actual storage of data and its form of storage like files, indices/directory etc. o It defines the how data will be stored in secondary storage etc.  Conversion of Logical design to physical design.  Forward Engineering to a Live Server in MySQL workbench. o Select the model to forward engineer. o Then choose the Database, Forward Engineer menu item from the main menu. o Set Parameters to connect to DBMS and then click Next. o Set Options for the database to created. o Select objects to Forward Engineer. o Review SQL statements to be created in the process creating the schema. o And Finally click Next.  Database Administration – Physical Design. o Define required parameters for database definition. o Analyze data volume and space requirements. o Perform database tuning and parameter enhancements.

DELETE FROM/WHERE This command is used for removing one or more rows from table (relation). Syntax is DELETE FROM table_name [WHERE condition];.  Assignment: Discuss the types of Keys (Hand in Next week Tuesday).  create view no-debt as select * from customer where customer-name in (select customer-name from depositor) minus (select customer-name from borrower).  create view avg-bal as select customer-name, avg(balance) from depositor, account where depositor.account-number = account.account-number and branch-name = ’Rock Ridge’ group by customer-name.  To insert (account-number, name) into the view deer-park we insert the tuple (Deer Park, account-number, null) into the account relation and the tuple (name, account- number) into the depositor relation.  Updates to the views no-debt and avg-bal present serious problems.  The avg-bal view cannot be updated since the result of an aggregate operation depends on several tuples, not just one.  Consider the account relation shown in Figure 12.25. Construct a bitmap index on the attributes branch-name and balance, dividing balance values into 4 ranges: below 250, 250 to below 500, 500 to below 750, and 750 and above. Consider a query that requests all accounts in Downtown with a balance of 500 or more. Outline the steps in answering the query, and show the final and intermediate bitmaps constructed to answer the query.  select e.ename from emp as e, e.SkillSet as s, s.ExamSet as x where s.type = ’typing’ and x.city = ’Dayton’.  select distinct s.type from emp as e, e.SkillSet as s.  Extended SQL Features o select tile20, sum(d) from (select d, ntile(20) over (order by (a)) as tile20 from r) as s groupby tile20. o select t1.account-number, t1.date-time, sum(t2.value) from transaction as t1, transaction as t2 where t1.account-number = t2.account-number and t2.date- time < t1.date-time groupby t1.account-number, t1.date-time order by t1.account-number, t1.date-time. o (select 1, count() from account where 3 balance <= (select max(balance). o select color, sum(number) from sales groupby rollup (color, size). o select color, 'all', sum(number) from sales groupby color union (select 'all', size, sum(number) from sales groupby size union (select 'all', 'all', sum(number) from sales).  SQL Aggregate Functions o For each of the SQL aggregate functions sum, count, min and max, show how to compute the aggregate value on a multiset S1 ∪ S2, given the aggregate values on multisets S1 and S2. o Based on the above, give expressions to compute aggregate values with grouping on a subset S of the attributes of a relation r(A,B,C,D,E), given aggregate values for grouping on attributes T ⊇ S, for the following aggregate functions:  sum, count, min and max  avg  standard deviation  Window Functions o select s.student-name, s.dept-name, s.tot-cred, rank() over (partition by s.dept- name order by s.tot-cred desc) as dept_rank from student s.

o select s.student-name, s.dept-name, s.tot-cred, rank() over (order by s.tot-cred desc) as univ_rank, dense_rank() over (order by s.tot-cred desc) as univ_dense_rank, row_number() over (order by s.tot-cred desc) as univ_row_number from student s order by univ_rank. o select student, dept, total_credits, rank() over (partition by dept order by total_credits desc) as trank from student_credits. o select * from (select student, rank() over (order by total_credits desc) as trank from student_credits) as S where trank <= 5. o select dept, avg(total_credits) from (select student, dept, total_credits, rank() over (partition by dept order by total_credits desc) as trank from student_credits) as S where trank <= n group by dept. o select tile20, sum(d) from (select d, ntile(20) over (order by (a)) as tile20 from r) as s groupby tile20. o select t1.account-number, t1.date-time, sum(t2.value) from transaction as t1, transaction as t2 where t1.account-number = t2.account-number and t2.date- time < t1.date-time groupby t1.account-number, t1.date-time order by t1.account-number, t1.date-time. o (select 1, count() from account where 3 balance <= (select max(balance) from account) / 3) union (select 2, count() from account where 3(balance between (select max(balance) from account) / 3 + 1 and 2 * (select max(balance) from account) / 3)) union (select 3, count(*) from account where balance > 2 * (select max(balance) from account) / 3). o select color, sum(number) from sales groupby rollup (color, size). o select color, 'all', sum(number) from sales groupby color union (select 'all', size, sum(number) from sales groupby size union (select 'all', 'all', sum(number) from sales). Introduction to Two-Tier and Three-Tier Architectures, and the Internet Database Environment  Introduction to Two-Tier and Three-Tier Architectures, and the Internet Database Environment.  A Database Architecture is a representation of DBMS design.  It helps to design, develop, implement, and maintain the database management system.  A DBMS architecture allows dividing the database system into individual components that can be independently modified, changed, replaced, and altered.  It also helps to understand the components of a database.  Three-Tier Architectures Three-Tier database Architecture design is an extension of the 2-tier client-server architecture. A Three-tier architecture has the following layers:

  1. Presentation layer (your PC, Tablet, Mobile, etc.)
  2. Application layer (server)
  3. Database Server  The Application layer resides between the user and the.  In a three-tier architecture, the user interface is done independently as separate modules.  Three-Tier architecture contains a presentation layer, an application layer, and a database server. Data Warehouse Features

o Perform business requirements gathering and analysis. o Model business based on requirements (conceptual and logical). o Define and enforce standards and conventions (definition, naming, abbreviation). o Conduct data definition sessions with users. o Manage and administer meta data repository and Data Administration CASE (modeling) tools. o Assist Database Administration in creating physical tables from logical models.  Database Administration – Physical Design. o Define required parameters for database definition. o Analyze data volume and space requirements. o Perform database tuning and parameter enhancements. o Execute database backups and recoveries. o Monitor database space requirements. o Verify integrity of data in databases. o Coordinate the transformation of logical structures to properly.  Data administrator (DA).  Database administrator (DBA). Forward Engineering in MySQL workbenchForward Engineering to a Live Server in MySQL workbench. o Select the model to forward engineer. o Then choose the Database, Forward Engineer menu item from the main menu. o Set Parameters to connect to DBMS and then click Next. o Set Options for the database to created. o Select objects to Forward Engineer. o Review SQL statements to be created in the process creating the schema. o And Finally click Next. File Systems and Databases  File Systems and Databases: File systems, database systems, DBMS, DB architecture, components, languages and interfaces.  File-based Systems Collection of application programs that perform services for the end users (e.g. reports). Each program defines and manages its own data.  A file A file is an ordered arrangement of records in which each record is stored in a unique identifiable location. The sequence of the record is then the means by which the record will be located. In most computer systems, the sequence of records is either alphabetic or numeric based on field common to all records such as name or number.  Records A record or tuple is a complete set of related fields. In other words, if this were to be a part of a table then we would call it a row of data. Therefore, a row of data is also a record.  Field A field is a property or a characteristic that holds some piece of information about an entity. Also, it is a category of information within a set of records. Implementation of DB systems on current hardware systems and case studies

 Case study: Database system implementation (how to build the database application) using. Accessing the database using an event-driven programming language (e.g., Visual Basic)  (action, decision, etc.) expected or sensible under the circumstances.  Relationships are mapped with entities in various ways.  Mapping is an operation that associates each element of a given set (the domain) with one or more elements of a second set (the range). Benefits of DBMS  Another important aspect of the chapter is to provide motivation for the use of database systems as opposed to application programs built on top of file systems.  Thus, the chapter motivates what the student will be studying in the rest of the course. Basic Concepts of ER ModelEntity An entity in ER Model is real world unit/ person/ entity, which has some properties called attributes. Every attribute is defined by its set of values, called domain. For example, in a school database, a student is considered as an entity. Student has various attributes like name, age and class etc.  Relationship The logical association among entities is called relationship. Relationships are mapped with entities in various ways. Mapping cardinalities define the number of association between two entities.  Attribute An attribute is a property or a characteristic that holds some piece of information about an entity. Also, it is a category of information within a set of. Records and FieldsRecords A record or tuple is a complete set of related fields. In other words, if this were to be a part of a table then we would call it a row of data. Therefore, a row of data is also a record.  Field A field is a property or a characteristic that holds some piece of information about an entity. Also, it is a category of information within a set of. RelationshipsRelationship The association among entities is called relationship. For example, employee entity has relation “works_at” department. student who “enrolls” for some programme. Here,” Works_at” and “Enrolls” are called relationship.  Relationship Set: Relationship of similar type is called relationship set. Like entities, a relationship too can have attributes. These attributes are called descriptive attributes.  Degree of relationship The number of participating entities in an relationship defines the degree of the relationship. o Binary = degree 2 o Ternary = degree 3 o n-ary = degree

o Logical Database Schema: This defines all logical constraints that need to be applied on data stored. Levels of Data Abstraction  Abstraction: The process of removing attributes in the study of objects or systems to focus attention on details of greater importance.  Views describe how users see the data.  Conceptual schema defines logical structure.  Physical schema describes files and indexes used.  These levels of abstraction sometimes called the ANSI/SPARC architecture.  American National Standards Institute, Standards Planning And Requirements Committee.  The idea of abstraction in database systems deserves emphasis throughout, not just in discussion of Section 1.3.  Consider a two-dimensional integer array of size n × m that is to be used in your favorite programming language. Using the array as an example, illustrate the difference (a) between the three levels of data abstraction, and (b) between a schema and instances.  Then tgrid is a schema, whereas the value of variables vgrid1 and vgrid2 are instances.  To illustrate further, consider the schema array[1..2, 1..2] of integer. Two instances of this scheme are:. This organization should provide a comprehensive view of the lecture topics based on the provided source material.