Microsoft Business Intelligence is a topic the MagnusMinds engineering team writes about from project work: how it is set up, where it breaks, and what we changed in production. This category page lists all 198 articles filed under Microsoft Business Intelligence.
Start with “SQL Server DELETE & UPDATE CASCADE”, “Quick Tips: Terraform Infrastructure as Code”, or “Explore the Exciting Features of .NET 5”. Open a post for the full write-up, or follow another tag or category on the card to a related topic.
In this article, we will review on DELETE AND UPDATE CASCADE rules in SQL Server foreign key with different examples. DELETE CASCADE: When we create a foreign key using this option, it deletes the referencing rows in the child table when the referenced row is deleted in the parent table which has a primary key. UPDATE CASCADE: When we create a foreign key using UPDATE CASCADE the referencing rows are updated in the child table when the referenced row is updated in the parent table which has a primary key. We will be discussing the following topics in this article: Creating DELETE CASCADE and UPDATE CASCADE rule in a foreign key using T-SQL script Triggers on a table with DELETE or UPDATE cascading foreign key Let us see how to create a foreign key with DELETE and UPDATE CASCADE rules along with few examples. Creating a foreign key with DELETE and UPDATE CASCADE rules Please refer to the below T-SQL script which creates a parent, child table and a foreign key on the child table with DELETE CASCADE rule. Insert some sample data using below T-SQL script. Now, Check Records. Now I deleted a row in the parent table with CountryID =1 which also deletes the rows in the child table which has CountryID =1. Please refer to the below T-SQL script to create a foreign key with UPDATE CASCADE rule. Now update CountryID in the Countries for a row which also updates the referencing rows in the child table States. Following is the T-SQL script which creates a foreign key with cascade as UPDATE and DELETE rules. To know the update and delete actions in the foreign key, query sys.foreign_keys view. Replace the constraint name in the script. The below image shows that a DELETE CASCADE action and UPDATE CASCADE action is defined on the foreign key. Let’s move forward and check the behavior of delete and update rules the foreign keys on a child table which acts as parent table to another child table. The below example demonstrates this scenario. In this case, “Countries” is the parent table of the “States” table and the “States” table is the parent table of Cities table. We will create a foreign key now with cascade as delete rule on States table which references to CountryID in parent table Countries. Now on the Cities table, create a foreign key without a DELETE CASCADE rule. If we try to delete a record with CountryID = 3, it will throw an error as delete on parent table “Countries” tries to delete the referencing rows in the child table States. But on Cities table, we have a foreign key constraint with no action for delete and the referenced value still exists in the table. The delete fails at the second foreign key. When we create the second foreign key with cascade as delete rule then the above delete command runs successfully by deleting records in the child table “States” which in turn deletes records in the second child table “Cities”. Triggers on a table with delete cascade or update cascade foreign key An instead of an update trigger cannot be created on the table if a foreign key on with UPDATE CASCADE already exists on the table. It throws an error “Cannot create INSTEAD OF DELETE or INSTEAD OF UPDATE TRIGGER ‘trigger name’ on table ‘table name’. This is because the table has a FOREIGN KEY with cascading DELETE or UPDATE.” Similarly, we cannot create INSTEAD OF DELETE trigger on the table when a foreign key CASCADE DELETE rule already exists on the table. Conclusion In this article, we explored a few examples on DELETE CASCADE and UPDATE CASCADE rules in SQL Server foreign key. In case you have any questions, please feel free to ask in the comment section below.
You may have heard infrastructure as code(IaC), But do you know what infrastructure is? Why do we need infrastructure as code? What are the benefits of infrastructure as code? Is it safe and secure? What is Infrastructure as Code(IoC)? Infrastructure as code (IaC) means to manage and upgrade your environments as infrastructure using configuration files. Terraform provides infrastructure as code for provisioning, compliance, and management across any public cloud, private data center, and third-party service. Enables teams to write, share, manage, and automate any infrastructure using version control With automated policy enforcement for security, compliance, and operational best practices and Enable developers to provision their desired infrastructure from within their workflows. IOC has a high impact on the Business perspective by providing Increased Productivity, Reduced Risk, Reduced Cost Why do we use Infrastructure as Code(IoC)? Terraform is a simple human-readable configuration language, to define the desired topology of infrastructure resources VCS Integration Write, version, review, and collaborate on Terraform code using your preferred version control system Workspaces Workspaces decompose monolithic infrastructure into smaller components, or "micro-infrastructures". These workspaces can be aligned to teams for role-based access control. Variables Granular variables allow easy reuse of code and enable dynamic changes to scale resources and deploy new versions. Runs Terraform uses two-phased provisioning a plan (dry run) & apply (execution). Plans can be inspected before execution to ensure expected behavior and safety. Infrastructure State The state file is a record of currently provisioned resources. State files enable a versioned history of the infrastructure and are encrypted at rest. Versions can be inspected to see incremental changes. Policy as Code Sentinel is a policy as a code framework to automate multi-cloud governance. What are the benefits of Infrastructure as Code(IoC)? Infrastructure as Code enables Infrastructure teams to test the applications in staging environments or development environment early - likely in the development cycle Infrastructure as Code Saves You Time and Money We can have a version history like when the infrastructure is upgraded and who has done it from the code itself. Else we have to ask to check the Infrastructure admin to look into logs and which is very time-consuming. We can check it into version control and I get versioning. Now we can see an incremental history of who changed what Use Infrastructure as Code to build update and manage any cloud, infrastructure, or services Terraform makes it easy to re-use configurations for the environment for similar infrastructure, helping you avoid mistakes and save time. We can use the same configuration code for the different staging Production and development environments. Terraform supports many Providers to be built from just a simple and less line of code. Major providers are as follows AWS Azure GitHub GitLab Google Cloud Platform VMWare Docker and 200+ more. A Simple example to create an Ec2 Instance with just a few lines of code. resource "aws_instance" "ec2_instance" { ami = "ami-*******" instance_type = "t2.micro" vpc_security_group_ids = ["${aws_security_group.*****.id}"] key_name = "${aws_key_pair.****.id}" tags { Name = "New-EC2-Instance" } } But First, we have to write code for which provider we are writing our code. To do so here is the simple basic code to assign a provider provider "aws" { region = "us-west-2" ## PROVIDE CREDENTIALS } Now to Create your Ec2 Instance in AWS. We have to run the commands. So terraform has Four commands to check and apply the infrastructure changes, Init Plan Apply Destroy. 1. Init $ terraform init We can understand from the name of the command that is used to initialize something. So here terraform will be initialized in our code which will create some basic backend and tfstate files in folders for internal use. 2. Plan $ terraform plan As we do compile in some code languages, it will check for the compilation errors and plan what is going to happen when we run the script to generate infrastructure code. It will show you what resources are going to be created and what will be the configuration. 3. Apply $ terraform apply It is time to run the script and check what is being generated from the scripts. So the command will execute the script and apply the changes in our infrastructure, which will generate some resources for what we have written in the code. 4. Destroy $ terraform destroy This command is used when we want to remove or destroy the resource. After some time we don't need that resource then we just run the command which will destroy the resource. And your money is saved.
Microsoft Announces .NET 5 Microsoft announces that the next release after .Net core 3.0 will be .NET 5. .NET 5 will be the big release in the .NET family. You will able to use it to target Windows, Linux, Android, iOS, macOS, tvOS, watchOS, WebAssembly, and more. Microsoft will introduce new .NET APIs, language features, and runtime capabilities as a part of .NET 5. Microsoft intends to release .NET 5 in November 2020, with the first preview available in the first half of 2020. It will be supported with future updates to Visual Studio 2019, Visual Studio for Mac, and Visual Studio Code. .Net 5 Moves Ahead with .NET Core .NET Core Functionalities: Cross-platform implementation in any device Support all key platform features for .net core, .Net Framework, xamarin Open-source and community-Oriented Support with future updates to Visual Studio Code, Visual Studio 2019, Command Line Interface, and Visual Studio for Mac. Fast, Scalable and High Performance Side-by-side installation Support for platform-specific features like Windows Forms, & WPF on Windows Smarter Deployment & packages Small projects Files Three New major supports for developers Java Interoperability will be available on all Swift and Objective-C Interoperability will be supported on all multiple operating systems CoreFX will be extended to support static compilation of .Net, smaller footprints, and support for more operating systems. The Other Highlights Features Desktop Development with .NET 5 .NET 5 will come up with all key desktop development functionalities and libraries. WPF, Windows Forms, UWP, and xamarin are the four key desktop platforms. Mobile Development with .NET .Net 5 will continue to build cross-platform mobile apps for Android, iOS, tvOS, macOS, and watchOS platforms using Xamarin. Runtime and Language with .Net 5 Mono is the original cross-platform implementation of .NET. It started out as an open-source alternative to .NET Framework and transitioned to targeting mobile devices like Android and iOS devices popular. CoreCLR is runtime used as part of .NET Core. It has been primarily targeted at supporting cloud applications, including the largest services at Microsoft and now is also being used for windows desktop, IOT, and machine learning applications. Cloud Development with .NET 5 The major functionality of .Net 5 is Azure app Development. With the release of the latest version of .Net, developers will continue to develop software with Azure. Game Development with .Net 5 Visual studio 2019 and .Net 5 will support utility, a vital part of .Net gaming to develop games for mobile and other gaming platforms.
The Bootstrap 5 alpha version has been released on June 16, 2020. You can check the official page for Bootstrap 5 alpha. Bootstrap is a free and open-source most popular CSS framework for website and web applications. It contains CSS- and (optionally) JavaScript-based design templates for typography, forms, buttons, navigation, and other interface components.HTML- and CSS-based design templates for different components of a website or application such as models, forms, buttons, navigation, accordion, tabs, typography and other interface components with helpful JavaScript extensions. A bootstrap is a powerful tool for whatever type of website and web application you are trying to build. The following are some of the expected changes in Bootstrap 5: jQuery could get removed As we all know, Bootstrap has made this decision long before. The team had opened a pull request in 2017 aiming to remove jQuery entirely from bootstrap versions, and now in bootstrap 5 alpha it is done and replaced entirely. Switch to Vanilla JavaScript JavaScript is currently dominating the modern web development community. Almost all modern web browsers on consoles, desktops, games, tablets, and mobile phones include JavaScript interpreters. Therefore, it's geared up to become the universal scripting standard of the global. As a result, this will improve the size and weight of the files and libraries used by the framework. Responsive Font Sizes (RFS) Bootstrap 5 alpha enables responsive font sizes by default. That will automatically resize the typography element according to the size of the user’s viewport through RFS engine or Responsive Font Sizes. As per RFS repository, RFS is a unit resizing engine. Furthermore, RFS offers the ability to resize every value for any CSS property with units, like padding, margin, box-shadow, or border-radius. Enhanced grid system Bootstrap 5 alpha isn’t a complete departure from v4. Developers of the first alpha have made sure that everyone can be able to upgrade to this future version more easily. Here’s a rundown of what’s new in the grid system: New grid tier: XXL ≥1400px .gutter classes have been replaced with .g* utilities. Vertical spacing classes. Columns are no longer position: relative by default. Form layout options are replaced with the new grid system. Also, options for your grid gutter spacing are added. Here’s a quick example of how to use the new grid gutter classes: <div class="row g-5"> <div class="col">...</div> <div class="col">...</div> <div class="col">...</div> </div> Drop Internet Explorer 10 and 11 support Well, Internet Explorer was talk of the town when it was released as it was the only browser to support Java applets and CSS. Although it is no longer relevant with Chrome, Firefox, and Edge as it doesn’t support modern JavaScript standards and CSS properties anymore. Which limits your web design potential. Hence, Bootstrap 5 alpha decided to drop the support for IE 10 and 11. Improved customizing docs There are some good improvisations in the documentation. Like, removing ambiguity, giving more explanation, and providing much more support for extending Bootstrap. It all starts with a whole new Customize section. The color palette is expanded in v5, too. With an extensive color system built-in, you can more easily customize the look and feel of your app without leaving the codebase. There is an improvisation in color contrast, too. Also, they have provided color contrast metrics in Color docs. Hopefully, this will continue to help make Bootstrap-powered sites more accessible to folks all over. The custom SVG icon library With Bootstrap 3, there were 250 reusable icon components in the font format called ‘Glyphicons”. After that, with Bootstrap 4, it was scrapped. Because of that developers had to rely on free icon fonts or their SVG (Scalable Vector Graphic) icons to add value to their web designs. However, with Bootstrap 5 alpha, they introduced a brand new SVG icon library, which adds a fresh touch. These icons are brilliantly crafted by @Mark Otto, co-founder of Bootstrap, himself. Adding CSS custom properties As mentioned, Bootstrap 5 alpha has begun using CSS custom properties thanks to dropping support for Internet Explorer. In v4 there were only a handful of root variables for color and fonts, and now developers have added them for a handful of components and layout options. For example table component, there are a handful of local variables to make striped, hoverable, and active table styles easier .table { --bs-table-bg: #{$table-bg}; --bs-table-accent-bg: transparent; --bs-table-striped-color: #{$table-striped-color}; --bs-table-striped-bg: #{$table-striped-bg}; --bs-table-active-color: #{$table-active-color}; --bs-table-active-bg: #{$table-active-bg}; --bs-table-hover-color: #{$table-hover-color}; --bs-table-hover-bg: #{$table-hover-bg}; // Styles here... } Improved Utilities API Well, this is by far the most interesting aspect of Bootstrap 5 alpha. A brand new utility API. By using the utility API from Bootstrap you have unlimited possibilities to create utility classes for positioning, spacing, sizing, and so on. For example, you will be able to easily expand the number of `m-*`, `p-*` classes, and so on without writing custom Sass code to expand them. Here’s an example showing us how the $ utility variable can be expanded by adding multiple values: $utilities: () !default; $utilities: map-merge( ( // ... "width": ( property: width, class: w, values: ( 25: 25%, 50: 50%, 75: 75%, 100: 100%, auto: auto ) ), // ... "margin": ( responsive: true, property: margin, class: m, values: map-merge($spacers, (auto: auto)) ), // ... ), $utilities); We think this will be a game-changer for those who build on Bootstrap via source files, and if you haven’t built a Bootstrap-powered project that way yet, your mind will be blown. Migrating the documentation from Jekyll to Hugo If you know how WordPress, Drupal, or Joomla works, then, you might be aware of how Jekyll works. Well, Jekyll is a free and open-source static site generator. Besides, it is useful to build websites with easy to use navigation, website components and generates all the content at once. However, Bootstrap 5 alpha is all set to step up its game and is switched to Hugo. As it is a fast and flexible static site generator. CONCLUSION One of the frustrating experiences of being a developer is reinventing the base HTML, CSS, and JavaScript for each project. While some prefer to write their code, it still makes sense to just use an existing framework like Bootstrap. With the all-new updates that came with Bootstrap 5 Alpha, We can surely say that the Bootstrap team is making very progressive steps to make the framework simple, lightweight, faster, useful, and more responsive for the developer’s benefit. RELATED BLOGS: Easy jQuery Trick
Since January 2020, the world has been watching the unfolding of the Covid-19 pandemic. The infection has now reached just about every community on the planet leading to a current state of health crisis and economic uncertainty. Most of us have felt a solid feeling of disturbance in our work and social lives. The whole world is all in all attempting to comprehend what occurs straightaway. The truth of the matter is that because of the interruption brought about by Covid-19 we have just experienced increasingly advanced change over the most recent 3 months than we have found over the most recent 25 years. To completely guess what's going on, we should understand that these progressions will be driven by new mentalities and practices that our general public is presently beginning to embrace. We are now observing impressions at it. Our exercises, for example, video conferencing, digital marketing and online ordering more effective than we at any point experienced previously. A considerable lot of these emphatically adjusted new arrangements will keep on existing significantly after the crisis is finished. Like cleanliness appraisals on food conveyance applications and acknowledgment of social separating procedures. Later, rather than asking "why meet over video?", individuals may ask, "for what reason do we have to meet face to face?" If at any time there was a time for digital marketing to come to the fore, it is currently. Advertisements that would for the most part have been seen by thousands presently remain adjacent to discharge avenues, fewer people are wandering out to get papers and no one is holding occasions/events. Meanwhile, with such huge numbers of people on the web and for more, the possibilities of seeing promotions via web-based networking media or interfacing with content advertising websites are more noteworthy. There are some certain targets digital marketers can concentrate on, with numerous greater demands just now: Search Engine Optimization Social Media Marketing Email Marketing Content Marketing Paid advertising (PPC, SEM, etc.) The mentality change could be "We are in a battle with the virus since it has accomplished more harm than contending nations" or "We see a development of work at home economy (Online Work)". Researchers and specialists will be set on a higher platform than they are right now and the legislature will be relied upon to contribute and create framework and science that thinks about the populace. The changing outlooks could likewise move the viewpoints via web-based networking media. Benefits of Online Marketing: Convenience and Quick Service Low Cost for Operations Measure and Track Results Demographic Targeting Global Marketing Ability to Multitask 24/7 Marketing Instance Transaction Service Time-Effective Marketing In outline, our mentality and practices have just begun to change. Unmistakably, the world will never be the equivalent in light of the fact that there will be durable impacts. After we settle essential services, we will probably change our objectives for advancement and strategy using digital services. From this rationale, we can see that the world's necessity for computerized innovation and advanced change is just quickening. RELATED BLOGS: Marketing Mix For Today's Era
What is table partitioning in SQL? Table partitioning is a way to divide a large table into smaller, more manageable parts without having to create separate tables for each part. Data in a partitioned table is physically stored in groups of rows called partitions and each partition can be accessed and maintained separately. Partitioning is not visible to end-users, a partitioned table behaves like one logical table when queried. Data in a partitioned table is partitioned based on a single column, the partition column often called the partition key. Only one column can be used as the partition column, but it is possible to use a computed column. The partition scheme maps the logical partitions to physical filegroups. It is possible to map each partition to its own filegroup or all partitions to one filegroup.
We have to add the below script in the master database to restore an encrypted database. CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<your_password>' CREATE CERTIFICATE <your_certificate_name> FROM File = '<path of.cer file>' WITH PRIVATE KEY (FILE = 'path of .pvk file', DECRYPTION BY PASSWORD = '<your_password>'); Now you have to do follow the normal restore process in SQL.
What Are Soft Skills? Soft Skills Definition: Soft skills are abilities not unique to any job. Are you a great communicator? Do you collaborate with others like Steve Rogers? Those are softer skills. For example: Communication Skills Management Skills But—you can’t just say you’ve got them and expect the phone to jangle. Scroll down to find out how to pick the perfect ones for a resume, and how to prove them so employers drool a little. What Are Hard Skills? Hard Skills are teachable abilities or skill sets that are easily measurable. We define hard skills as the technical abilities that fit the job. Normally, you can acquire hard skills in the classroom, in an online course, through books and other materials, or on the job. If you’re in retail, that means closing cash drawers or restocking shelves. In tech? Your list of hard skills for resumes might have Java coding or network configuration. Hard skills examples of accountants are asset management and account analysis. Hard professional skills for nurses are patient education and phlebotomy. A prime example of hard skills for desk jockeys is computer skills. You’d think hard skills matter most. You’d be wrong. The truth is that the demand for soft skills has been growing since at least 1980. Another study, by LinkedIn, actually suggests that 57% of employers value soft skills more than hard skills. What’s the Difference Between Soft Skills vs Hard Skills? Hard skills are teachable and measurable abilities, such as writing, reading, math, or the ability to use computer programs. By contrast, soft skills are the traits that make you a good employee, such as etiquette, communication, and listening, getting along with other people. Need more help? See these examples of hard skills and soft skills in the workplace: Soft Skills Examples Interpersonal Skills Communication Collaboration Problem Solving Leadership Hard Skills Examples Gathering Software Requirements Forklift Operation Marketing Skills Phlebotomy Financial Modeling Shelf Stocking
The concept of a marketing mix, the major components of a marketing strategy, was first developed in the 1960s by marketing scholar E. Jerome McCarthy. His original concept described the four basic components of every marketing campaign, the Four Ps: Product, Price, Promotion, and Place. The concept was groundbreaking at the time and was part of a movement to deconstruct and systematize marketing. It still has tremendous relevance today, but what was once considered leading edge, is now prerequisite knowledge. Classic Mix Oldies but goodies, the original Four Ps are still fundamental concepts that every marketer spends countless hours analyzing and making tough calls on. 1. PRODUCT Put simply, a product is something that you are selling to satisfy a customer’s needs or wants. It can be physical goods or intangible services, ideas, or experiences. The marketing choices that affect a product include the design of the product itself (such as the features, quality, and style), the assortment (i.e. the types of product lines offered), and the branding, packaging, and labeling. Associated services (such as after-sales help desks), guarantees and warranties, and return policies are also considered elements of the product. 2. PRICE This is the amount you intend to charge for your product as well as the means by which customers can pay (e.g. cash, credit, layaway). The price of a product is important for marketing purposes because the amount a person pays for something affects their perceived value of it. 3. PROMOTION Promotion refers to communications made to potential customers informing them of your offering. Common sources for that information include advertising, public relations, direct marketing, and sales promotions. The choices to make at this stage include developing a promotional mix (e.g. ad heavy versus PR heavy) and a messaging strategy, a clear idea of what you are saying and the desired response. Other promotional choices include picking the optimal channels to communicate on (e.g. social media versus traditional media) and message frequency. It’s essential to have a well fleshed out buyer persona when making these decisions. The ideal promotional strategy speaks in the language of the target market, reaches them where they already are, and sends a message they are receptive to. 4. PLACE Last, but not least, place refers to the distribution methodologies employed to get the product into customer’s hands. Choices that need to be made include whether to invest in brick-and-mortar outlets or pursue online, mail-order, or call-center based sales. Place choices also cover your distribution strategy. Are you trying to get your products into the hands of anyone who wants it, or limiting it to an exclusive few? In sum, the four Ps are really asking some simple questions. What are you selling? How much are you charging for it? How are you informing people of your offering and enticing them to purchase it? And, how are you going to get the product to them if they do make a purchase? The Next Generation Today, several additions and alterations are competing to update McCarthy’s original four. Because service industries have grown rapidly since the 1960s an additional three Ps were added to better cover the marketing needs of service-centric companies. The 7Ps model includes the original four but adds: Physical Evidence, People, and Process: 5. PHYSICAL EVIDENCE Physical evidence (or physical environment) refers to the places where services are performed as well as the tangible things that serve as reminders that it took place (e.g. souvenirs, mementos, brochures, photographs, etc.). The place a service happens can have a big impact on how it is perceived. That means special care needs to be taken when considering facility choices such as equipment, furniture, accessibility, as well as signage, and ambient conditions like music, cleanliness, and air temperature. 6. PEOPLE Because services typically involve a human element ‘people’ are given their own category that covers the human actors that help deliver the service, interact with the customers, and form the public face of the company’s values. Choices in this area include staff recruitment and training practices, uniforms or dress codes, conversational scripts, and customer service procedures. 7. PROCESS The seventh P, process, describes how the service is delivered. It requires you to decide on a standardized system or a customizable one. It also involves monitoring and tracking performance (which itself requires developing key performance metrics). Conclusion There are numerous other models as well. Some separate the monitoring parts of the process category into its own heading as an eighth P, Performance. The Four Cs system (Consumer, Cost, Communication, and Convenience) is another system that is optimized specifically for B2C operations. But, regardless of the framework being employed, all it takes is for one miscalculation to ruin the whole thing. It doesn’t matter how easy it is to buy your product if know one knows about it. Likewise, it doesn’t matter how well you promote your product, if no one can find a place to get it. A well thought out and effective campaign is like a cake. You need the right ingredients in the right proportions. More ingredients means more complexity, but in the 21st century you need to master the time-tested fundamentals and the modern additions. RELATED BLOGS: Importance of going Digital in Covid-19 Pandemic