Skip to main content

SQL Set Operators

SQL Set Operators   Traditional Set Operators: Union Compatibility:     Requirement for the traditional set operators.    Strong requirement.                         - Same number of columns.                         - Each corresponding column is compatible.                         - Positional correspondence.     Apply to similar tables by removing columns first. SQL UNION Example:           Example 1: Retrieve basic data about all university people.                     SELECT FacNo AS PerNo, FacFirstName                                      ...

Link List

 

Link List 

Explanation: 

            A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using references (pointers). a linked list consists of nodes where each node contains a data field and a reference(link) to the next node in the list.


info- = Data Next= Link= Pointer to next node


            In Link-list Each element or Node, of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. The entry point into a linked list is called the head of the list. It should be noted that head is not a separate node, but the reference to the first node. If the list is empty then the head is a null reference.

            A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and shrink on demand. Any application which has to deal with an unknown number of objects will need to use a linked list.

Types Of Linked List: 

A singly linked list:

Described in lecture

Node(data+link) 

Last link=Null 

Traverse in only One Direction 

A doubly linked list:

            A doubly linked list is a list that has two references, one to the next node and another to previous node.


            A Doubly Linked List contains an extra pointer, typically called previous pointer, together with next pointer and data which are there in singly linked list. here we are storing the address of the next as well as the previous nodes.

            The nodes are connected to each other in this form where the first node has  previous = NULL and the last node has next = NULL.

Circular Linked List:

            A circular linked list is either a singly or doubly linked list in which there are no NULL values. We can implement the Circular Linked List by making the use of Singly or Doubly Linked List.
            In the case of a singly linked list, the next of the last node contains the address of the first node.


            In case of a doubly-linked list, the next of last node contains the address of the first node and previous of the first node contains the address of the last node.

Operations on Link List:

Traversal:         To traverse all the nodes one after another. 
Insertion:          To add a node at the given position. 
Deletion:           To delete a node. 
Searching:        To search an element(s) by value. 
Updating:         To update a node. 
Sorting:            To arrange nodes in a linked list in a specific order. 
Merging:          To merge two linked lists into one.







Our Official Website : Web Conquerors (https://www.webconquerors.com/) 

Want to get digital services? Contact US

Want to know about our services? Our Services


Comments

Popular posts from this blog

  d. Insert a new row in the Location table related to the Facility row in modification problem (c). The new row should have “Door” for the location name. Query Formulation + Result Snapshot Our Official Website :  Web Conquerors  (https://www.webconquerors.com/)  Want to get digital services?  Contact US Want to know about our services?  Our Services

SQL Set Operators

SQL Set Operators   Traditional Set Operators: Union Compatibility:     Requirement for the traditional set operators.    Strong requirement.                         - Same number of columns.                         - Each corresponding column is compatible.                         - Positional correspondence.     Apply to similar tables by removing columns first. SQL UNION Example:           Example 1: Retrieve basic data about all university people.                     SELECT FacNo AS PerNo, FacFirstName                                      ...

Correction For ERD

 d. For each consistency error in Figure 1, you should identify the consistency rule violated and suggest possible resolutions of the error. The ERD has generic names to help will concentrate on finding diagram errors rather than focusing on the meaning of the diagram. Answer:                Entity6 is violation of the Primary key rule. As there are 3 attributes from within Entity6 that are marked as primary key. Entity6 also violates the Identifying relationship rule, as there is no foreign key in the Entity6 table to identify the item from Entity7. Since this a weak entity type, the cardinality must be 1:1, which it is not. Entity2 is a violation of the Identifying relationship rule due to it not being a weak entity type when there is an identifying relationship. Our Official Website :  Web Conquerors  (https://www.webconquerors.com/)  Want to get digital services?  Contact US Want to know about our services?  ...