{"id":200,"date":"2018-07-12T12:30:21","date_gmt":"2018-07-12T12:30:21","guid":{"rendered":"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=200"},"modified":"2018-12-07T11:10:41","modified_gmt":"2018-12-07T11:10:41","slug":"introduction-to-relation-databases","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/chapter\/introduction-to-relation-databases\/","title":{"rendered":"Introduction to relation databases"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/0zP38G6eu6c\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Introduction<\/strong>\r\n\r\n&nbsp;\r\n\r\nThough, a file can be used to read and write data, the flat file has some limitations like\r\n<ul>\r\n \t<li>When a file size is increased, working with flat file can be very slow<\/li>\r\n \t<li>Searching for a specific record(s) is difficult in flat file as it does not provide querying facility.<\/li>\r\n \t<li style=\"text-align: justify\">Managing simultaneous access of the records is problematic as though the lock mechanism is used for locking a file, it is not sufficient for managing concurrent access.<\/li>\r\n \t<li style=\"text-align: justify\">The file processing is sequential, so insert a new record or delete an existing record the process makes large overhead, especially in a large file.<\/li>\r\n \t<li style=\"text-align: justify\">File processing provides only file permission which is not sufficient to enforce different levels of access\u00a0 to data.<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\nThe Relational Database Management System (RDBMS) helps to solve all of the above issues.\r\n<ul>\r\n \t<li>RDBMSs can provide much faster access to data compare to the flat file.<\/li>\r\n \t<li>RDBMSs can be queried to extract specific record or set of records.<\/li>\r\n \t<li>RDBMSs have built-in mechanism for simultaneous access of the records.<\/li>\r\n \t<li>RDBMSs provide random access of the data.<\/li>\r\n \t<li>RDBMSs have built-in privilege systems which facilitates different levels of access to the data.<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Relational Database System Concept<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Dr. E.F.Codd developed relation database model. Relational database eliminated some of the problems which are associated with standard file and other database. By using RDBMS , data redundancy can be reduced which helps to save disk storage and leads to efficient data retrieval. Today, Relational database is the de facto standard for database application.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Relational databases are the most commonly used type of databases. Relation databases are developed on the sound theoretical basis in relational algebra. It is not mandatory to understand relation algebra theory to use relational databases.<\/p>\r\n&nbsp;\r\n\r\nLet us understand basic relational database concept.\r\n\r\n&nbsp;\r\n\r\n<strong>Table<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Relational database is consists of relations. A relation is also called as tables. There are differences between relation and table, though these terms are used interchangeably. A table is structured made up of rows and columns. The following figure shows a sample table. This table stores information of customers.<\/p>\r\n&nbsp;\r\n\r\n<strong>Customer<\/strong>\r\n\r\n&nbsp;\r\n<table class=\"aligncenter\" style=\"height: 140px\" border=\"1\">\r\n<tbody>\r\n<tr style=\"height: 28px\">\r\n<td style=\"height: 28px;width: 84.0625px\"><strong>CustomerID<\/strong><\/td>\r\n<td style=\"height: 28px;width: 115.063px\"><strong>Name<\/strong><\/td>\r\n<td style=\"height: 28px;width: 141.063px\"><strong>Address<\/strong><\/td>\r\n<td style=\"height: 28px;width: 79.0625px\"><strong>City<\/strong><\/td>\r\n<\/tr>\r\n<tr style=\"height: 28px\">\r\n<td style=\"height: 28px;width: 84.0625px\">1<\/td>\r\n<td style=\"height: 28px;width: 115.063px\">Anand Mehta<\/td>\r\n<td style=\"height: 28px;width: 141.063px\">19- Rajni Society<\/td>\r\n<td style=\"height: 28px;width: 79.0625px\">Ahmedabad<\/td>\r\n<\/tr>\r\n<tr style=\"height: 28px\">\r\n<td style=\"height: 28px;width: 84.0625px\">2<\/td>\r\n<td style=\"height: 28px;width: 115.063px\">Bhavesh Rajvir<\/td>\r\n<td style=\"height: 28px;width: 141.063px\">25- Ravi Park<\/td>\r\n<td style=\"height: 28px;width: 79.0625px\">Rajkot<\/td>\r\n<\/tr>\r\n<tr style=\"height: 28px\">\r\n<td style=\"height: 28px;width: 84.0625px\">3<\/td>\r\n<td style=\"height: 28px;width: 115.063px\">Chetan Pandya<\/td>\r\n<td style=\"height: 28px;width: 141.063px\">22-Panchvati Society<\/td>\r\n<td style=\"height: 28px;width: 79.0625px\">Ahmedabad<\/td>\r\n<\/tr>\r\n<tr style=\"height: 28px\">\r\n<td style=\"height: 28px;width: 84.0625px\">4<\/td>\r\n<td style=\"height: 28px;width: 115.063px\">\u00a0Dharmarth Shah<\/td>\r\n<td style=\"height: 28px;width: 141.063px\">12 ABC Park<\/td>\r\n<td style=\"height: 28px;width: 79.0625px\">Ahmedabad<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n&nbsp;\r\n\r\n<span style=\"text-align: justify;font-size: 1em\">The table name is: Customer. Customer table has 4 columns which represent different piece of data and 4 rows that correspondent to individual customer.<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Column<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Each column in a table represent different piece of data. For example, in the above customer table has 4 columns namely CustomerID,Name,Address and City. Every column in a table must have unique name. Each column is associated with a precise data type. For instance, in the above customer table CustomerID column has integer data type while Name, Address and city has string data type. Columns are also known as fields or attributes.<\/p>\r\n&nbsp;\r\n\r\n<strong>Row<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Each row in the table represents a record. For example, in the customer table there are 4 customers. It is not compulsory that a table must have same number of columns and rows. In the above customer table to demonstrate the concept of rows and columns there are 4 columns and 4 rows. Rows are also known as records or tuples.<\/p>\r\n&nbsp;\r\n\r\n<strong>Values<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Each row consists of a collection of individual values. The intersection of column and row is known as cell. Each cell represents a single value. Each value must have the data type as specified by its corresponding column.<\/p>\r\n&nbsp;\r\n\r\n<strong>Primary Key<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">To uniquely identify a record in a table, the attribute or set of attribute is used. This attribute is known as primary key. In case the primary key consist of set of attributes, it is known as composite primary key. For example, in the customer table customerID is defined as primary key. The reason for defining customerID is a primary key is that names may be repeated for customers. You can be defined composite primary key consist of - Name, Address, City -attributes.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Primary key is used to main entity integrated for a table. Entity integrity ensures that the attribute must be unique within a table and cannot be null.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The table has primary key defined is referred as master table or parent table.<\/p>\r\n&nbsp;\r\n\r\n<strong>Foreign Key<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The database is relational database because there is a relation can be set between tables of the database. The relationship between tables is defined by using foreign key. CustomerID is a primary key for customer table. In Order table customerID can be defined as foreign key.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Foreign key is used to provide referential integrity between tables. Referential integrity means an attribute can take only values available in parent table. For instance, considered we have an order table. Then in order table only those customer can be placed order which are available in customer table.<\/p>\r\n&nbsp;\r\n\r\nThe table in which foreign key is defined is known as child table or detail table.\r\n\r\n&nbsp;\r\n\r\n<\/div>\r\n<div>\r\n\r\n\u00a0 \u00a0 The following figure depicts the relationship between customer and order table.\r\n\r\n&nbsp;\r\n\r\n<strong>Customer<\/strong>\r\n\r\n<img class=\"alignnone size-full wp-image-204 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97.png\" alt=\"\" width=\"631\" height=\"259\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nA table to qualify as a relation must have following characteristics.\r\n\r\n&nbsp;\r\n\r\nI. A table is recognized as 2-Dimensional structure combined of rows and columns.\r\n\r\nII. A table must have a unique name.\r\n\r\nIII. Each column name must be unique name within the table.\r\n\r\nIV. Each row-column intersection represent a single data value (not multivalued, not composed)\r\n\r\nV. Each column has a specific range of values known as the attribute domain\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">VI.\u00a0The order rows and columns are not significant within a table.<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">VII.\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">Each row with the table must be unique. That means there cannot be two rows with exactly\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">the same values for all their columns.<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong style=\"text-align: initial;font-size: 1em\">Schemas<\/strong>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The table design having attribute name, primary key and foreign key attribute is known as schema of a table. The complete set of table schemas is considered as database schema.<\/p>\r\n&nbsp;\r\n\r\nPrimary key is differentiated using underline.\r\n\r\n&nbsp;\r\n\r\nThe schema for customer table is shown below\r\n\r\n&nbsp;\r\n\r\nCustomer(CustomerID, Name, Address, City)\r\n\r\n&nbsp;\r\n\r\n<strong>Relationships<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A relationship in a database table can be assigned. Hence this database is known as relation database. Foreign key is used to set relationship between data of two tables. For example, in the order and customer table customerid set relationship between order table and customer table.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">There are 3 types of relationship between two tables. These relationships are classified based on the records on each side of relation.<\/p>\r\n&nbsp;\r\n\r\n1. One-to-one relationship\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">2. One-to-many relationship<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">3. Many-to-many relationship<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">One-to-one relationship: A one-to-one relationship make sure that the record from one table to another matches only one. For example, the relationship between bank AccountNumber and bank customer is one-to-one. Each accountnumber is associated with only one customer.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">One-to-many relationship: A one-to-many relationship allows record from one table to matches many records from another table. For example, the relationship between bank customer and accountnumber is one-to-many as one customer can have many bank-accounts. Many \u2013to-one relationship is another type of relation which is the same as one-to-many relationship with only difference in direction.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Many-to-many relationship: In many-to-many relationship, records from one table matches records to another table. For example, the relationship between author and book is many-to-many as one book can have many authors and one author can write many books.<\/p>\r\n&nbsp;\r\n\r\n<strong>Database Design<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Database is generally designed by database administrator (DBA) or database design specialist. Generally, DBA or database specialist design database for large database which has thousands of users. For small and medium size web sites, the database for the website is often design by the web programmer.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Database design affects to use SQL to work with database. In general, a well-designed database is easy to understand and query, while a poorly designed database is difficult to work with.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">A relational database system should model the real-world environment where it is used. The job a designer is to analyze and to map the real world environment into relational database system. An entity or object in real world is represented as a table in relational database. The attributes of real world entity is become attributes of table and each row of a table represents one instance of the entity. In simple way, you can say that a relational table is an entity set and a record of a relation table is an entity. Though in spoken world, entity is also used to represent entity set.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">To model a database and the relationship between relations after a real world system, ER (Entity-Relationship) modeling is used.<\/p>\r\n&nbsp;\r\n\r\n<strong>The six basic steps for designing data structure of database<\/strong>\r\n\r\n&nbsp;\r\n\r\n1. Recognize data elements\r\n\r\n2. Subdivide data elements into smallest useful elements\r\n\r\n3. Identify tables and assign the columns\r\n\r\n4. Find the primary key and foreign key\r\n\r\n5. Check whether the data structure is normalized\r\n\r\n6. Identify the indexes\r\n\r\n&nbsp;\r\n\r\n<strong>1.\u00a0<\/strong><strong>Identify data elements<\/strong>\r\n\r\n<strong>\u00a0<\/strong>\r\n<p style=\"text-align: justify\">Data elements are identified by many ways. It is depend on the nature of the system. It includes analyzing existing system if it is available, interviewing users, evaluating comparable systems. The documents used by a real world system (i.e. invoice) is helped to identify the data elements of the system. Once data elements are identified begin to think\u00a0<span style=\"text-align: initial;font-size: 1em\">about the entities which are associated with these elements. This will help to identify tables of database.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>2.\u00a0\u00a0<\/strong><strong>Subdivide data elements into smallest useful elements<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">If a data element consists of two or more component, then it should be subdividing the element into those components. At what extent to subdivide the data element depends on how it will be used. Because it is difficult to predict all the future uses for the data, most designers subdivide data elements as much as possible. For example, the attribute name : Tejas Trivedi consist of firstname Tejas and lastname Trivedi, It is subdivided into two attributes(fields) named firstname and lastname. The data element can be easily rebuild by concatenating subdivided data elements.<\/p>\r\n&nbsp;\r\n\r\n<strong>3.\u00a0<\/strong><strong>Identify tables and assign the columns<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">After the identification and subdivision of all data elements of database group them by entities with which they are associated. These entities will later become tables of the database and the data elements will become attributes of a table. In case a data element relates to more than one entity, it can be included for all the entities it relates to. The duplicates data elements can be removed when the database is normalized. At this step, elements can be excluded that are not required and any additional element can be added.<\/p>\r\n&nbsp;\r\n\r\n<strong>4.\u00a0<\/strong><strong>Identify the primary key and foreign key<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Each table should have a primary key. If possible, an existing column should be used as primary key. In case, an existing column is not suitable to define primary key, an ID column can be defined as primary key which is auto increment by 1 for each record. Keep in mind that the value of primary key is not changed or seldom changed.<\/p>\r\n&nbsp;\r\n\r\nIf two tables have one-to-one relationship, they should be related by their primary keys.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">If two tables have one-to-many relationship, a foreign key is defined to the many side of table. The foreign key must have the same data type as the primary key column which is related with.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">If two tables have many-to-many relationship, a third new table (linking table) is required to relate these two tables. So each table of many-to-many relationship will have a one-to-many relationship with the linking table. The linking table is consist of primary key of two tables. Generally, linking table does not have a primary key as it is only used to relate the two tables.<\/p>\r\n&nbsp;\r\n\r\n<strong>5.\u00a0<\/strong><strong>Review whether the data structure is normalized<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Normalization is a process to reduce data redundancy and anomalies. There are various normal forms (NFs) named \u2013 First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), Forth Normal Form (4NF) , Fifth Normal Form (5NF), Domain Key Normal Form(DKNF).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">2NF is better than 1NF. 3NF is better than 2NF, BCNF is better than 3NF and so on.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">For the most business database design process, 3NF is sufficient. The highest level normal form is not always most desirable.<\/p>\r\n&nbsp;\r\n\r\n<strong style=\"font-size: 1em\">Keys and Functional Dependency<\/strong>\r\n\r\n<\/div>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"font-size: 1em\">Key: <\/strong><span style=\"font-size: 1em\">The key is an attribute or set of attributes which determine other attribute or attributes. If you know the value of attribute A, then you can determine the value of attribute B.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"font-size: 1em\">Functional Dependency: <\/strong><span style=\"font-size: 1em\">The value of attribute or attributes determines the value of another attribute or attributes. If the value of attribute A determines the value of attribute B, then it is said as A-&gt;B (read as A functionally determines B). In that case, A (the left hand side attribute or attributes) is known as determinant or functional determinant and B (the right hand side attribute or attributes) is known as dependent or functional dependent.<\/span><\/p>\r\n\r\n<div>\r\n<p style=\"text-align: left\">The following table shows characteristics for each normal-form.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-205 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98.png\" alt=\"\" width=\"656\" height=\"338\" \/>\r\n<p style=\"text-align: center\">The table is not in normal form, and then it is considered as in 0th normal form.<\/p>\r\n&nbsp;\r\n\r\nTo convert the above relation into 1 NF,\r\n\r\n&nbsp;\r\n\r\nI.\u00a0 there are not any multivalued attributes and\r\n\r\nII.\u00a0 Every attribute value is atomic\r\n\r\nIII. Define Primary key\r\n\r\n&nbsp;\r\n\r\nSo, let us make the table as below.\r\n\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-206 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99.png\" alt=\"\" width=\"650\" height=\"148\" \/>\r\n\r\n<img class=\"alignnone size-full wp-image-207 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100.png\" alt=\"\" width=\"647\" height=\"83\" \/>\r\n\r\n&nbsp;\r\n\r\n<\/div>\r\n<div>\r\n<p style=\"text-align: left\">\u00a0 \u00a0 The primary key of the above relation is (orderID, ProductID)<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">Functional dependencies for the relation in 1 NF.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">OrderID,ProductID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress<\/p>\r\n<p style=\"text-align: left\">ProductDescription, ProductFinish, UnitPrice ,OrderedQuantity<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">If all the relations of a database is in 1NF, then the database is called in 1NF.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">There are anomalies in 1NF. The anomalies are I. insertion anomaly II. Update anomaly and III. Delete anomaly.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">Let us understand these anomalies using an example.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">The above relation has composite primary key (orderID, ProductID).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">New product cannot be added without order. So, there is an insertion anomaly.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">If Dining table delete from orderID 1611, then information related to the product finish and unit price is also lost. So, there is delete anomaly.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">If the price of\u00a0 productid 4 is changed, then it is required to be updated in multiple records.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">So, there is an update anomaly.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">Let us note down functional dependencies for the relation in 1 NF.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">OrderID,ProductID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress ProductDescription, ProductFinish, UnitPrice ,OrderedQuantity<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">Relation Name: Order_customer_product<\/p>\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-208 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101.png\" alt=\"\" width=\"649\" height=\"214\" \/>\r\n\r\n&nbsp;\r\n\r\nAs all the relation are in 1NF, the database is in 1NF.\r\n\r\n&nbsp;\r\n\r\n<span style=\"font-size: 1em;text-align: initial\">Now to normalize table into 2 NF, there must be fully functional dependencies.<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: left\"><strong>Fully functional dependency: <\/strong>If attribute B is functionally dependent on a key A but not on any subset of key A, then attribute B is fully functionally dependent on attribute A. This generally happens when attribute A is composite key.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">In the above relation , there is a partial functional dependency for functional dependnecy<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">OrderID,ProductID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress ProductDescription, ProductFinish, UnitPrice ,OrderedQuantity<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">To determine OrderDate, CustomerID, CustomerName, CustomerAddress only OrderID is required. There is no need for productID.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">To determine ProductDescription, ProductFinish and UnitPrice only productID is required.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">There is no need for orderID.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">So it is not fully functional dependency.\u00a0 Following attribute shows functional dependency<\/p>\r\n&nbsp;\r\n<p style=\"text-align: left\">OrderID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress<\/p>\r\n<p style=\"text-align: left\">ProductID -&gt; ProductDescription, ProductFinish, UnitPrice<\/p>\r\n<p style=\"text-align: left\">OrderID, ProductID -&gt; OrderedQuantity<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-209 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102.png\" alt=\"\" width=\"351\" height=\"514\" \/>\r\n\r\n<\/div>\r\n<div><\/div>\r\n<div><img class=\" wp-image-210 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-103.png\" alt=\"\" width=\"280\" height=\"239\" \/><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nAll the relation are in 2NF, the database is in 2NF.\r\n\r\n&nbsp;\r\n\r\nNow to normalize table into 3NF, there must not be transitive functional dependencies.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Transitive functional dependency: <\/strong>If attribute A is functionally determine attribute B, and attribute B functionally determine attribute C, then attribute C is transitively functional dependent on attribute A.<\/p>\r\n&nbsp;\r\n\r\nIn the above relation , there is a transitive functional dependency for\r\n\r\n&nbsp;\r\n\r\nOrderID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress\r\n\r\n&nbsp;\r\n\r\nThe reason is OrderID -&gt; CustomerID and\r\n\r\n&nbsp;\r\n\r\nCustomerID -&gt; CustomerName, CustomerAddress\r\n\r\n&nbsp;\r\n\r\nSo, the relations are in 3NF.\r\n\r\n<img class=\"size-full wp-image-211 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-104.png\" alt=\"\" width=\"230\" height=\"327\" \/>\r\n\r\nIn the order relation customerID is foreign key referencing customerID attributeof Customer relation.\r\n\r\n&nbsp;\r\n\r\nTo summarize the original relation is converted into following relations to normalize upto 3NF.\r\n\r\n<\/div>\r\n<div>\r\n\r\n\u00a0 \u00a0 \u00a0ProductID -&gt; ProductDescription, ProductFinish, UnitPrice\r\n\r\n&nbsp;\r\n\r\nCustomerID -&gt; CustomerName, CustomerAddress\r\n\r\n&nbsp;\r\n\r\nOrderID -&gt; orderdate, CustomerID\r\n\r\n&nbsp;\r\n\r\nOrderID, ProductID -&gt; OrderedQuantity\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-212 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-105.png\" alt=\"\" width=\"286\" height=\"555\" \/>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-213 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-106.png\" alt=\"\" width=\"222\" height=\"257\" \/>\r\n\r\n<\/div>\r\n<ol start=\"6\">\r\n \t<li><strong>Identify the indexes<\/strong><\/li>\r\n<\/ol>\r\n<strong>\u00a0<\/strong>\r\n\r\nThe index should be created for<strong>\u00a0<\/strong>\r\n<ul>\r\n \t<li>When the column is Foreign key<\/li>\r\n \t<li>When the column is used frequently in search condition or join<\/li>\r\n \t<li>When the column has large number of distinct values<\/li>\r\n \t<li>When the column is not updated frequently.<\/li>\r\n \t<li style=\"text-align: justify\">An index is a structure which provides for location one or more rows directly. Without index, the entire table has to scan for matching criteria. In case, index is not created then to search particularly records may take more time.<\/li>\r\n \t<li>By Default MySQL create index for primary key and unique constraint.<\/li>\r\n \t<li style=\"text-align: justify\">A composite index can be created which consist of two or more columns. Composite index is created for columns which are not updated frequently or when the index will cover almost every search condition on the table.<\/li>\r\n<\/ul>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Introduction to relation databases<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/0zP38G6eu6c\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<strong>References:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">1. Luke Welling, Laura Thomson: PHP and MySQL Web Development, Pearson,<\/p>\r\n<p style=\"text-align: justify\">2. W. Jason Gilmore: Beginning PHP and MySQL 5 From Novice to Professional, Apress<\/p>\r\n<p style=\"text-align: justify\">3. Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass:Beginning PHP5, Apache, and MySQL Web Development, Wrox,<\/p>\r\n<p style=\"text-align: justify\">4. Robin Nixon: Learning PHP, MySQL, and JavaScript, O'Reilly Media<\/p>\r\n<p style=\"text-align: justify\">5. Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove: Professional PHP,Wrox<\/p>\r\n<p style=\"text-align: justify\">6. Tim Converse, Joyce Park, Clark Morgan: PHP5 and MySQL Bible<\/p>\r\n<p style=\"text-align: justify\">7. Joel Murach, Ray Harris: Murach\u2019s PHP and MySQL, Shroff\/Murach<\/p>\r\n<p style=\"text-align: justify\">8. Ivan Bayross, Web Enabled Commercial Application Development Using HTML\/Javascript\/DHTML\/PHP , BPB Publications<\/p>\r\n<p style=\"text-align: justify\">9. Joel Murach, \u201cMurach\u2019s MySQL\u201d, Shroff\/Murach<\/p>\r\n<p style=\"text-align: justify\">10. Julie C. Meloni, Sams Teach Yourself PHP, MySQL and Apache All in One, Sams<\/p>\r\n<p style=\"text-align: justify\">11. Larry Ullman, PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Pearson Education<\/p>\r\n<p style=\"text-align: justify\">12. http:\/\/www.php.net\/<\/p>\r\n<p style=\"text-align: justify\">13. http:\/\/www.w3schools.com\/<\/p>\r\n<p style=\"text-align: justify\">14. http:\/\/www.tutorialspoint.com\/<\/p>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/0zP38G6eu6c\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Introduction<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Though, a file can be used to read and write data, the flat file has some limitations like<\/p>\n<ul>\n<li>When a file size is increased, working with flat file can be very slow<\/li>\n<li>Searching for a specific record(s) is difficult in flat file as it does not provide querying facility.<\/li>\n<li style=\"text-align: justify\">Managing simultaneous access of the records is problematic as though the lock mechanism is used for locking a file, it is not sufficient for managing concurrent access.<\/li>\n<li style=\"text-align: justify\">The file processing is sequential, so insert a new record or delete an existing record the process makes large overhead, especially in a large file.<\/li>\n<li style=\"text-align: justify\">File processing provides only file permission which is not sufficient to enforce different levels of access\u00a0 to data.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>The Relational Database Management System (RDBMS) helps to solve all of the above issues.<\/p>\n<ul>\n<li>RDBMSs can provide much faster access to data compare to the flat file.<\/li>\n<li>RDBMSs can be queried to extract specific record or set of records.<\/li>\n<li>RDBMSs have built-in mechanism for simultaneous access of the records.<\/li>\n<li>RDBMSs provide random access of the data.<\/li>\n<li>RDBMSs have built-in privilege systems which facilitates different levels of access to the data.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Relational Database System Concept<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Dr. E.F.Codd developed relation database model. Relational database eliminated some of the problems which are associated with standard file and other database. By using RDBMS , data redundancy can be reduced which helps to save disk storage and leads to efficient data retrieval. Today, Relational database is the de facto standard for database application.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Relational databases are the most commonly used type of databases. Relation databases are developed on the sound theoretical basis in relational algebra. It is not mandatory to understand relation algebra theory to use relational databases.<\/p>\n<p>&nbsp;<\/p>\n<p>Let us understand basic relational database concept.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Table<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Relational database is consists of relations. A relation is also called as tables. There are differences between relation and table, though these terms are used interchangeably. A table is structured made up of rows and columns. The following figure shows a sample table. This table stores information of customers.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Customer<\/strong><\/p>\n<p>&nbsp;<\/p>\n<table class=\"aligncenter\" style=\"height: 140px\">\n<tbody>\n<tr style=\"height: 28px\">\n<td style=\"height: 28px;width: 84.0625px\"><strong>CustomerID<\/strong><\/td>\n<td style=\"height: 28px;width: 115.063px\"><strong>Name<\/strong><\/td>\n<td style=\"height: 28px;width: 141.063px\"><strong>Address<\/strong><\/td>\n<td style=\"height: 28px;width: 79.0625px\"><strong>City<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 28px\">\n<td style=\"height: 28px;width: 84.0625px\">1<\/td>\n<td style=\"height: 28px;width: 115.063px\">Anand Mehta<\/td>\n<td style=\"height: 28px;width: 141.063px\">19- Rajni Society<\/td>\n<td style=\"height: 28px;width: 79.0625px\">Ahmedabad<\/td>\n<\/tr>\n<tr style=\"height: 28px\">\n<td style=\"height: 28px;width: 84.0625px\">2<\/td>\n<td style=\"height: 28px;width: 115.063px\">Bhavesh Rajvir<\/td>\n<td style=\"height: 28px;width: 141.063px\">25- Ravi Park<\/td>\n<td style=\"height: 28px;width: 79.0625px\">Rajkot<\/td>\n<\/tr>\n<tr style=\"height: 28px\">\n<td style=\"height: 28px;width: 84.0625px\">3<\/td>\n<td style=\"height: 28px;width: 115.063px\">Chetan Pandya<\/td>\n<td style=\"height: 28px;width: 141.063px\">22-Panchvati Society<\/td>\n<td style=\"height: 28px;width: 79.0625px\">Ahmedabad<\/td>\n<\/tr>\n<tr style=\"height: 28px\">\n<td style=\"height: 28px;width: 84.0625px\">4<\/td>\n<td style=\"height: 28px;width: 115.063px\">\u00a0Dharmarth Shah<\/td>\n<td style=\"height: 28px;width: 141.063px\">12 ABC Park<\/td>\n<td style=\"height: 28px;width: 79.0625px\">Ahmedabad<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: justify;font-size: 1em\">The table name is: Customer. Customer table has 4 columns which represent different piece of data and 4 rows that correspondent to individual customer.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Column<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Each column in a table represent different piece of data. For example, in the above customer table has 4 columns namely CustomerID,Name,Address and City. Every column in a table must have unique name. Each column is associated with a precise data type. For instance, in the above customer table CustomerID column has integer data type while Name, Address and city has string data type. Columns are also known as fields or attributes.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Row<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Each row in the table represents a record. For example, in the customer table there are 4 customers. It is not compulsory that a table must have same number of columns and rows. In the above customer table to demonstrate the concept of rows and columns there are 4 columns and 4 rows. Rows are also known as records or tuples.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Values<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Each row consists of a collection of individual values. The intersection of column and row is known as cell. Each cell represents a single value. Each value must have the data type as specified by its corresponding column.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Primary Key<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To uniquely identify a record in a table, the attribute or set of attribute is used. This attribute is known as primary key. In case the primary key consist of set of attributes, it is known as composite primary key. For example, in the customer table customerID is defined as primary key. The reason for defining customerID is a primary key is that names may be repeated for customers. You can be defined composite primary key consist of &#8211; Name, Address, City -attributes.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Primary key is used to main entity integrated for a table. Entity integrity ensures that the attribute must be unique within a table and cannot be null.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The table has primary key defined is referred as master table or parent table.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Foreign Key<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The database is relational database because there is a relation can be set between tables of the database. The relationship between tables is defined by using foreign key. CustomerID is a primary key for customer table. In Order table customerID can be defined as foreign key.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Foreign key is used to provide referential integrity between tables. Referential integrity means an attribute can take only values available in parent table. For instance, considered we have an order table. Then in order table only those customer can be placed order which are available in customer table.<\/p>\n<p>&nbsp;<\/p>\n<p>The table in which foreign key is defined is known as child table or detail table.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div>\n<p>\u00a0 \u00a0 The following figure depicts the relationship between customer and order table.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Customer<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-204 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97.png\" alt=\"\" width=\"631\" height=\"259\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97.png 631w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97-300x123.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97-65x27.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97-225x92.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-97-350x144.png 350w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>A table to qualify as a relation must have following characteristics.<\/p>\n<p>&nbsp;<\/p>\n<p>I. A table is recognized as 2-Dimensional structure combined of rows and columns.<\/p>\n<p>II. A table must have a unique name.<\/p>\n<p>III. Each column name must be unique name within the table.<\/p>\n<p>IV. Each row-column intersection represent a single data value (not multivalued, not composed)<\/p>\n<p>V. Each column has a specific range of values known as the attribute domain<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">VI.\u00a0The order rows and columns are not significant within a table.<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">VII.\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">Each row with the table must be unique. That means there cannot be two rows with exactly\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">the same values for all their columns.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong style=\"text-align: initial;font-size: 1em\">Schemas<\/strong><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The table design having attribute name, primary key and foreign key attribute is known as schema of a table. The complete set of table schemas is considered as database schema.<\/p>\n<p>&nbsp;<\/p>\n<p>Primary key is differentiated using underline.<\/p>\n<p>&nbsp;<\/p>\n<p>The schema for customer table is shown below<\/p>\n<p>&nbsp;<\/p>\n<p>Customer(CustomerID, Name, Address, City)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Relationships<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A relationship in a database table can be assigned. Hence this database is known as relation database. Foreign key is used to set relationship between data of two tables. For example, in the order and customer table customerid set relationship between order table and customer table.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">There are 3 types of relationship between two tables. These relationships are classified based on the records on each side of relation.<\/p>\n<p>&nbsp;<\/p>\n<p>1. One-to-one relationship<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">2. One-to-many relationship<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">3. Many-to-many relationship<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">One-to-one relationship: A one-to-one relationship make sure that the record from one table to another matches only one. For example, the relationship between bank AccountNumber and bank customer is one-to-one. Each accountnumber is associated with only one customer.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">One-to-many relationship: A one-to-many relationship allows record from one table to matches many records from another table. For example, the relationship between bank customer and accountnumber is one-to-many as one customer can have many bank-accounts. Many \u2013to-one relationship is another type of relation which is the same as one-to-many relationship with only difference in direction.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Many-to-many relationship: In many-to-many relationship, records from one table matches records to another table. For example, the relationship between author and book is many-to-many as one book can have many authors and one author can write many books.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Database Design<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Database is generally designed by database administrator (DBA) or database design specialist. Generally, DBA or database specialist design database for large database which has thousands of users. For small and medium size web sites, the database for the website is often design by the web programmer.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Database design affects to use SQL to work with database. In general, a well-designed database is easy to understand and query, while a poorly designed database is difficult to work with.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A relational database system should model the real-world environment where it is used. The job a designer is to analyze and to map the real world environment into relational database system. An entity or object in real world is represented as a table in relational database. The attributes of real world entity is become attributes of table and each row of a table represents one instance of the entity. In simple way, you can say that a relational table is an entity set and a record of a relation table is an entity. Though in spoken world, entity is also used to represent entity set.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To model a database and the relationship between relations after a real world system, ER (Entity-Relationship) modeling is used.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>The six basic steps for designing data structure of database<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>1. Recognize data elements<\/p>\n<p>2. Subdivide data elements into smallest useful elements<\/p>\n<p>3. Identify tables and assign the columns<\/p>\n<p>4. Find the primary key and foreign key<\/p>\n<p>5. Check whether the data structure is normalized<\/p>\n<p>6. Identify the indexes<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1.\u00a0<\/strong><strong>Identify data elements<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p style=\"text-align: justify\">Data elements are identified by many ways. It is depend on the nature of the system. It includes analyzing existing system if it is available, interviewing users, evaluating comparable systems. The documents used by a real world system (i.e. invoice) is helped to identify the data elements of the system. Once data elements are identified begin to think\u00a0<span style=\"text-align: initial;font-size: 1em\">about the entities which are associated with these elements. This will help to identify tables of database.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>2.\u00a0\u00a0<\/strong><strong>Subdivide data elements into smallest useful elements<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">If a data element consists of two or more component, then it should be subdividing the element into those components. At what extent to subdivide the data element depends on how it will be used. Because it is difficult to predict all the future uses for the data, most designers subdivide data elements as much as possible. For example, the attribute name : Tejas Trivedi consist of firstname Tejas and lastname Trivedi, It is subdivided into two attributes(fields) named firstname and lastname. The data element can be easily rebuild by concatenating subdivided data elements.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>3.\u00a0<\/strong><strong>Identify tables and assign the columns<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">After the identification and subdivision of all data elements of database group them by entities with which they are associated. These entities will later become tables of the database and the data elements will become attributes of a table. In case a data element relates to more than one entity, it can be included for all the entities it relates to. The duplicates data elements can be removed when the database is normalized. At this step, elements can be excluded that are not required and any additional element can be added.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.\u00a0<\/strong><strong>Identify the primary key and foreign key<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Each table should have a primary key. If possible, an existing column should be used as primary key. In case, an existing column is not suitable to define primary key, an ID column can be defined as primary key which is auto increment by 1 for each record. Keep in mind that the value of primary key is not changed or seldom changed.<\/p>\n<p>&nbsp;<\/p>\n<p>If two tables have one-to-one relationship, they should be related by their primary keys.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">If two tables have one-to-many relationship, a foreign key is defined to the many side of table. The foreign key must have the same data type as the primary key column which is related with.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">If two tables have many-to-many relationship, a third new table (linking table) is required to relate these two tables. So each table of many-to-many relationship will have a one-to-many relationship with the linking table. The linking table is consist of primary key of two tables. Generally, linking table does not have a primary key as it is only used to relate the two tables.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.\u00a0<\/strong><strong>Review whether the data structure is normalized<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Normalization is a process to reduce data redundancy and anomalies. There are various normal forms (NFs) named \u2013 First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), Forth Normal Form (4NF) , Fifth Normal Form (5NF), Domain Key Normal Form(DKNF).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">2NF is better than 1NF. 3NF is better than 2NF, BCNF is better than 3NF and so on.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">For the most business database design process, 3NF is sufficient. The highest level normal form is not always most desirable.<\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"font-size: 1em\">Keys and Functional Dependency<\/strong><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"font-size: 1em\">Key: <\/strong><span style=\"font-size: 1em\">The key is an attribute or set of attributes which determine other attribute or attributes. If you know the value of attribute A, then you can determine the value of attribute B.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"font-size: 1em\">Functional Dependency: <\/strong><span style=\"font-size: 1em\">The value of attribute or attributes determines the value of another attribute or attributes. If the value of attribute A determines the value of attribute B, then it is said as A-&gt;B (read as A functionally determines B). In that case, A (the left hand side attribute or attributes) is known as determinant or functional determinant and B (the right hand side attribute or attributes) is known as dependent or functional dependent.<\/span><\/p>\n<div>\n<p style=\"text-align: left\">The following table shows characteristics for each normal-form.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-205 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98.png\" alt=\"\" width=\"656\" height=\"338\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98.png 656w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98-300x155.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98-65x33.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98-225x116.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-98-350x180.png 350w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/p>\n<p style=\"text-align: center\">The table is not in normal form, and then it is considered as in 0th normal form.<\/p>\n<p>&nbsp;<\/p>\n<p>To convert the above relation into 1 NF,<\/p>\n<p>&nbsp;<\/p>\n<p>I.\u00a0 there are not any multivalued attributes and<\/p>\n<p>II.\u00a0 Every attribute value is atomic<\/p>\n<p>III. Define Primary key<\/p>\n<p>&nbsp;<\/p>\n<p>So, let us make the table as below.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-206 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99.png\" alt=\"\" width=\"650\" height=\"148\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99.png 650w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99-300x68.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99-65x15.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99-225x51.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-99-350x80.png 350w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-207 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100.png\" alt=\"\" width=\"647\" height=\"83\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100.png 647w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100-300x38.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100-225x29.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-100-350x45.png 350w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div>\n<p style=\"text-align: left\">\u00a0 \u00a0 The primary key of the above relation is (orderID, ProductID)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">Functional dependencies for the relation in 1 NF.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">OrderID,ProductID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress<\/p>\n<p style=\"text-align: left\">ProductDescription, ProductFinish, UnitPrice ,OrderedQuantity<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">If all the relations of a database is in 1NF, then the database is called in 1NF.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">There are anomalies in 1NF. The anomalies are I. insertion anomaly II. Update anomaly and III. Delete anomaly.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">Let us understand these anomalies using an example.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">The above relation has composite primary key (orderID, ProductID).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">New product cannot be added without order. So, there is an insertion anomaly.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">If Dining table delete from orderID 1611, then information related to the product finish and unit price is also lost. So, there is delete anomaly.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">If the price of\u00a0 productid 4 is changed, then it is required to be updated in multiple records.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">So, there is an update anomaly.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">Let us note down functional dependencies for the relation in 1 NF.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">OrderID,ProductID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress ProductDescription, ProductFinish, UnitPrice ,OrderedQuantity<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">Relation Name: Order_customer_product<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-208 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101.png\" alt=\"\" width=\"649\" height=\"214\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101.png 649w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101-300x99.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101-65x21.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101-225x74.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-101-350x115.png 350w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>As all the relation are in 1NF, the database is in 1NF.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 1em;text-align: initial\">Now to normalize table into 2 NF, there must be fully functional dependencies.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\"><strong>Fully functional dependency: <\/strong>If attribute B is functionally dependent on a key A but not on any subset of key A, then attribute B is fully functionally dependent on attribute A. This generally happens when attribute A is composite key.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">In the above relation , there is a partial functional dependency for functional dependnecy<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">OrderID,ProductID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress ProductDescription, ProductFinish, UnitPrice ,OrderedQuantity<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">To determine OrderDate, CustomerID, CustomerName, CustomerAddress only OrderID is required. There is no need for productID.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">To determine ProductDescription, ProductFinish and UnitPrice only productID is required.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">There is no need for orderID.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">So it is not fully functional dependency.\u00a0 Following attribute shows functional dependency<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">OrderID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress<\/p>\n<p style=\"text-align: left\">ProductID -&gt; ProductDescription, ProductFinish, UnitPrice<\/p>\n<p style=\"text-align: left\">OrderID, ProductID -&gt; OrderedQuantity<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-209 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102.png\" alt=\"\" width=\"351\" height=\"514\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102.png 351w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102-205x300.png 205w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102-65x95.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102-225x329.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-102-350x513.png 350w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/p>\n<\/div>\n<div><\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-210 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-103.png\" alt=\"\" width=\"280\" height=\"239\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-103.png 186w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-103-65x56.png 65w\" sizes=\"auto, (max-width: 280px) 100vw, 280px\" \/><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>All the relation are in 2NF, the database is in 2NF.<\/p>\n<p>&nbsp;<\/p>\n<p>Now to normalize table into 3NF, there must not be transitive functional dependencies.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Transitive functional dependency: <\/strong>If attribute A is functionally determine attribute B, and attribute B functionally determine attribute C, then attribute C is transitively functional dependent on attribute A.<\/p>\n<p>&nbsp;<\/p>\n<p>In the above relation , there is a transitive functional dependency for<\/p>\n<p>&nbsp;<\/p>\n<p>OrderID -&gt; OrderDate, CustomerID, CustomerName, CustomerAddress<\/p>\n<p>&nbsp;<\/p>\n<p>The reason is OrderID -&gt; CustomerID and<\/p>\n<p>&nbsp;<\/p>\n<p>CustomerID -&gt; CustomerName, CustomerAddress<\/p>\n<p>&nbsp;<\/p>\n<p>So, the relations are in 3NF.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-211 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-104.png\" alt=\"\" width=\"230\" height=\"327\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-104.png 230w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-104-211x300.png 211w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-104-65x92.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-104-225x320.png 225w\" sizes=\"auto, (max-width: 230px) 100vw, 230px\" \/><\/p>\n<p>In the order relation customerID is foreign key referencing customerID attributeof Customer relation.<\/p>\n<p>&nbsp;<\/p>\n<p>To summarize the original relation is converted into following relations to normalize upto 3NF.<\/p>\n<\/div>\n<div>\n<p>\u00a0 \u00a0 \u00a0ProductID -&gt; ProductDescription, ProductFinish, UnitPrice<\/p>\n<p>&nbsp;<\/p>\n<p>CustomerID -&gt; CustomerName, CustomerAddress<\/p>\n<p>&nbsp;<\/p>\n<p>OrderID -&gt; orderdate, CustomerID<\/p>\n<p>&nbsp;<\/p>\n<p>OrderID, ProductID -&gt; OrderedQuantity<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-212 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-105.png\" alt=\"\" width=\"286\" height=\"555\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-105.png 286w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-105-155x300.png 155w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-105-65x126.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-105-225x437.png 225w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-213 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-106.png\" alt=\"\" width=\"222\" height=\"257\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-106.png 222w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-106-65x75.png 65w\" sizes=\"auto, (max-width: 222px) 100vw, 222px\" \/><\/p>\n<\/div>\n<ol start=\"6\">\n<li><strong>Identify the indexes<\/strong><\/li>\n<\/ol>\n<p><strong>\u00a0<\/strong><\/p>\n<p>The index should be created for<strong>\u00a0<\/strong><\/p>\n<ul>\n<li>When the column is Foreign key<\/li>\n<li>When the column is used frequently in search condition or join<\/li>\n<li>When the column has large number of distinct values<\/li>\n<li>When the column is not updated frequently.<\/li>\n<li style=\"text-align: justify\">An index is a structure which provides for location one or more rows directly. Without index, the entire table has to scan for matching criteria. In case, index is not created then to search particularly records may take more time.<\/li>\n<li>By Default MySQL create index for primary key and unique constraint.<\/li>\n<li style=\"text-align: justify\">A composite index can be created which consist of two or more columns. Composite index is created for columns which are not updated frequently or when the index will cover almost every search condition on the table.<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Introduction to relation databases<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/0zP38G6eu6c\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>References:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1. Luke Welling, Laura Thomson: PHP and MySQL Web Development, Pearson,<\/p>\n<p style=\"text-align: justify\">2. W. Jason Gilmore: Beginning PHP and MySQL 5 From Novice to Professional, Apress<\/p>\n<p style=\"text-align: justify\">3. Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass:Beginning PHP5, Apache, and MySQL Web Development, Wrox,<\/p>\n<p style=\"text-align: justify\">4. Robin Nixon: Learning PHP, MySQL, and JavaScript, O&#8217;Reilly Media<\/p>\n<p style=\"text-align: justify\">5. Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove: Professional PHP,Wrox<\/p>\n<p style=\"text-align: justify\">6. Tim Converse, Joyce Park, Clark Morgan: PHP5 and MySQL Bible<\/p>\n<p style=\"text-align: justify\">7. Joel Murach, Ray Harris: Murach\u2019s PHP and MySQL, Shroff\/Murach<\/p>\n<p style=\"text-align: justify\">8. Ivan Bayross, Web Enabled Commercial Application Development Using HTML\/Javascript\/DHTML\/PHP , BPB Publications<\/p>\n<p style=\"text-align: justify\">9. Joel Murach, \u201cMurach\u2019s MySQL\u201d, Shroff\/Murach<\/p>\n<p style=\"text-align: justify\">10. Julie C. Meloni, Sams Teach Yourself PHP, MySQL and Apache All in One, Sams<\/p>\n<p style=\"text-align: justify\">11. Larry Ullman, PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Pearson Education<\/p>\n<p style=\"text-align: justify\">12. http:\/\/www.php.net\/<\/p>\n<p style=\"text-align: justify\">13. http:\/\/www.w3schools.com\/<\/p>\n<p style=\"text-align: justify\">14. http:\/\/www.tutorialspoint.com\/<\/p>\n","protected":false},"author":3,"menu_order":20,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-hiren-joshi"],"pb_section_license":""},"chapter-type":[],"contributor":[59],"license":[],"class_list":["post-200","chapter","type-chapter","status-publish","hentry","contributor-dr-hiren-joshi"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":8,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/200\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/200\/revisions\/507"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/200\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapter-type?post=200"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/contributor?post=200"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/license?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}