Thursday, May 16, 2024

Microsoft SQL Server, Master Database Skills for Effective Data Management

As we mentioned in the previous post, take a look here: a database is an organized collection of data for quick search and access. Together with the maintenance and administration system, organizing and storing this data constitutes the database system. Simply put, think of it as a set of objects with some relationship between them. Databases are much more than what developers perceive, and working with databases is multifaceted. This means that there are multiple ways to accomplish the same task with a database. The simplest way to create a database in Microsoft SQL Server is to do it through SSMS - Microsoft SQL Server Management Studio in its graphical environment.

Once you launch SSMS and successfully log in, you’ll see the Object Explorer on your left. Right-click the Databases node and select New Database. In the Database name field, enter the name of the database you want to create. If you want everything to remain at the default settings for creating a database, simply press OK, and SSMS will create a new database for you. If you don’t see your newly created database in the Database directory in Object Explorer, right-click the Database directory and click Refresh. Keep in mind that you’ll often need to use Refresh in Object Explorer to see changes when you create them.

Data Center

Data Center

The first thing you need to understand is that when you create a server database, it often consists of more than one file, unlike a local database or a Microsoft Access database. Typically, your database consists of at least two files to allow you to store your files on multiple hard disks. In one file, all your data that you store, objects, and metadata are kept. We denote this file with the *.mdf extension. The other file is the transaction log file, marked with *.ldf. In the transaction file, or as it’s also called, the log file, every change to the database is recorded. In case of system failure, it is of great benefit because it preserves data from loss.

In principle, you can create multiple databases or consolidate all your data into one database. This mostly depends on the type of data you’re storing and whether those data are related. Sometimes it’s desirable to place all data in a single database, and sometimes it’s not. When creating a database for practice and learning, accepting default values is fine. However, if you’re intentionally designing a database, you should specify values for the initial database size, its growth, or even set a maximum limit for the database size. It’s advisable to always set the largest possible size you expect your data to reach.

How do I define my values for the database I want to create?

Thursday, May 09, 2024

Data as a Driver of Success, An Introduction to Databases

Databases are organized collections of data that are designed to be easily accessed, managed, and updated. They are the foundation for many applications and systems that require efficient data storage and manipulation. Today, it is difficult to imagine any serious program, system or website without the use of a database. Despite the fact that in large corporations you have positions that only deal with databases and take care of administration, data, backup and access restrictions, you as a programmer, regardless of which programming language you learn, must also know how to work with databases.

Before databases were developed, information was usually stored on paper or other analog-mechanical media. This included paper records, books, folders, filing cabinets and the like. However, this way of storing data had several disadvantages. Physical storage of data on paper or other media limited the amount of data that could be kept in one place. Also, managing large amounts of paper or other materials required a lot of space and was expensive. Access to the data was usually limited by the physical locations where the paper records were kept. This made it difficult to share information and collaborate between people or organizations. Finding specific information among paper documents or other media could be difficult and time-consuming.

As technology advanced, systems for automating data processing were also developed, such as manual card systems, which allowed for better organization and search of data, but were still limited in terms of capacity and efficiency. Text and binary files were one way to store data before databases were developed. These files were often used to store structured or unstructured data, but were limited in their capabilities compared to modern databases. In rare and specific situations, these files are still used today instead of databases.

Data Center

Data Center

Binary formats are often used to store data that requires more efficient storage and faster access. These formats may contain a data structure that is optimized for fast processing, but are usually less human-readable than text formats. Binary formats can be more efficient in terms of disk space and access speed, but are often more difficult to process and maintain. Although text and binary files were widely used for data storage, especially in the early days of computing, they had several disadvantages compared to databases, including limited searchability, difficulty in maintaining data structure, and less efficiency in accessing data in large data sets.

Databases have evolved to address these shortcomings and become the basis for effective data management in modern information systems. They were created in response to the need for efficient storage and management of data in computer systems. Their development dates back to the 1960s, when the first concepts of databases began to appear. One of the earlier database models is the hierarchical model, which was popular in the 1960s, but was later replaced by the relational model introduced by Edgar F. Codd in the 1970s. The relational model became the foundation of modern databases and enabled the development of DBMS - Database Management Systems such as Oracle, MySQL, Microsoft SQL Server and PostgreSQL. Since then, databases have become a key part of information systems in all spheres, from business to science.

Key Components Overview: What Makes Up a Database?

Saturday, May 04, 2024

Discover the Potential of Operators in the JavaScript Programming Language

Before you move on to learning operators in the JavaScript programming language, it is assumed that you are already familiar with variables in JavaScript, see here; and that you have already started a JavaScript project js_tutorial. Operators in the JavaScript programming language, as in other programming languages, are symbols used to perform various operations on values, variables, and expressions. They play a key role in calculating and manipulating data in the JavaScript programming language because they allow programmers to calculate values, control the flow of the program, and create complex logical expressions.

Understanding how operators work and how they are used is essential for developing JavaScript applications. Operators in JavaScript are not significantly different from operators in other programming languages. Most programming languages have similar basic operators, but there are some differences in behavior and syntax. As far as basic operators are concerned, the JavaScript programming language does not lag behind much more developed programming languages at all.

Students learn operators in the JavaScript programming language

Students learn Operators in the JavaScript programming language

JavaScript supports various types of operators, including the following:

  • Arithmetic operators
  • Assignment operators
  • Unary (Increment and Decrement) operators
  • Comparison operators
  • Logical operators
  • Comma operator
  • Ternary (Conditional) operator
  • Nullish Coalescing operator
  • Optional Chaining operator
  • Bitwise shift operators
  • Etc.

