Friday, August 16, 2013

DBMS

What is database system architecture?
Database system architecture means design or construction of database system. The database system architecture provides general concept and structure of database system. The architecture of most commercial database systems is based on the three-level architecture proposed by DBTG.
What is three-level architecture?
The three-level architecture is also known as three-schema architecture. The purpose of the three-level architecture is to separate the user applications and the physical database. The reasons of this separation are:
(i) Different users need different views of the same data.
(ii) Users should not have to- deal directly with the physical database . storage details.
(iii) The DBA should be able to change the database storage structure or storage device without affecting other user's views etc.
What is external level?
The external level is closest to the users. It is concerned with the way the data is viewed by individual users. You can say that external level is the individual user level. A user can either be an application programmer or an end-user, but DBA is an important special" case.
What is conceptual level?
The middle Level in the three-level architecture is a conceptual level, which is also referred to as logical level. It describes the entire structure of database such as entities, attributes, data types, relationships, constraints, and user operations. The conceptual level supports the external level to present the data to end-users as they need.
What is internal level?
The internal level is also referred to as physical level. It describes the physical storage structures of database and file organizations used to store data on physical storage devices. The internal level describes how the data is stored in the database. It works with operating system and DBMS for storing and retrieving data to and from the storage devices.
What is the difference between intension and extension of database?
The structure of database is called the intension of the database, or the database schema. The data stored into the database at a given time is called the extension of database, or a database instance.
What is meant by mapping?
The process to convert a request (from external level) and the result from one level to another level is called mapping. The mapping defines the correspondence between three levels. The mapping description is also stored in data dictionary. The DBMS is responsible for mapping between these three types of schemas.
What is data dictionary?
The data dictionary (or data repository) or system catalog is an important part of the DBMS. It contains data about data (or metadata). It means that it contains the actual database descriptions used by the DBMS. Data dictionary is automatically updated as data is inserted and updated with the passage of time.
What sort of data is kept in data dictionary?
Data about following things is stored in data dictionary;
  • Names of columns, tables, indexes and all other database objects.
  • Names of internal and external data constraints.
  • Exact meanings of data items.
  • Users and their related privileges.
  • Data about changes in the database for audit purposes etc.
·         What is freestanding data dictionary?
·         A data dictionary that is a separate part of DBMS (non-integrated data dictionary), is called freestanding data dictionary. It may be a commercial product or a simple file developed and maintained by a designer. The freestanding data dictionary is useful in the initial stage of design for collecting and organizing information about data.

·         What is DDL?

·         DDL is a type of database language. It is used to define the structure of database. The DBA and database designer uses the database language to define the conceptual and internal schemas. Typically, the data definition language (DDL) is used to define the conceptual schemas. Creation, deletion and other alteration of tables etc. is dealt in DDL.

·         What is DML?

·         Once the database is compiled and database is populated with data, the data manipulation language (DML) is used to manipulate the database. In data manipulation, data is retrieved, inserted, updated, and deleted to and from the database.

·         What is SQL?

·         It is a structured query language and is also the most popular data access language. Relational database management systems (RDBMSs) make use of SQL to define and manipulate database objects and data itself.

·         What is physical data model?

·         The physical data models are also known as low-level data models. These models provide concepts that describe the details of how data is stored in the computer. They include data structure (or formats of records of database) and file organizations used to store data on physical storage devices.

·         What is the difference between DDL and SDL?

·         The Data Definition Language (DDL) is used to define the conceptual schemas, whereas, Storage Definition Language (SDL) is used to define the internal schemas.

·         What is data model?

·         A data model (or database model) is a collection of concepts that can be used to describe the structure of a database. Most of the data models also include a set of basic operations for specifying retrievals and updating procedures on the database.

·         What is conceptual data model?

·         These are also known as high-level data models. The conceptual data model is the heart of the database. The conceptual data models provide, the permanent structure of the data resource of the organization. The most popular conceptual data model is Entity-Relationship model (E-R model).

