Showing posts with label DATA BASE. Show all posts
Showing posts with label DATA BASE. Show all posts

Tuesday, 22 November 2022

What Is a Database?

 If you’re familiar with spreadsheets like Microsoft Excel, you already understand how data can be used with tables. Databases also use tables to store, manage, and retrieve information.

You Already Use Databases

You may not realize it but you encounter the power of databases all the time in your daily life. For example, when you log into your online banking account, your bank first authenticates your login using your username and password and then displays your account balance and any transactions. A database operating behind the scenes evaluates your username and password combination and provides access to your account. It then filters your transactions to display them by date or type, as you request.

1s and 0s representing a database
 

Databases vs. Spreadsheets

Databases are different from spreadsheets in that they're better at storing large amounts of data and manipulating it in various ways. Here are just a few actions you can perform with a database that would be difficult, if not impossible, to perform using a spreadsheet:

  • Retrieve all records that match certain criteria
  • Update records in bulk
  • Cross-reference records in different tables
  • Perform complex aggregate calculations

Elements of a Database

A database is made up of many different tables. Like Excel tables, database tables consist of columns and rows. Each column corresponds to an attribute and each row corresponds to a single record.

For example, consider a database table that contains names and telephone numbers for the 50 employees at Company X. The table is set up with columns labeled “FirstName,” “LastName,” and “TelephoneNumber.” Each row contains the corresponding information for one individual. Because there are 50 individuals, the table has 50 entry rows and one label row. ​

Each table in a database must have a unique name and each must have a primary key column so that each row (or record) has a unique field to identify it. 

The data in a database is protected by constraints, which enforce rules on the data to ensure its overall integrity. A unique constraint ensures that a primary key cannot be duplicated. A check constraint controls the type of data you can enter. For example, a Name field can accept plain text, but a Social Security Number field must include a specific set of numbers.

One of the most powerful features of a database is the ability to create relationships between tables using foreign keys. For example, you might have a Customers table and an Orders table. Each customer can be linked to an order in your Orders table. The Orders table, in turn, might be linked to a Products table. This method simplifies database design so you can organize data by category, rather than trying to put all the data into one or just a few tables.

A Database Management System

A database only holds data. To make real use of that data, you need a database management system. A DBMS is the database itself, along with the software and functionality required to retrieve or insert data. A DBMS creates reports, enforces database rules and constraints, and maintains the database schema. Without a DBMS, a database is just a collection of bits and bytes with little meaning.

If you'd like to try creating a database, a good place to start would be a database program like Microsoft Access.

FAQ
  • What is a database schema?

    A database's schema is its structure. It specifies what information, or objects, can enter the database and defines the relationship between them. Scheme are typically defined using ​Structured Query Language (SQL).

  • What is a relational database?

    A relational database stores data points that are related to each other. It organizes the data into one or more tables, each one with a unique key identifying it.

  • What is a database query?

    A query is simply a request for information from a database. The data can come from one or more tables in the database, or it can come from other queries. Whenever you type in a Google search, you're sending a query, for example.

  • What is a database record?

    A record is the set of data that's stored in a table. Records are also sometimes called a tuple.

  • What is a foreign key in a database?

    A foreign key is a common component that links data in two tables together. The foreign key refers to the primary key of another table called the parent table. The table containing the foreign key is called the child table.

  • What is an entity in a database?

    An entity is an object that exists within the database. It can be a person, place, unit, or any abstract concept you wish to store information about. For example, a school database can contain students, teachers, and courses as entities.

Was this page helpful?

An Overview of NoSQL Databases

 The acronym NoSQL was coined in 1998. Many people think NoSQL is a derogatory term created to poke at SQL. In reality, the term means Not Only SQL. The idea is that both technologies can coexist and each has its place. The NoSQL movement has been in the news in the past few years as many of the Web 2.0 leaders have adopted a NoSQL technology. Companies like Facebook, Twitter, Digg, Amazon, LinkedIn, and Google all use NoSQL in one way or another. Let's break down NoSQL so you can explain it to your CIO or even your co-workers.

MYSQL database.

NoSQL Emerged From a Need

