Showing posts with label represent. Show all posts
Showing posts with label represent. Show all posts

Tuesday, 23 February 2016

How to Format Date Parameters in SQLIn Feburary 2016 23,

In Feburary 2016 23,
Create a new query statement in SQL to extract a date from the database. However, instead of extracting the raw data value stored in the database, use the 'Date_Format' command in conjunction with the query to ensure the extracted date is in your desired format.
Enter the name of the database variable that represents the raw date value as the first parameter in the 'Date_Format' command. This command uses two parameters separated by a comma inside the command's parenthesis. The format is 'Date_Format(date, format)'.
Identify the SQL date format codes that represent the many date formats that SQL may output. These codes cover all conceivable date formats and may be arranged in any order. Each code begins with a percent sign and is followed by a letter which represents a portion of a date displayed in a particular fashion. For example, '%Y' is the four-digit year, while '%y' is the two-digit year.
Format the second parameter of the 'Date_Format' command using SQL date codes to match the desired output format of the date that is extracted from the database. For example, to create a verbose text output of the date, use '%W, %M %e, %Y'. This date format will appear as 'Sunday, April 18, 2010'. Commas are entered in the format where they should appear in the final output.
Format the date as a numerical string by typing 'Date_Format([date],'%e-%c-%Y')'. Note that the single quotes are not included in the actual typed SQL query. Use the actual name of the database variable for '[date]' in this example. The output will resemble '18-4-2010'.
In Feburary 2016 23,

Thursday, 18 February 2016

Advantages Disadvantages of Normalizing a DatabaseIn Feburary 2016 18,

In Feburary 2016 18,
Databases can hold a significant amount of information, perhaps millions or billions of pieces of data. Normalizing a database reduces its size and prevents data duplication. It ensures that each piece of data is stored only once.
Groups Data Logically
Application developers who create applications to 'talk' to a database find it easier to deal with a normalized database. The data they access is organized more logically in a normalized database, often similar to the way in which the real-world objects that the data represent are organized. That makes the developers' applications easier to design, write and change.
Enforces Referential Integrity on Data
Referential integrity is the enforcement of relationships between data in joined tables. Without referential integrity, data in a table can lose its link to other tables where related data is held. This leads to orphaned and inconsistent data in tables. A normalized database, with joins between tables, can prevent this from happening.
Slows Database Performance
A highly normalized database with many tables and joins between the tables is slower than a database without those attributes. Many people using a normalized database at the same time also can slow down database speed. In some cases, a certain amount of denormalization of the database may be required to improve database speed.
Requires Detailed Analysis and Design
Normalizing a database is a complex and difficult task. Large databases with considerable amounts of information, such as ones run by banks, require careful analysis and design before they are normalized. Knowing the intended use of a database, such as whether it should it be optimized for reading data, writing data or both, also affects how it is normalized. A poorly normalized database may perform badly and store data inefficiently.
In Feburary 2016 18,