·         What is record-based model?

·         Record-based data models are between conceptual data models and physical data models. These are also known as representational or implementation data models. These models are used to describe conceptual, external as well as internal level of the database.

·         Explanation of The Data and Types of Data:

·         Definition and Explanation:

·         Data is a collection of facts and figures related to an object (or entity) that can be processed to produce meaningful information ( or to generate different reports). The object may be a person (or student), an organization, an event or any other things etc. The data may be in the form of text, numbers, images, sounds or even videos.
·         For example, the data of students of a college may be collected to prepare their result. The data of students may look like the following:
A
62
63
64
B
50
75
70
C
90
80
70
D
75
80
60
·         The above data does not convey proper meanings, because it has no relation among given values and there is no proper labeling of data values.
·         In an organization data is very important. It gives view of past activities or history (rise and fall) and enables to make better decisions for future. Data about the organization enables managers for making various decisions to perform different operations to get accurate results.

·         Types of Data:

·         Data can be divided into following types. These are:
·         1. Numeric Data.
·         2. Alphabetic Data.
·         3. Alphanumeric Data.
·         4. Image Data
·         5. Audio Data
·         6. Video Data
 

·         1. Numeric Data:

·         Numeric Data consists of digits 6 to 9, +, and - signs and decimal point. For example 420, 3.543, -7.2, 302 etc. The numeric data is also, further classified as:
·         Integer data Integer data consists of positive or negative whole value: including 0. For example, 420, 302, +62, -26 etc.
·         Real data Integer data consists of values that have decimal point. For example, 15.4, .006, 4.07, -6.27, 4.0 etc.,

·         2. Alphabetic Data:

·         Alphabetic data consists of all the alphabet letters, i.e. A to Z and a to z. For example, Layca, Boher, Asia etc.

·         3. Alphanumeric Data:

·         Alphanumeric data consists of alphabet letters, numeric digits (0 - 9) and special characters such as #, $, etc. For example, 23-March 1940, 28-May 1998, F-16 etc.

·         4. Image Data:

·         This type of data may consist of charts, graphs, pictures and freehand drawings. For example, rise and fall of temperature during a day can be represented by a chart. Image data is also represented by bit patterns. The data is sent as contiguous bits.

·         5. Audio Data:

·         Sound data is a representation of audio, which may be any music, speech or any other sound stored electronically. It is continuous and not discrete. The audio data is in the form of continuous signal. It is converted into digital form before entering it into the computer.
Audio data can be recorded in a computer in spoken or voice form using microphone connected to the computer. Such type of data can be processed and later on listened on speaker connected to the computer.

·         6. Video Data:

·         Video data consists of full-motion images that create actions and movements. It can be produced by a video camera.

·         Logical Database Design:

·         Definition and Explanation:

·         The conceptual data model (E-R model or Semantic Object model) is most commonly used to create data model that can be used to implement the database. The relational data model is the most commonly used for database implementation in an organization.
·         In logical database design, the conceptual data model (such as E-R diagrams) is transformed to a logical data model (such as relational data model). Figure below shows the logical database design process. The input for this process is conceptual data model (such as E-R diagrams). The output of the process is the logical data model (or normalized relations).
·         http://www.basicsofcomputer.com/databasemanagement/figure%206.1.JPG

·         Logical Database Design Steps

·         A brief description of the steps for logical database design process is given below.

·         (i) Represent Entities

·         Each entity type in the E-R diagram is represented as a relation in the Relational View or Relational Data Model. The identifier of the entity type becomes the Primary key of the relation, and other attributes of the entity type become non-key attributes of the relation.

·         (ii) Represent Relationships

·         Each relationship in an E-R diagram must be represented in the relational data model. It depends upon its nature. For example, in some cases, we represent a relationship by making the primary key of one relation, a foreign key of another relation. In other cases, we create a separate relation to represent a relationship.

·         (iii) Normalize the Relations

