computer-nec-license
  • NEC-Computer
  • 1. Concept of Basic Electrical and Electronics Engineering
    • 1.1 Basic Concepts
    • 1.2 Network Theorems
    • 1.3 Alternating Current Fundamentals
    • 1.4 Semiconductor Device
    • 1.5 Signal Generator
    • 1.6 Amplifiers
    • MCQs
      • MCQs On Basic Electrical
        • set-1
        • set-2
      • MCQs On Basic Electronics
        • set-1
        • set-2
  • 2. Digital Logic and Microprocessor
    • 2.1 Digital Logic
    • 2.2 Combinational & Arithmetic Circuit
    • 2.3 Sequential Logic Circuits
    • 2.4 Microprocessor
    • 2.5 Microprocessor System
    • 2.6 Interrupt Operations
    • MCQs
      • MCQs On Digital Logic
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
        • set-10
        • set-11
        • set-12
      • MCQs On Microprocessor
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
  • 3. Programming Language and Its Applications
    • 3.1 Introduction to C Programming
    • 3.2 Pointers, Structures, and Data Files
    • 3.3 C++ Language Constructs with Objects and Classes
    • 3.4 Features of Object-Oriented Programming
    • 3.5 Pure Virtual Functions and File Handling
    • 3.6 Generic Programming and Exception Handling
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
  • 4. Computer Organization and Embedded System
    • 4.1 Control and CPU
    • 4.2 Computer Arithmetic and Memory System
    • 4.3 I/O Organization and Multiprocessor
    • 4.4 Embedded System Design
    • 4.5 Real-Time Operating and Control Systems
    • 4.6 Hardware Description Language (VHDL) and IC Technology
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
      • set-10
      • set-11
  • 5. Concept of Computer Network and Network Security System
    • 5.1 Introduction to Computer Networks
    • 5.2 Data Link Layer
    • 5.3 Network Layer
    • 5.4 Transport Layer
    • 5.5 Application Layer
    • 5.6 Network Security
    • MCQs
      • Basic Networking
        • set-1
        • set-2
      • Advanced Networking
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
  • 6. Theory of Computation and Computer Graphics
    • 6.1 Introduction to Finite Automata
    • 6.2 Introduction to Context-Free Languages (CFL)
    • 6.3 Turing Machines (TM)
    • 6.4 Introduction to Computer Graphics
    • 6.5 Two-Dimensional Transformation
    • 6.6 Three-Dimensional Transformation
    • MCQs
      • MCQs on Theory of Computation
        • set-1
        • set-2
        • set-3
      • MCQs On Computer Graphics
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
  • 7. Data Structures and Algorithm, Database System and Operating System
    • 7.1 Introduction to Data Structures, Lists, Linked Lists, and Trees
    • 7.2 Sorting, Searching, Hashing and Graphs
    • 7.3 Introduction to Data Models, Normalization, and SQL
    • 7.4 Transaction Processing, Concurrency Control, and Crash Recovery
    • 7.5 Introduction to Operating System and Process Management
    • 7.6 Memory Management, File Systems, and System Administration
    • MCQs
      • MCQs ON DSA
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
      • MCQs On DBMS
        • set-1
        • set-2
      • MCQs On Operating System
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
        • set-10
        • set-11
        • set-12
  • 8. Software Engineering and Object-Oriented Analysis & Design
    • 8.1 Software Process and Requirements
    • 8.2 Software Design
    • 8.3 Software Testing, Cost Estimation, Quality Management, and Configuration Management
    • 8.4 Object-Oriented Fundamentals and Analysis
    • 8.5 Object-Oriented Design
    • 8.6 Object-Oriented Design Implementation
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
  • 9. Artificial Intelligence and Neural Networks
    • 9.1 Introduction to AI and Intelligent Agents
    • 9.2 Problem Solving and Searching Techniques
    • 9.3 Knowledge Representation
    • 9.4 Expert System and Natural Language Processing
    • 9.5 Machine Learning
    • 9.6 Neural Networks
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
  • 10. Project Planning, Design and Implementation
    • 10.1 Engineering Drawings and Its Concepts
    • 10.2 Engineering Economics
    • 10.3 Project Planning and Scheduling
    • 10.4 Project Management
    • 10.5 Engineering Professional Practice
    • 10.6 Engineering Regulatory Body
    • MCQs
      • MCQs On Engineering Drawing
        • set-1
        • set-2
      • MCQs On Engineering Economics
      • MCQs On Project Planning & Scheduling
      • MCQs On Project Mangement
      • MCQs On Engineering Professional Practice
      • MCQs On Engineering Regulatory Body
  • Questions Sets
    • Set 1 (Chaitra, 2080)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Set 2 (Aasadh, 2081)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Set 3 (Asojh, 2080)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Model Set - Computer Engineering By NEC
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Model Set - Software Engineering By NEC
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
  • Tips & Tricks
