Coder Baba
2.42K subscribers
1.01K photos
23 videos
722 files
723 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
Avoid the Pitfalls of "Auto Shrink" in SQL Server!

📢 Introduction: Database administrators, beware of the Auto Shrink option in SQL Server. While it may seem convenient, enabling it could lead to more headaches than solutions. Let's explore why it's best to think twice before flicking that switch.

🚫 Resource Drain: Enabling Auto Shrink means constant file resizing, hogging valuable I/O, CPU, and locking resources. Picture a server juggling tasks amidst a never-ending resizing dance. Not a pretty sight, huh?

🔗 Index Woes: Shrinking databases spells trouble for indexes, fragmenting them and slowing down queries. Think of it like a puzzle missing pieces—queries struggle to piece together the data efficiently.

📉 Performance Hit: Auto Shrink can slam the brakes on performance. Shrinking followed by data operations? Get ready for a slowdown. It's like hitting traffic after a quick detour.

🔒 Locking Chaos: The Auto Shrink task competes for resources, potentially disrupting regular operations. Balancing shrinking needs with daily tasks is key.

📌 Conclusion: Ditch Auto Shrink and opt for manual sizing instead. Keep your databases tidy and spacious, just like a well-organized closet. No unnecessary resizing clutter allowed! #SQLServer #DatabaseManagement #PerformanceTips #IndexFragmentation #ResourceManagement 🛠📊
👍1
Avoid the Auto Shrink Trap in SQL Server!

Here's why enabling auto shrink is a big no-no for your database:

🧩 Index Fragmentation: Auto shrink leads to fragmented indexes, hampering database performance.

💻 Resource Drain: Shrink operations gobble up IO and CPU resources, causing disk queues and timeouts.

🔄 File System Fragmentation: Shrinking and growing files repeatedly results in file-system fragmentation, slowing performance.

📈 Disk Fragmentation: Incremental growth and shrinkage lead to disk fragmentation, causing performance issues.

Server Slowdown: Shrinking is a heavy operation, slowing down your database server significantly.

🎲 Unpredictable: Auto shrink can kick in at any time, even during peak hours, making it unpredictable and potentially disruptive.

Avoid the auto shrink headache and keep your database running smoothly! #DatabaseManagement #PerformanceIssues #ResourceDrain 🛑💡
👍2
EDITABLE RESUME.docx
36.4 KB
🚀 Boost Your Job Search with an ATS-Friendly Resume! 🚀

Introducing the ultimate game-changer: a single-column resume template with an incredible ATS score of over 92! 🤯

I personally used this template during my own job hunt and saw amazing results.
🌟 Now, I'm excited to share the exact editable template with you! 🤩

Say goodbye to the frustration of your resume getting lost in the black hole of Applicant Tracking Systems (ATS), and hello to increased visibility and more interview opportunities! 💼

Ready to take your job search to the next level?
Join my Telegram channel ( @coder_baba ) to grab your copy of this game-changing resume template! 📄
#coderbaba #coder_baba #resume #ATSFree
#JobSearchTips #ResumeTemplate #ATSFriendly #CareerAdvice #JobHuntingSuccess 💼🔑
1
Coder Baba pinned a file
Understanding Primary Constructors in C#

Objective:
Explore the concept of primary constructors in C# and understand their significance in simplifying class initialization.

Introduction:
C# 12 introduced primary constructors, a feature widely used in modern programming. They offer a streamlined approach to class initialization, making code cleaner and more efficient.

Why do we need them?
Traditionally, when injecting something into classes or records, we needed to introduce backing fields for internal use. This approach was almost the same:

Introduction of backing fields
Introduction of constructor
Initialization of the original field in the constructor
Use internally
The Role of Primary Constructors:
With primary constructors, achieving the same result is much simpler:

Declare the dependency in the primary constructor
Use internally
This results in a much simpler process, eliminating the need for additional fields and constructors.

Assignment Tasks:

Explore the concept of primary constructors in C#.
Implement primary constructors in a sample class or record.
Compare the simplicity of using primary constructors with traditional approaches.
Share your findings and insights.
Conclusion:
Primary constructors in C# offer a more elegant and concise way to initialize classes, simplifying code and enhancing readability. Embrace this feature to streamline your programming experience.

🚀 Have you tried using primary constructors in your code? Share your experience with us! 🔍
Understanding Primary Constructors in C#

Objective:
Explore the concept of primary constructors in C# and understand their significance in simplifying class initialization.

Introduction:
C# 12 introduced primary constructors, a feature widely used in modern programming. They offer a streamlined approach to class initialization, making code cleaner and more efficient.

Why do we need them?
Traditionally, when injecting something into classes or records, we needed to introduce backing fields for internal use. This approach was almost the same:

Introduction of backing fields
Introduction of constructor
Initialization of the original field in the constructor
Use internally
The Role of Primary Constructors:
With primary constructors, achieving the same result is much simpler:

Declare the dependency in the primary constructor
Use internally
This results in a much simpler process, eliminating the need for additional fields and constructors.