·         The relations that are created in step (i) and (ii) may have un-necessary redundancy and may have update anomalies (or errors). These relations are normalized. Normalization is the process of converting complex data structures into simple and stable data structures.

·         (iv) Merge the Relations

·         In some cases, there may be redundant relations (i.e. two or more relations that describe the same entity type). They must be merged to remove the redundancy. This process is also known as View Integration.
·         Suppose we have one relation as:
·         EMPLOYEE1(Empno , Name, Address, Phone)
·         And another relation as:
·         EMPLOYEE2(Empno, Ename, Emp-Addr, Emp_Job_ Code, Emp_DOB)
·         Since the two relations have the same primary key (Empno) and describe the same entity. These two relations may be merged into one relation. The result of merging the relations is the following relation.
·         EMPLOYEE(Empno, Name, Address, Phone, Emp_Job_ Code, Emp_DOB)

Relational Data Model:

Definition Explanation

Relational data model is the most commonly used data model to design the database. In 1970, Dr. Codd gave the concept of relational data model, while he was working as a researcher at IBM. The relational data model is based on the mathematical theory, and therefore, has a solid theoretical foundation. This model represents a database as collection of relations, which are physically represented as tables or two-dimensional arrays. Similarly, the attributes are represented by columns of table and each row in a table represents a collection of related data values for a particular instance of an entity.
The relational data model consists of the following three components.
(i) Data Structure: Data of various types can be organized in the form of ' . tables or relations.
(ii) Data Manipulation: Powerful operations can be performed to manipulate data stored in the relations.
(iii) Data Integrity: Data integrity rules can be applied to maintain data accuracy and data validity.
A database that contains multiple tables to store data and relationships can be created on the common fields of tables, is called relational database. The data in relational database is stored in tables. In relational database, table is the basic structure in which data is stored.
Suppose a college database has two tables 'Student' and 'Marks'. The tables with sample data are given below;
http://www.basicsofcomputer.com/databasemanagement/figure%20relational%20data%20model.JPG
In the above tables, the association between tables can be created logically by the values that are stored within the columns of the tables. For example, the roll numbers of students are stored in both tables in the column heading 'Roll-No'. A relationship can be created between two tables on the common column 'Roll-No'. In this way data can be linked between two tables,
In the past 20 years, most of the commercial database systems have been developed following the relational data model and therefore, are relational database systems. INGRES was an early relational data model developed at the University of California.
A relational database system provides various operations used to manipulate the data in the database tables. The data retrieved (output returned by RDBMS) from relational database is also presented in the form of table. For example, the database access language provides a way to select data that meets a certain criteria from one or more tables of database. Note that the rows extracted can themselves be presented in the form of table.

Relational Data Model Advantages

The relational data model provides several advantages, but the main advantages are;
  • It allows for developing simple but powerful structure for databases.
  • It allows separation of the logical and physical level, so, that logical design can be performed without considering the storage structures.
  • It allows for designing or expressing the data of an organization in a simple way, which can easily be understood.
  • The data operations can easily be expressed in a simple way.
  • It allows for applying data integrity rules on the relations of database.
  • Data from multiple tables can be retrieved very easily.
  • It allows users for inserting, modifying, and deleting the rows in a table without facing any problems.


