List functions in Python
Length of List len() is used to determine the length of any list in python. Syntax- len(List_name) type() function This function is used to determine the data type of items in list. Syntax- type(List_name) list() Builder list() function is used to construct a list from given items. Syntax- list() Access Items in List List Items…
LIST in Python
About LIST Lists are used to store multiple items in a single variable. List items are ordered, changeable, and allow duplicate values. List items are indexed, the first item has index [0], the second item has index [1] and last item has index [n-1] , where n is the no. of elements in list. The…
Basic SQL Commands
1. CREATE DATABASE It is used to create a new database. Syntax: CREATE DATABASE database_name; Example: CREATE DATABASE school; 2. USE It is used to select a database before performing any operation. Syntax: USE database_name; Ex.- USE school; 3. CREATE TABLE It is used to create a new table inside a database….
Components of DBMS
1.Primary Key Uniquely identifies each record in a table. Cannot contain NULL values. Each table can have only one primary key. Example: Roll no., Aadhar no. etc. 2.Candidate Key All attributes that can uniquely identify a record. From these, one key is chosen as the Primary Key. Example: Roll_No, Aadhar_No, and Email can all uniquely…
Types of Database Models
Here are the examples of different types of DBMS. 1. Hierarchical DBMS (Tree Structure) Structure: Data stored in a tree-like structure (Parent → Child relationship). Each child has only one parent, but one parent can have many children. Example: Windows Registry IBM Information Management System (IMS) Organization structure example– Principal ├── Teacher │ ├── Student1…
DBMS-MySQL
DBMS (Database Management System) 1. Introduction DBMS stands for Database Management System. It is used to store, manage, and retrieve data efficiently. Example: MySQL, Oracle, SQL Server, MS Access, PostgreSQL. 2. Database A database is a collection of related data. It stores data in an organized form (tables). Example: A…
Python Text File Programs
1.Create a text file “intro.txt” in python and ask the user to write a single line of text by user input.
r+ , w+ and a+ Modes in Text File
1. Meaning of r+ , w+ and a+ These modes are read + write combination modes. They allow both reading and writing operations on a file. r+ Mode (Read and Write) Opens file for both reading and writing. File must exist, otherwise error. Writing starts from the beginning of the…