Powered by GitBook
On this page
  • 1. Data Abstraction and Data Independence
  • 2. Schema and Instances
  • 3. Entity-Relationship (E-R) Model
  • 4. Normalization and Normal Forms
  • 5. Functional Dependencies, Integrity Constraints, and Domain Constraints
  • 6. Relations (Joined, Derived)
  • 7. SQL: Data Definition Language (DDL) and Data Manipulation Language (DML)
  • 8. Relational Algebra
  • 9. Query Cost Estimation, Optimization, and Decomposition
  • Conclusion
  1. 7. Data Structures and Algorithm, Database System and Operating System

7.3 Introduction to Data Models, Normalization, and SQL

In database management, data models define how data is structured and managed, while normalization ensures data integrity and efficiency. SQL is the language used to interact with relational databases, enabling the creation, modification, and querying of data.


1. Data Abstraction and Data Independence

  • Data Abstraction: The process of hiding the complex implementation details and showing only the essential features of data. There are three levels of abstraction:

    • Physical Level: Describes how data is stored on disk.

    • Logical Level: Describes what data is stored and the relationships among the data.

    • View Level: The way the data is presented to users.

  • Data Independence: The ability to change the schema at one level without affecting the schema at the next higher level.

    • Physical Data Independence: The ability to change the physical storage without affecting the logical structure.

    • Logical Data Independence: The ability to change the logical schema without changing the external schema or application programs.


2. Schema and Instances

  • Schema: The structure of the database, described by its tables, fields, and relationships. It defines the database's organization and constraints.

    • Physical Schema: Describes the physical storage of the data.

    • Logical Schema: Describes the logical structure, like tables, views, indexes, etc.

  • Instance: A snapshot of the data at a particular point in time. The instance represents the actual data stored in the database.


3. Entity-Relationship (E-R) Model

  • The E-R Model is a high-level conceptual data model that represents the data and its relationships in the form of entities and their connections (relationships).

Key Components of E-R Model:

  • Entity: An object or thing in the real world that is distinguishable from other objects. E.g., Student, Course.

  • Attributes: Properties or characteristics of an entity. E.g., Name, Age, ID.

  • Entity Sets: A collection of similar types of entities. E.g., all students in a school.

  • Keys: Attributes that uniquely identify an entity within an entity set. E.g., StudentID.

Types of Entity Sets:

  • Strong Entity Set: An entity set that can exist independently. It has a primary key.

  • Weak Entity Set: An entity set that cannot exist without a strong entity set. It doesn't have a primary key but can be identified by a combination of attributes from the strong entity and its own attributes.

E-R Diagram: A visual representation of entities, their attributes, and relationships in a database system.


4. Normalization and Normal Forms

Normalization is the process of organizing data to minimize redundancy and dependency, and to ensure data integrity.

Initial Unnormalized Table (UNF)

Consider a table that stores student, class, and teacher information:

StudentID

StudentName

ClassID

ClassName

TeacherID

TeacherName

Subjects

1

John Doe

101

Science

T1

Mr. Smith

Physics, Chemistry

2

Jane Doe

102

Mathematics

T2

Ms. Johnson

Algebra, Geometry


First Normal Form (1NF):

Rules:

  • Each column contains atomic (indivisible) values.

  • No repeating groups or arrays within columns.

Conversion: Split the multi-valued field Subjects into separate rows.

StudentID

StudentName

ClassID

ClassName

TeacherID

TeacherName

Subject

1

John Doe

101

Science

T1

Mr. Smith

Physics

1

John Doe

101

Science

T1

Mr. Smith

Chemistry

2

Jane Doe

102

Mathematics

T2

Ms. Johnson

Algebra

2

Jane Doe

102

Mathematics

T2

Ms. Johnson

Geometry


Second Normal Form (2NF):

Rules:

  • Satisfies 1NF.

  • All non-key attributes must be fully functionally dependent on the primary key.

  • Remove partial dependencies (where non-key attributes depend only on part of a composite key).

Analysis:

  • In this table, the composite primary key is (StudentID, Subject).

  • Attributes like ClassName, TeacherID, and TeacherName depend only on ClassID, not the entire key.