Relation in database (DBMS):
Definition and Explanation
The term relation is derived from the set theory of mathematics. The relational data model is based on the concept of a relation, which is physically represented as a table. A table consists of a set of named columns and a set of unnamed rows. The tables are the most important part of the database and hold information about objects.
A relation is represented as a two dimensional table, in which rows of the table indicate the individual records and columns of the table indicate the attributes;
For example, to store the data of student, a relation is represented by the 'Student' table. This table has column attributes 'Roll-No', 'Name' and 'City'. Each column contains values of the attribute e.g., the 'Name' column contains only the names of students. If there are four rows in the table. It means that records of four students are represented.
Therefore, in relational data model terminology, we define the following terms as:
Attributes: Each column of a relation has a heading, called 'field name'. The named columns of the relation are called attributes. In the above "Student" relation, the attribute names are 'Roll-No', 'Name' and 'City'.
Degree: The number of attributes in a relation is called its degree. In the "Student" relation, the degree is 3.
Tuple: Each row of the relation is called tuple. Each tuple consists of set of values that are related to a particular instance of an entity type.
Cardinality: The number of tuples (rows or records) in the relation is called cardinality. In the 'Student' relation, there are 4 tuples, so the cardinality of the relation is 4.
Domain: The range of acceptable values for an attribute is called the domain for the attribute. Two or more attributes may have the same domain.
A relation that contains a minimum amount of redundancy and allows users to insert, modify, and delete the rows without errors, is known as -well-structured relation.
A relation schema is used to describe a relation. It is made up of a relation . name and a list of attributes. For example, if R is a relation name and its attributes are: A1,A2, .... An, then the relation schema of R is denoted as; R(A1,A2, .... An).
An example of relation schema for a relation of degree 3, which describes the students of university, is given below.
STUDENT (Roll-No, Name, City)
Where 'Student' represents the name of relation (or table) followed by names of attributes (in parenthesis) in the relation.
Properties of Relations
We have defined that relations are similar to two-dimensional table, however not all tables are relations. A relation has several properties that make a relation different from a table. Some of these properties are discussed below:
 
1. There is no duplication of tuples in a relation.
A relation is a mathematical set (set of tuples), and sets in mathematics by definition do not include duplicate elements. So a relation cannot contain any duplicate tuples. It means that two (or more) identical rows (or records) cannot exist in a relation. Each row in a relation must be unique. For example, in a student relation, there cannot two records (rows) for the same student. Uniqueness in a relation is guaranteed by assigning the primary key for each relation.
2. All attribute values of relation are atomic.
According to this property of relation, each cell of a relation (table) contains only one value (never a collection of several values). You can say that each value in a tuple is an atomic value which cannot be divided into components. The composite and multivalued attributes (or repeating groups) are not allowed. Multi-valued attributes must be represented by separate relations. A relation satisfying this condition is said to be normalized (or equivalent to first normal form). For example, in a student relation, you must have to write a single telephone number of a student (more than one telephone numbers separated by commas is not allowed). Similarly, there should be three attributes for student name such as First-Name, Middle-Name, and Last-Name.
3. All attribute values of a relation must come from the same domain.
The values for attributes must be within the acceptable range. For example, in a student relation all entries in "Marks" attribute must be from the domain that defines student marks (such as between 0 and-200).
4. Tuples of a relation are unordered from top to bottom.
A relation is defined as a set of tuples. Mathematically, elements of a set have no order among them. Hence, tuples in relations do not have any particular order. The rows of a table do have a top-to-bottom ordering, whereas the tuples of a relation do not. However in a file, records are physically stored on disk in an order such as one after the other. Similarly, when a relation is displayed as a table, rows can be displayed in a certain order.
Tuples ordering is not a part of a relation definition. Many logical orders can be specified on a relation when data of relation is retrieved or manipulated. For example, tuples in the student relation could be logically ordered by values of 'Roll-No', 'Name', 'Marks' or some other attributes.
5. Attributes of a relation are unordered from left to right.
Like tuples of a relation, the definition of a relation does not specify any order of attributes. Each attribute of a relation has a unique name. The attributes are always referenced by name, not by position (or column number) in the relation. The columns of a table do have a left-to-right order, while the attributes of a relation do not. The attributes (or columns) of a relation may be interchanged.
Relation Keys
An attribute (field) or set of attributes that uniquely identify the tuples of a relation or to retrieve specific data from the table of database is called key. Therefore, in relations (tables) of a database, some attributes of tables are defined as keys for the following purposes.
  • for uniquely identifying the tuples of a relation.
  • for establishing relationships between relations.
  • for sorting records of a relation based on the data of one or more columns.
  • for accessing particular record(s) from a relation.
