Posts

DBM #03: Integrity Constraints in Relational Models

Image
Checklist: > Be able to identify what integrity constraints are violated when an operation is performed either in a referencing or a referenced relation. > Understand Armstrong's Axioms on Relational Databases > To check if two sets of FDs are equivalent. > To find the minimal cover of a set of FD. > To check if a relation is in a specified normalized form A database is only good as the information stored in it. Integrity constraints are conditions specified on a database schema that places restrictions on the data that can be stored within it. They are enforced when (a) the schema is defined, and (b) when relations are modified. The types of integrity constraints are: 1. Domain integrity constraints , which restricts the domain e.g., Student_ID must be integers. 2. Key integrity constraints , which imposes a uniqueness for values of an attribute. Null values are allowed . 3. Entity integrity constraints , which say that the primary key must be unique and not null. ...

DBMS #05: Data Independence

The three levels of schema provided by the DBMS are: 1) Internal/ physical schema, which describes how the data is actually stored. 2) Conceptual/ logical schema, which describes what data is present in the database (and its meaning), and 3) External schema, which describes the use of the data. This is derived from the conceptual schema and not physically stored in the database. Physical data independence is a measure of how much a physical schema can be changed without affecting the logical schema. Similarly, we can define logical data independence. Logical data independence is harder to achieve, and hence changes are more possible to the external schema when there are changes in conceptual schema.

DBMS #04: Joins, Decomposition and Normalization

Checklist: > To understand data redundancies and anomalies. > To check a relational decomposition for generation of spurious records and preservation properties. > To achieve a normalized decomposition of a relation. 4.1. Natural Joins: -         To combine two relations using common attributes(s); joins only those records where the common attribute(s) match 4.2. Data Redundancy and Anomalies: -         Functional dependencies hold in the entire database, not just single relations. -         A bad database design has redundant storage of data and may allow spurious records to be generated. Update anomaly: update of an attribute in one record needs to be reflected in all records with the same attribute value. Data inconsistency arises when any relevant record is not updated. Insert anomaly: to insert a new domain value for some attribute, some record must be crea...

DBM #00: Lecture Schedule

Mod. 1: 16 lectures Mod. 2: 24 lectures Mod. 3: 3 lectures Mod. 4: 4 lectures Mod. 5: 19 lectures Mod. 6: 15 lectures

DBM #02: Relational Model

In relational model, data is stored in a tabular fashion. They use the mathematical concept of relations. A relation is a set of records. Each row (or tuple) in a relation represents a record and specifies a relationship between the values in that row. A relation does not allow duplicate records. A schema is a description of data in terms of a data model. It can be seen as a structure/ outline of a relation. An instance of relation is a snapshot of it. While an instance of a relation can change, the schema however cannot. Every attribute in a relation has a domain i.e., a set of atomic values. If a relation has three attributes with domains D1, D2 and D3, any record of the relation is in D1 X D2 X D3. This would also imply that every instance (a set of records) is a subset of D1 X D2 X D3. The degree/ arity of a relation is the number of attributes of its relation schema. The cardinality of a relation is the number of records in the relation. To uniquely identify a non-null record i...

DBMS #01: Introduction to DBMS

Data: raw facts; becomes information when it becomes meaningful. Database: it is a large collection of related data. It models some real-world organization (e.g., a school), with entities (e.g., students, courses) and relationships (e.g., student 'a' takes course 'y'). It represents some aspect of the real world. There are various data models that are used to represent data in a database. For instance, the school database can be modelled in a tabular fashion, rather than a graphical fashion. DBMS is a software that manages some database. It is an interface between a user and a database. It also enables to abstract data representation and storage, thereby insulating the application code from such specifications. Data retrieval is also efficient. It also offers concurrent access and crash recovery. A data model is a set of rules or conventions to represent, store and manage the data. Models can be useful to examine or analyze some aspect of the real world. To design a d...