Data Storage: The world's stored digital data is measured in exabytes. An exabyte is equal to one billion gigabytes (GB) of data. According to Internet.com, the amount of stored data added in 2006 was 161 exabytes. Just 4 years later in 2010, the amount of data stored will be almost 1,000 ExaBytes which is an increase of over 500%. In other words, there is a lot of data being stored in the world and its just going to continue growing.

Interconnected Data: Data continues to become more connected. The creation of the web fostered in hyperlinks, blogs have pingbacks and every major social network system has tags that tie things together. Major systems are built to be interconnected.

Complex Data Structure: NoSQL can handle hierarchical nested data structures easily. To accomplish the same thing in SQL, you would need multiple relational tables with all kinds of keys. In addition, there is a relationship between performance and data complexity. Performance can degrade in a traditional RDBMS as we store the massive amounts of data required in social networking applications and the semantic web.

What is NoSQL?

I guess one way to define NoSQL is to consider what it is not. It's not SQL and it's not relational. Like the name suggests, it's not a replacement for an RDBMS but compliments it. NoSQL is designed for distributed data stores for very large scale data needs. Think about Facebook with its 500,000,000 users or Twitter which accumulates Terabits of data every single day.

In a NoSQL database, there is no fixed schema and no joins. An RDBMS "scales up" by getting faster and faster hardware and adding memory. NoSQL, on the other hand, can take advantage of "scaling out". Scaling out refers to spreading the load over many commodity systems. This is the component of NoSQL that makes it an inexpensive solution for large datasets.

NoSQL Categories