A brief description about most important kinds of keys is given below.
Primary Key
A primary key is an attribute or combination of attributes that uniquely identify each tuple in a relation. In a relational database, each relation must have a primary key. The primary key is underlined in relation schema. A primary key must not contain null values (undefined values).
Candidate Key
Some relations may have more than one attribute that can be used as primary key. For example, "Student" relation may have attributes 'Roll_No', 'NIC', 'Registration_No', 'Address' and 'Phone_No' etc. In "Student" relation, 'Roll_No', 'NIC' and 'Registration_No' are attributes that can uniquely identify the records of students. So any one of these attributes can be selected as primary key. Therefore, these attributes can be called as candidate keys.
If one of the suitable candidate key is selected as the primary key of the relation, then the other candidate keys are called the alternate keys.
Composite Key
A key that consists of two or more attributes of a relation is called composite key. It is also referred to as concatenate key. For example, in a "Student" relation containing attributes 'Roll_No', 'Class_ID', 'Name', 'Address' and 'Phone_No'. The attributes 'Roll_No' and 'Class_ID' may be selected as composite key, so that the records of all the classes of a college can be uniquely identified.
Foreign Key
A foreign key is an attribute (or combination of attributes) in a table whose values must match with a primary key in another table. The table that contains the foreign key is called dependent table. Similarly, the table to which the foreign key refers to is called the parent table. The foreign key. is used to link data from one table to another.
For example; two relations "Student" and Marks" are given below. The 'Roll-No' may be an attribute of 'Marks' relation but not the primary key of 'Marks'. However, it is the primary key of the 'Student' relation. In 'Marks' relation, Roll-No attribute will be referred to as foreign key.
http://www.basicsofcomputer.com/databasemanagement/figure%20foreign%20key.jpg
Sort Key
The records of a relation or table are sorted based on the data of one or more fields. An attribute or combination of attributes that are selected to sort the records of a table in a specific order is called sort key. For example, records of "Student" table can be sorted based on "Name" or 'Marks' attribute or by selecting both 'Name' and 'Address' attributes as sort key etc.
Representing Relational Database Schemas
A relational database may consist of many relations (tables). A schema is description of the overall logical structure of a database. The relational database schema is represented by giving the name of the each relation, followed by the attribute names in parenthesis. Normally the primary key is underlined. For example, a relational database of university may contain relations 'Student' and 'Faculty', the database schema is written as:
STUDENT (Roll-No, Name, City, .Marks)
FACULTY (FID, Name, Department)
Some attributes of the same name or same domain may appear in more than one relation. When an attribute appears in more than one related relation, it usually represents a relationship between tuples of the two relations.
A figure below shows an instance of relational database of university.
http://www.basicsofcomputer.com/databasemanagement/figure%20representing%20relational%20database%20scheme.jpg
Data Integrity Rules:
Definition and explanation
Data integrity refers to the correctness and consistency of data. It is another form of database protection or security. Security involves protecting the data from unauthorized operations, while integrity is concerned with the quality of data itself. The data integrity plays very important role in RDBMS, in which multiple users access the data from database.
Integrity is usually expressed in terms of certain constraints, These are the consistency rules that can be applied to database so that the correct data can be entered into database. The constraints may be applied to individual data items within a single record or they may be applied to relationships between records. Integrity rules/constraints check the data that is entered or modified into the database, the examples of integrity constraints are:
  • 'Issue Date' of a book in a library system cannot be later than the corresponding 'Return Date' of a book.
  • Maximum obtained marks in a subject cannot exceed 100 and less than 0.
  • The value of attribute "Gender" for each record of student table must be "Male" or "Female".
  • The records of a table must be unique.