Conversion: Split the table into two:

Table 1: Student_Subject

StudentID

Subject

ClassID

1

Physics

101

1

Chemistry

101

2

Algebra

102

2

Geometry

102

Table 2: Class_Teacher

ClassID

ClassName

TeacherID

TeacherName

101

Science

T1

Mr. Smith

102

Mathematics

T2

Ms. Johnson


Third Normal Form (3NF):

Rules:

  • Satisfies 2NF.

  • Remove transitive dependencies (where non-key attributes depend on other non-key attributes).

Analysis:

  • In Class_Teacher, TeacherName depends on TeacherID, not directly on ClassID.

Conversion: Split Class_Teacher into two tables:

Table 2a: Class_Info

ClassID

ClassName

TeacherID

101

Science

T1

102

Mathematics

T2

Table 2b: Teacher_Info

TeacherID

TeacherName

T1

Mr. Smith

T2

Ms. Johnson


Boyce-Codd Normal Form (BCNF):

Rules:

  • Satisfies 3NF.

  • For every functional dependency, the left-hand side must be a superkey.

Analysis:

  • All functional dependencies in the current tables satisfy BCNF since the left-hand side of each dependency is a candidate key.

  • No further decomposition is needed.


5. Functional Dependencies, Integrity Constraints, and Domain Constraints

  • Functional Dependency (FD): A relationship between two sets of attributes in a relation where one set (the determinant) uniquely determines the other set.

    • Example: In a relation (StudentID, StudentName), StudentID → StudentName indicates that the StudentID uniquely determines the StudentName.

  • Integrity Constraints: Rules that ensure the accuracy and consistency of data.

    • Entity Integrity: Ensures that the primary key of a table is unique and not null.

    • Referential Integrity: Ensures that foreign keys match primary keys in related tables.

  • Domain Constraints: Specifies that the values in an attribute must come from a specific domain (set of allowed values).


6. Relations (Joined, Derived)

  • Relational Model: Represents data as a set of relations (tables), where each relation consists of tuples (rows) and attributes (columns).

Types of Relations:

  • Joined Relations: Combining data from two or more tables based on a common attribute (e.g., using SQL JOIN).

  • Derived Relations: Relations that are not stored in the database but can be derived from other relations via queries or views.


7. SQL: Data Definition Language (DDL) and Data Manipulation Language (DML)

  • DDL (Data Definition Language): Used to define the structure of the database, including tables, views, and schema.

    • Commands: CREATE, ALTER, DROP, TRUNCATE.

  • DML (Data Manipulation Language): Used to manage and manipulate data within the tables.

    • Commands: SELECT, INSERT, UPDATE, DELETE.

Views: Virtual tables that are defined by SQL queries. Views do not store data but can simplify complex queries.

Assertions and Triggering:

  • Assertions: Used to specify conditions that must hold for all data in the database.

  • Triggers: Procedural code that is automatically executed in response to certain events on a table or view (e.g., AFTER INSERT, BEFORE DELETE).


8. Relational Algebra

Relational Algebra is a formal language for querying relational databases. It consists of a set of operations that take one or more relations as input and produce a new relation as output.

Common Operations in Relational Algebra:

  • Selection (σ): Filters rows based on a specified condition.

  • Projection (π): Selects columns from a relation.

  • Union (∪): Combines the tuples from two relations.

  • Intersection (∩): Returns the common tuples between two relations.

  • Difference (−): Returns tuples from one relation that are not in another.

  • Join (⨝): Combines tuples from two relations based on a matching condition.


9. Query Cost Estimation, Optimization, and Decomposition

  • Query Cost Estimation: The process of estimating the cost (in terms of time, resources, etc.) required to execute a query.

    • This includes evaluating the cost of different query execution plans.

  • Query Optimization: The process of improving the efficiency of a query by selecting the best execution plan. This can be done by:

    • Minimizing the number of joins.

    • Using indexes.

    • Rewriting queries.

  • Query Decomposition: The process of breaking down a complex query into smaller subqueries that are easier to execute.


Conclusion

Data models, normalization, and SQL are the core concepts of database management systems. Understanding these concepts allows for efficient data storage, retrieval, and management. Normalization ensures that the database is free of redundant data, while SQL provides the means to interact with and manipulate the data in a structured way.

Previous7.2 Sorting, Searching, Hashing and GraphsNext7.4 Transaction Processing, Concurrency Control, and Crash Recovery

Last updated 4 months ago