When it comes to ternary, nullish coalescing, optional chaining, bitwise shift operators, and so on; we will cover them in other future posts of this tutorial as they come up in practical examples. For now, it would be great to learn and familiarize yourself with the most basic operators that you will frequently use in your projects. First, let’s start with arithmetic operators and introduce other fundamental operators in the JavaScript programming language on a single web page. Meanwhile, we’ll create another web page to showcase a simple calculator. So, your project will have two new lessons. Our calculator creation will definitely demonstrate true mastery in CSS styling, which is so straightforward that we won’t use Bootstrap at all in the fourth lesson.

Arithmetic Operators: Basic Mathematical Operators on Numbers

Thursday, May 02, 2024

Learn JavaScript Like an Expert, How to Use Variables, Data Types and Constants Effectively?

Variables are fundamental elements in every programming language that allow storage and manipulation of data. They represent memory locations used to store various types of information, including numbers, text, logical values, objects, and more. In JavaScript, variables enable programmers to store data in computer memory and manipulate it based on program requirements. For example, variables are used in programs to:

  • Store user data
  • Perform mathematical operations
  • Manage user interface elements

When learning any programming language, understanding the importance of variables is crucial. Imagine variables as memory boxes. Each box can hold different types of data, and you cannot put letters into a box meant for numbers. In JavaScript, the type of memory box, variable; you use depends on the value assigned to it. Here’s an example:

let myVariable = 10;

In this case, the variable myVariable is assigned the value 10, and the JavaScript interpreter treats it as a number. Note that variable names can be any combination of letters, numbers, and underscores. It’s a good practice to start variable names with a lowercase letter, CamelCase notation and avoid using special symbols or keywords. Descriptive variable names help make your code more readable and maintainable. Remember not to name variables with single letters like a, b, or c. Instead, develop a habit of choosing meaningful names that convey the purpose of the variable. This practice benefits both you and anyone who reviews your code.

A programmer learns and codes in the JavaScript programming language

A programmer learns and codes in the JavaScript programming language

The JavaScript programming language is case-sensitive, which means it distinguishes between uppercase and lowercase letters. This means that myVariable and myvariable are two different variables. Data types in JavaScript are not strictly typed like, for example, in the C# programming language. JavaScript uses dynamic typing, which means you do not declare a variable as you would in C#, and the data type is determined during program execution, not at the declaration of the variable. Dynamic typing allows for flexibility and faster development but can lead to errors if the programmer is not careful with the variable types in their code.

Precisely because JavaScript is not a strictly typed language, it is not the best choice for most financial and other calculations. That’s why TypeScript was created, which uses static typing. However, this does not mean you should immediately switch to TypeScript. JavaScript has a lot to teach and offer you. Unlike other programming languages, JavaScript has far fewer variable types. And unlike, for example, the PHP programming language, which has different data types like undefined and symbol, JavaScript uses the number type for all kinds of numbers, including hexadecimal ones.

Data Types in the JavaScript Programming Language

Wednesday, May 01, 2024

From Beginner to Pro, First Steps to Professional JavaScript Coding

Before you even think about learning the JavaScript programming language, it is essential that you are familiar with HTML5 and CSS3, or at least read and study the posts on this blog related to the mentioned topic; see here or check in the navigation toolbar Content. JavaScript is the most popular programming language that turns web pages into client-side web applications. It is usually at the top of all the top lists of programming languages due to its ease of learning and use, and I would add that JavaScript developers are exceptionally well-paid compared to other programmers. The first thing you need to know about the JavaScript programming language is that it has nothing to do with the Java programming language and its syntax is based on C syntax.

It is interpreted, which means it is not compiled like the C# programming language. It supports variables for storing information, operators for performing operations and comparisons, functions that can be called multiple times, conditional expressions, programming loops, and the ability to create objects with properties, methods, and events. We say that JavaScript is an event-driven execution model. Otherwise, JavaScript is used in combination with DOM – Document Object Model and BOM – Browser Object Model to make the web page look dynamic.

The girl codes in JavaScript, the most popular programming language

The girl codes in JavaScript, the most popular programming language

There are colleagues who do not take this programming language seriously because it is often learned as part of another programming language, for example, it is assumed that a C# programmer knows the JavaScript programming language, as well as the jQuery library and AJAX. But also, in foreign companies, there are positions where programmers deal exclusively with the JavaScript programming language professionally, without knowing other programming languages. In any case, our advice to you is to take the JavaScript programming language seriously and to master it well because it is extremely present in almost every internet project and in the job market. It will also make your websites much better.

But for now, let’s go back a bit to see how JavaScript was created. First, a programmer named Brendan Eich from Netscape developed LiveScript in 1995. Then, with the appearance of Microsoft Internet Explorer version 3.0 in 1996, support was included in this browser for Jscript, which was the basis of JavaScript. Although Jscript was similar to JavaScript, their application was totally different. Just a year later, ECMA-European Computer Manufacturers Association built the first language specification ECMAScript, better known as ECMA-262 or what we call JavaScript today, which then became the standard primarily for Microsoft browsers, and then others.

But the problem arose because each browser applied this standard in its own way, making it incompatible. There are many newer editions of ECMA-262, but still, as a programmer, you must take into account the differences between ECMA-262 and other JavaScript implementations. Of course, this should not scare you or compromise your JavaScript code, but it is necessary to test it on browsers from different manufacturers. Today, the JavaScript standard is closely linked to the DOM – Document Object Model standard regulated by the W3C – World Wide Web Consortium, and with their participation, life has been made easier for developers.

The benefits of JavaScript: How this language is changing the web