Important data integrity rules are:
(i) Entity integrity
(ii) Domain integrity
(iii) Referential integrity
(i) Entity Integrity
The entity integrity constraint states that in a relation no primary key value can have a null value. Entity, integrity constraint is also referred to as uniqueness constraint. By definition, a primary key is used to identify tuples uniquely. If two or more tuples have null values in the primary key attribute, then you can not identify tuples uniquely.
(ii) Domain integrity
A domain represents a set of values that can be assigned to an attribute. Domain integrity constraint is specified on the column (attribute) of a relation, so that correct values can be entered in the column for each record.
You can specify domain for an attribute into DBMS or into application code. For example, in Ms-Access, you can specify the. value of 'Marks' attribute of "Student" table which must be greater than 0 and less than or equal to 200 as shown in figure below.
http://www.basicsofcomputer.com/databasemanagement/figure%20domain%20integrity.jpg
In the above figure, you have applied the domain constraint to the 'Marks' attribute. In the "Field Properties" section, the property labeled with "Validation Rule" is used to specify the domain constraint. It is specified by using the expression 0 >= 200 AND <= 200 as shown above. You can also specify the text for message in the "Validation Text" field, which will be displayed if user does not follow the domain rule. Suppose you enter the text "Invalid marks of student", the message1 displayed is shown in figure below.
http://www.basicsofcomputer.com/databasemanagement/figure%20domain%20integrity%202.jpg
(iii) Referential integrity
The referential integrity constraint is specified between two relations and is used to maintain the consistency among tuples of two relations. Referential integrity is applied on foreign keys.
Referential integrity states that if a foreign key exists in a relation, then the foreign key value must match the primary key value of some tuple in its home relation (parent relation) or the foreign key value must be completely null.
Referential integrity ensures that the relationships between records in related tables remain consistent. For example, if the relationship between "Student" table and "Marks" table is created then the DBMS will not allow you to delete record from the ''Student" table if there is a record related to that student in the "Marks" table.
http://www.basicsofcomputer.com/databasemanagement/figure%20referential%20integrity.jpg
In 'Student' table, the 'Roll-No' attribute is used as primary key. Similarly, the 'Roll-No' attribute is used as foreign key in 'Marks' table. The referential integrity is implemented by primary key and foreign key relationship. The records in 'Student' table cannot be deleted, if the related records exist in 'Marks' table.
Relational Data Manipulation Languages:
 Definition and explanation
In relational database management systems, different database languages are used to manipulate data. These languages may be procedural, non-procedural, graphical language, 4GL etc. Some RDBMSs use natural language, sometimes called a fifth generation language.
Categories of Relational Data Manipulation Languages
Different relational data manipulation languages are proposed to manipulate the relational database. The most important categories of relational data manipulation languages are:
(i) Relational Algebra in DBMS
(ii) Relational Calculus
(iii) Transform-Oriented Languages
(iv) Query-By-Example and Query-By-Form
(i) Relational Algebra in Dbms
Relational Algebra is a theoretical procedural language. The relational algebra is not a user-friendly language. Relational algebra has relational operators that are used to perform various operations on relations. The relational algebra operator uses relations as operands, performs the operation on the relations and returns another relation as output result.
Relational algebra is not directly used in commercial database processing, because no commercial DBMS product provides relational algebra facilities. The relational algebra helps to learn. SQL because the syntaxes of SQL statements are similar to the syntax of relational algebra expressions.
(ii) Relational Calculus
Relational calculus is a non-procedural relational data manipulation language. It enables user to specify what data to be retrieved, but not how to retrieve the data. The relational calculus is a formal query language. It is not related to the mathematics calculus. The relational calculus is not easy to learn and to use. It is not used in commercial database processing.
Domain relational calculus is another type of relational calculus. In this type of relational calculus, the variables are used that take values from domains instead of tuples of relations.
(iii) Transform-Oriented Languages
Transform-oriented languages are non-procedural data manipulation languages that transform input data expressed as relations into results expressed as a single relation. These languages are very easy to learn and to use for manipulating data. SQL and SQUARE are examples of Transform-Oriented languages. The most popular and commonly used transform-oriented language in commercial DBMS is SQL.
(iv) Query-By-Example and Query-By-Form
Query-By-Example (QBE) and Query-By-Form (QBF) are graphical relational database languages. These languages provide the graphical interface to manipulate data of database.
Query-By-Example (QBE) is one of the first graphical query language. It is developed by IBM and is available in IBM commercial product. This language is also implemented in the Paradox DBMS. It differs from SQL in that the user does not have to specify a structured query explicitly; rather the query is formulated by filling in templates of relations that appear on the monitor screen. The user does not have to remember the names of relations and their attributes because they are displayed as part of these templates. QBE is related to the domain relational calculus.
Relational Algebra Operators in DBMS:
Relational algebra consists of a collection of operators used to perform various operations on the relations of database. The relational algebra operators combined with relations to form a relational algebra expression, which also returns a relation. The syntax of expression of relational algebra is very simple. A relational algebra operator takes one of two relations as operands and returns a single relation as result. Both the operands and returned results are tables.
In relational algebra, most important relational operators are:
(a) The Select operator
(b) The Project operator
(c) Set operators
  • (i) Union ?
  • (ii) Difference
  • (iii) Intersection
  • (iv) Cartesian product