The current NoSQL world fits into 4 basic categories.

  1. Key-values Stores are based primarily on Amazon's Dynamo Paper which was written in 2007. The main idea is the existence of a hash table where there is a unique key and a pointer to a particular item of data. These mappings are usually accompanied by cache mechanisms to maximize performance.
    1. Column Family Stores were created to store and process very large amounts of data distributed over many machines. There are still keys but they point to multiple columns. In the case of BigTable (Google's Column Family NoSQL model), rows are identified by a row key with the data sorted and stored by this key. The columns are arranged by column family.
  2. Document Databases were inspired by Lotus Notes and are similar to key-value stores. The model is basically versioned documents that are collections of other key-value collections. The semi-structured documents are stored in formats like JSON.
  3. Graph Databases are built with nodes, relationships between notes and the properties of nodes. Instead of tables of rows and columns and the rigid structure of SQL, a flexible graph model is used which can scale across many machines.

Major NoSQL Players

The major players in NoSQL have emerged primarily because of the organizations that have adopted them. Some of the largest NoSQL technologies include:

  • Dynamo: Dynamo was created by Amazon.com and is the most prominent Key-Value NoSQL database. Amazon was in need of a highly scalable distributed platform for their e-commerce businesses so they developed Dynamo. Amazon S3 uses Dynamo as the storage mechanism.
  • Cassandra: Cassandra was open sourced by Facebook and is a column-oriented NoSQL database.
  • BigTable: BigTable is Google's proprietary column oriented database. Google allows the use of BigTable but only for the Google App Engine.
  • SimpleDB: SimpleDB is another Amazon database. Used for Amazon EC2 and S3, it is part of Amazon Web Services that charges fees depending on usage.
  • CouchDB: CouchDB along with MongoDB are open source document-oriented NoSQL databases.
  • Neo4J: Neo4j is an open source graph database.

Querying NoSQL

The question of how to query a NoSQL database is what most developers are interested in. After all, data stored in a huge database doesn't do anyone any good if you can't retrieve and show it to end users or web services. NoSQL databases do not provide a high-level declarative query language like SQL. Instead, querying these databases is data-model specific.

Many of the NoSQL platforms allow for RESTful interfaces to the data. Other offer query APIs. There are a couple of query tools that have been developed that attempt to query multiple NoSQL databases. These tools typically work across a single NoSQL category. One example is SPARQL. SPARQL is a declarative query specification designed for graph databases. Here is an example of an SPARQL query that retrieves the URL of a particular blogger (courtesy of IBM):

PREFIX foaf: 
SELECT ?url
FROM
WHERE {
?contributor foaf:name "Jon Foobar" .
?contributor foaf:weblog ?url .
}

Future of NoSQL

Organizations that have massive data storage needs are looking seriously at NoSQL. Apparently, the concept isn't getting as much traction in smaller organizations. In a survey conducted by Information Week, 44% of business IT professionals haven't heard of NoSQL. Further, only 1% of the respondents reported that NoSQL is a part of their strategic direction. Clearly, NoSQL has its place in our connected world but will need to continue to evolve to get the mass appeal that many think it could have.

Was this page helpful?

How to Password Protect a PDF

 What to Know

  • Install PDFMate to encrypt and protect a PDF, or use an online tool like Soda PDF.
  • A document open password can be used so that it can't be opened without the password.
  • Some free PDF editors can add a password, too, but might also include a watermark.

This article explains how to password protect a PDF with a desktop program for Windows, online, and on macOS.

Install a Program or Go Online

These four programs must be installed on your computer before you can use them to password protect a PDF file. You might even already have one of them, in which case it'll be quick and easy to just open the program, load the PDF, and add a password.

However, if you're looking for a much faster (but still free) way to make the PDF have a password, skip down to the next section below for some free online services that can do the exact same thing.

All of the programs and services mentioned below work perfectly fine in versions of Windows from XP up through Windows 10. While only one is unavailable for macOS, don't miss the section at the very bottom of this page for instructions on encrypting a PDF on a Mac without having to download any of these tools.

Password Protect a PDF With PDFMate PDF Converter

One absolutely free program that can not only convert PDFs to other formats like EPUB, DOCX, HTML, and JPG but also put a password on a PDF, is PDFMate PDF Converter. It works on Windows only.

You don't have to convert the PDF to one of those formats because you can instead choose PDF as the export file format and then change the security settings to enable a document open password.

  1. Choose Add PDF at the top of PDFMate PDF Converter.

    Add PDF button in PDFMate
  2. Select the PDF you want to work with, and then choose Open.

    Hot Child in the City PDF in Open dialog for PDFMate
  3. Once it's loaded into the queue, choose PDF from the bottom of the program, under the Output File Format: area.

    PDF button in PDFMate
  4. Select Advanced Settings near the top right of the program.

    Advanced Settings button in PDFMate
  5. In the PDF tab, put a check next to Open Password, and then enter a password in the field to the right.

    Open Password checkbox in PDFMate's Advanced Settings

    You can optionally choose Permission Password, too, to set up a PDF owner password to restrict editing, copying, and printing from the PDF.

  6. Choose Ok to save the PDF security options.

  7. Select Output Folder toward the bottom of the program and then pick where the password protected PDF should be saved.

    Custom file destination field in PDFMate

    The PDF can be saved to the same location as the original or you can choose Custom to pick a different folder.

  8. Use the big Convert button at the bottom of PDFMate PDF Converter to save the PDF with a password.

    Convert button in PDFMate
  9. If you see a message about upgrading the program, just exit that window. You can also close down PDFMate PDF Converter once the Status column next to the PDF entry reads Success.

Password Protect a PDF Using Adobe Acrobat

Adobe Acrobat can add a password to a PDF, too. If you don't have it installed or would rather not pay for it just for this, feel free to grab the free 7-day trial.

  1. Go to File > Open to locate the PDF that should be password protected with Adobe Acrobat; select Open to load it. You can skip this first step if the PDF is already open.

    Open dialog in Adobe Acrobat
  2. Navigate to File > Properties.

    Properties submenu in File menu of Adobe Acrobat
  3. Go into the Security tab.

  4. Next to Security Method:, select the drop-down menu and choose Password Security.

    Password Security dropdown menu item
  5. At the top of that window, under the Document Open section, put a check in the box next to Require a password to open the document.

    Require a password to open the document checkbox
  6. Enter a password in that text box.

    At this point, you can continue through these steps to save the PDF with just a document open password, but if you also want to restrict editing and printing, stay on the Password Security - Settings screen and fill out the details under the Permissions section.

  7. Choose OK and confirm the password by typing it again in the Confirm Document Open Password window.

  8. Choose OK on the Document Properties window to return to the PDF.

  9. Save the PDF to write the open password to it. You can do that via File > Save or File > Save As.

Password Protect a PDF With Microsoft Word

It might not be your first guess that Microsoft Word can password protect a PDF, but it's most certainly capable of doing so! Just open the PDF in Word and then go into its properties to encrypt it with a password.

  1. Use the File Open menu to browse for and open the PDF.

    Open menu in Microsoft Word
  2. Choose OK on the message about Microsoft Word converting the PDF into an editable form.

    PDF conversion prompt in Microsoft Word
  3. Navigate to File > Save As > Browse.

  4. From the Save as type: drop-down menu that probably says Word Document (*.docx), choose PDF (*.pdf).

    Microsoft Word save as PDF option
  5. Name the PDF and then choose Options.

  6. Select the box next to Encrypt the document with a password from the bottom of the prompt.

    Microsoft Word PDF options
  7. Choose OK.

  8. Enter a password for the PDF twice.

    Encrypt PDF Document password prompt in Microsoft Word
  9. Choose OK to save and exit that window.

  10. Pick where to save the new PDF file and then select Save.

  11. You can now exit any open Microsoft Word documents that you're no longer working in.

Password Protect a PDF Using OpenOffice Draw

OpenOffice is a suite of several office products, one of which is called Draw. By default, it can't open PDFs very well, nor can it be used to add a password to a PDF. However, the PDF Import extension can help, so be make sure to install that extension once you have OpenOffice Draw on your computer.

The formatting might be a bit off when using PDFs with OpenDraw Draw because it's not really intended to be a PDF reader or editor. This is why we've listed it after the better options above.

  1. Open OpenOffice Draw and go to File > Open.

  2. Select and open the PDF file you want password protected.

    It might take several seconds for Draw to open the file, especially if there are several pages and lots of graphics. Once it's fully opened, you should take this time to edit any text that might have been altered when Draw attempted to import the file.

  3. Go to File > Export as PDF.

    Export to PDF option in OpenOffice Draw
  4. Access the Security tab and select Set passwords.

  5. Using the first two text boxes, type the password that you want the PDF to have to prevent someone from opening it.

    PDF password prompt in OpenOffice Draw

    You can also put a password in the last two fields if you want to protect the permissions from being changed.

  6. Choose OK to save and exit that window.

  7. Select Export and then save the PDF, picking a custom name and location if you so choose.

  8. You can now exit OpenOffice Draw if you're done with the original PDF.

Password Protect a PDF Using an Online Service

Use one of these websites if you don't have those programs from above, aren't willing to download them, or would just prefer to add a password to your PDF in a faster way.

  • Soda PDF lets you upload from your computer or load the file directly from your Dropbox or Google Drive account.
  • Smallpdf is extremely similar, except it defaults to 128-bit AES encryption. Once your PDF is uploaded, the encryption process is quick, and you can save the file back to your computer or your account at Dropbox or Google Drive.
  • FoxyUtils is one more example. Just upload the file from your computer or a cloud storage site, choose a password, and optionally put a check in any of the custom options like to allow printing, modifications, copying and extracting, and filling out forms.

You have to make a free user account at FoxyUtils before it will process the file.

Encrypt PDFs on macOS

Most of the programs and all of the websites from above will work just fine for password protecting PDFs on your Mac. However, they really aren't necessary since macOS provides PDF encryption as a built-in feature!

  1. Open the PDF file to have it load in Preview. If it doesn't open automatically, or a different application launches instead, open Preview first and then go to File > Open.

    You can also edit PDFs on a Mac with Preview.

  2. Navigate to File Export as PDF.

  3. Name the PDF and choose where you want to save it.

  4. Put a check in the box next to Encrypt.

    If you don't see the "Encrypt" option, use the Show Details button to expand the window.

  5. Enter the password for the PDF, and then do it again to verify.

    PDF encryption settings in Preview for Mac
  6. Choose Save to save the PDF with the password enabled.

Was this page helpful?

H

H

H

H

H

Hi

Contact Form

Name

Email *

Message *

Search This Blog

Popular Posts