Share your experience with us! 🔍
---Banking System Database----------------
create database Bank
go

use bank
go

------------create branch table-------------
CREATE TABLE Branch
(
id INT primary key,
name VARCHAR(50) UNIQUE,
address VARCHAR(50)
)

CREATE TABLE Card
(
id INT PRIMARY KEY,
number varchar(50) unique,
expiration_date date,
is_blocked bit
)


CREATE TABLE Loan_type
(
id int primary key,
type varchar(10) unique,
description varchar(100),
base_amount decimal(10,3),
base_interest_rate decimal(10,3)
)



CREATE TABLE Customer
(
id int primary key,
branch_id int,
first_name varchar(50),
last_name varchar(50),
date_of_birth date,
gender char(1) check (gender in ('M','F','O')),
Foreign key (branch_id) references Branch(id) on update cascade on delete set null
)

CREATE TABLE Account
(
id int primary key,
customer_id int,
card_id int,
balance char(50),
foreign key (customer_id) references Customer(id) on update cascade on delete set null,
foreign key (card_id) references Card(id) on update cascade on delete set null
)

CREATE TABLE Loan
(
id int primary key,
account_id int,
loan_type_id int,
amount_paid decimal(10,3),
start_date date,
due_date date,
foreign key (account_id) references Account(id) on update cascade on delete set null,
foreign key(loan_type_id) references Loan_type(id) on update cascade on delete set null
)

CREATE TABLE [Transaction]
(
id int primary key,
account_id int,
[description] varchar(100),
amount decimal(10,3),
[date] date,
foreign key (account_id) references Account(id) on update cascade on delete set null
)


---Insert record into Branch table------

INSERT INTO Branch(id,name,address) VALUES(1,'Allahabad Bank','Allahabad')
INSERT INTO Branch(id,name,address) VALUES(2,'Bank of Baroda','Varanasi')
INSERT INTO Branch(id,name,address) VALUES(3,'Canara Bank','Kanpur')
INSERT INTO Branch(id,name,address) VALUES(4,'ICICI Bank','Noida')
INSERT INTO Branch(id,name,address) VALUES(5,'Kotak Bank','Delhi')

select * from Branch

--Insert record into Card table---
INSERT INTO Card (id, number, expiration_date, is_blocked) VALUES ('1', '1234567890123456', '2021-01-30', 1);
INSERT INTO Card (id, number, expiration_date, is_blocked) VALUES ('2', '1234567890123457', '2022-08-20', 1);
INSERT INTO Card (id, number, expiration_date, is_blocked) VALUES ('3', '1234567890123458', '2023-03-21', 1);
INSERT INTO Card (id, number, expiration_date, is_blocked) VALUES ('4', '1234567890123459', '2021-01-14', 0);
INSERT INTO Card (id, number, expiration_date, is_blocked) VALUES ('5', '1234567890123450', '2021-06-9', 1);

select * from Card

---Insert record into Loan_type---
INSERT INTO Loan_type (id, type, description, base_amount, base_interest_rate) VALUES (1, 'Mortgages', 'description1', 10000, 15);

INSERT INTO Loan_type (id, type, description, base_amount, base_interest_rate) VALUES (3, 'Appliance', 'description3', 3000, 25);
INSERT INTO Loan_type (id, type, description, base_amount, base_interest_rate) VALUES (4, 'Payday', 'description4', 1000, 50);
INSERT INTO Loan_type (id, type, description, base_amount, base_interest_rate) VALUES (5, 'Business', 'description5', 7000, 35);

select * from Loan_type


---Insert into Customer table----

INSERT INTO Customer (id, branch_id, first_name, last_name, date_of_birth, gender) VALUES (1, 1, 'Paul', 'Panaitescu', '1996-10-7', 'M');
INSERT INTO Customer (id, branch_id, first_name, last_name, date_of_birth, gender) VALUES (2, 3, 'Constantin', 'Tarau', '1998-09-15', 'M');
INSERT INTO Customer (id, branch_id, first_name, last_name, date_of_birth, gender) VALUES (3, 1, 'Marius', 'Munteanu', '1998-07-31', 'M');
INSERT INTO Customer (id, branch_id, first_name, last_name, date_of_birth, gender) VALUES (4, 2, 'Dragos', 'Mocanasu', '1998-12-31', 'F');
INSERT INTO Customer (id, branch_id, first_name, last_name, date_of_birth, gender) VALUES (5, 2, 'Daenerys', 'Targaryen', '1895-10-7', 'F');

select * from Customer
👍1
--- Insert into Account---
INSERT INTO Account (id, customer_id, card_id, balance) VALUES (1, 1, 1, '1000');
INSERT INTO Account (id, customer_id, card_id, balance) VALUES (2, 2, 2, '100');
INSERT INTO Account (id, customer_id, card_id, balance) VALUES (3, 3, 3, '200');
INSERT INTO Account (id, customer_id, card_id, balance) VALUES (4, 5, 4, '50000');
INSERT INTO Account (id, customer_id, card_id, balance) VALUES (5, 5, 5, '1000000');