The basic operations that can be performed in relational algebra using the relational operators are:
Codd's 12 Rules/Principles For the Relational Model:
Dr. Codd is the founder of relational database model. He published a two-part article that lists 12 rules (or principles). These rules are known as Codd's 12 rules. Dr. Codd's rules provide very useful measure (yardstick) for evaluating a relational database system. These rules are used to determine whether a DBMS is relational and to what extent it is relational. Dr. Codd also mentioned that according to these rules, no fully relational system is available yet. The Codd's rules are described below:
0. Rule Zero
According to this rule, any system that is claimed to be Relational Database . Management System (RDBMS), must be able to manage the data of database through its relational capabilities.
1. Information Representation Rule
All information in a relational database is represented clearly m the form of rows and columns. It means information is stored in tables.
2. Guaranteed Access Rule
Each and every atomic value in a relational database is guaranteed to be logically accessible by specifying the table name, primary key value and column name.
3. Representation of Null Values Rule
The system must be able to represent null values in a systematic way.
4. Relational Catalog Rule
The system catalog (data dictionary) that contains the logical description of the database must be represented in the same way as ordinary data.
5. Comprehensive Data Sub-language Rule
A relational system may support several languages and various modes of terminal use. However, there must be at least one language whose statements are expressible in some well-defined syntax as character strings and which has ability to support all of the following:
  1. data definition
  2. view definition
  3. data manipulation
  4. integrity constraints
  5. transaction boundaries
6. Updating Views Rule
All views that are theoretically updateable are also updateable by the system.
7. Insert, Update and Delete Operations Rule
The system must have capability to insert, update and delete data of tables.
8. Physical Data Independence Rule
Application programs and terminal activities remain logically uniform whenever any changes are made in either storage representation or access . methods.
9. Logical Data Independence Rule
Application programs and terminal activities remain logically uniform when structure of database tables changes.
10. Integrity Independence Rule
Integrity constraints specific to a particular relational database must be definable in the relational data sub-language and storable in the catalog (data dictionary), not in the application programs. A minimum of the following two integrity constraints must be supported,
Entity integrity
No component of a primary key is allowed to have a null value.
Referential Integrity
If foreign key is defined in a relational database, then each value of foreign key must have a matching primary key value in another table of database.
11. Distribution Independence Rule
A RDBMS has distribution independence. It means that if the database is distributed, the application programs and user's commands need not be changed.
12. Non-Subversion Rule
If a relational system has a low-level (single record at time) language, that low-level language cannot be used to bypass the integrity rules or constraints expressed in the higher-level (multiple-records at a time) relational language.
What is Equi-Join?
The join operation may contain the join condition, which uses the relational operators such as; <, <=, >,  >=, ?. Equi-join is the join in which the joining condition is based on the equality (i.e., only the relational operator '=' is
used).


No comments:

Post a Comment