select * from Account

---Insert record for Loan table---

INSERT INTO Loan (id, account_id, loan_type_id, amount_paid, start_date, due_date) VALUES (1, 1, 3, '0', '2020-05-18', '2023-05-18');
INSERT INTO Loan (id, account_id, loan_type_id, amount_paid, start_date, due_date) VALUES (2, 5, 1, '0', '2019-08-12', '2021-05-25');
INSERT INTO Loan (id, account_id, loan_type_id, amount_paid, start_date, due_date) VALUES (3, 4, 2, '100', '2019-05-13', '2024-05-14');
INSERT INTO Loan (id, account_id, loan_type_id, amount_paid, start_date, due_date) VALUES (4, 2, 5, '1000', '2018-05-25', '2021-05-21');
INSERT INTO Loan (id, account_id, loan_type_id, amount_paid, start_date, due_date) VALUES (5, 1, 4, '5000', '2020-05-20', '2023-05-07');
select * from Loan

---Insert record for Transaction table----

INSERT INTO [Transaction] (id, account_id, description, amount, date) VALUES (1, 1, 'description 100', 1000.90, '2020-05-18');
INSERT INTO [Transaction] (id, account_id, description, amount, date) VALUES (2, 2, 'description 200', 500.80, '2019-12-07');
INSERT INTO [Transaction] (id, account_id, description, amount, date) VALUES (3, 5, 'description 300', 100.90, '2018-06-30');
INSERT INTO [Transaction] (id, account_id, description, amount, date) VALUES (4, 5, 'description 400', 5060.7, '2020-01-24');
INSERT INTO [Transaction] (id, account_id, description, amount, date) VALUES (5, 5, 'description 500', 500.67, '2018-01-24');

select * from [Transaction]


-----------The End-----------
👍3
SQL_For_Data_Scientists_A_beginner's_Guide_for_Building_Datasets.pdf
14.9 MB
📊 Exciting news for aspiring Data Scientists! 🚀

Embark on your journey into the realm of data analysis with our latest guide: "SQL For Data Scientists: A Beginner's Guide for Building Datasets for Analysis." 📈💻

In this comprehensive beginner's guide, you'll delve into the fundamentals of SQL, mastering the skills needed to build robust datasets for analysis. Whether you're a seasoned professional looking to enhance your skill set or a newcomer eager to explore the world of data science, this guide is tailored just for you! 🎓

Ready to take your first steps towards becoming a data analysis expert? Join us on this exciting adventure! Access the guide now and unlock the secrets of SQL for data scientists. 💡

🔗 Join our Telegram community @coder_baba for more insights, resources, and discussions on data science and programming. Let's learn and grow together! 🌱💬

#DataScience #SQL #BeginnersGuide #DataAnalysis #LearnToCode #DataScienceCommunity #JoinUs #TelegramGroup #CoderBaba #LinkedInLearning
🫡1
list of essential programming terms without the plugariasum, adorned with emojis:

Array: A data structure that stores a collection of elements of the same type in contiguous memory locations. 📚
Boolean: A data type that represents true or false values. 🔵🔴
Conditional Statement: A statement that executes different code based on a condition. ⚖️
Debugging: The process of identifying and fixing errors or bugs in a program. 🔍🐛
Exception: An event that occurs during the execution of a program that disrupts the normal flow of instructions. ⚠️
Function: A block of code that performs a specific task and can be called multiple times in a program. 🛠
GUI (Graphical User Interface): A visual way for users to interact with a computer program using graphical elements like windows, buttons, and menus. 💻
HTML (Hypertext Markup Language): The standard markup language used to create web pages. 🌐
Integer: A data type that represents whole numbers without any fractional part. 123
JSON (JavaScript Object Notation): A lightweight data interchange format commonly used for transmitting data between a server and a web application. 📝
Loop: A programming construct that allows repeating a block of code multiple times. 🔁
Method: A function that is associated with an object in object-oriented programming. 🎛
Null: A special value that represents the absence of a value. ⚪️
Object-Oriented Programming (OOP): A programming paradigm based on the concept of "objects" that encapsulate data and behavior. 🧱
Pointer: A variable that stores the memory address of another variable. 📌
Queue: A data structure that follows the First-In-First-Out (FIFO) principle. 🚶‍♂️🚶‍♀️
Recursion: A programming technique where a function calls itself to solve a problem. 🔄
String: A data type that represents a sequence of characters. 📝
Tuple: An ordered collection of elements, similar to an array but immutable. 📦
Variable: A named storage location in memory that holds a value. 📦
While Loop: A loop that repeatedly executes a block of code as long as a specified condition is true. 🔁
follow me for more @coder_baba
👍1
If you love this project do comments
🫡1
Exam AZ-900 Microsoft Azure Fundamentals
Pi is a new digital currency developed by Stanford PhDs, with over 55 million members worldwide. To claim your Pi, follow this link https://minepi.com/coderbaba and use my username (coderbaba) as your invitation code.