Docsity

this assignment will give M, Schemes and Mind Maps of Database Programming

Partial preview of the text

Download this assignment will give M and more Schemes and Mind Maps Database Programming in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing Unit number and title Unit 04: Database Design & Development Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name CHU DUC ANH Student ID BH Class SE06206 Assessor name DAO TRAN TRUNG Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature ANHH Grading grid

P1 M1 D

Contents

  • A. Introduce
  • B. Content
    • I. Database Design
        1. Definition of Database
        1. Main types of databases
    • II. Relational Database Management System(DBMS).....................................................................
    • III. Design the database
        1. Database management system (DBMS)
        1. Table
        1. Keys in database
        1. Relationship
        1. Entity description table
        1. Relationships between entities
        1. ERD chart
    • IV. Database Design based on the scenario:
  • C. Conclusion
  • D. References.....................................................................................................................................

Figure 1: Definition of Database ................................................................................................................................................ 3 Figure 2 ....................................................................................................................................................................................... 4 Figure 3 ....................................................................................................................................................................................... 5 Figure 4 ....................................................................................................................................................................................... 6 Figure 5 ....................................................................................................................................................................................... 7 Figure 6 ....................................................................................................................................................................................... 8 Figure 7 ....................................................................................................................................................................................... 9 Figure 8 ..................................................................................................................................................................................... 10 Figure 9 ..................................................................................................................................................................................... 11 Figure 10................................................................................................................................................................................... 12 Figure 11................................................................................................................................................................................... 13 Figure 12................................................................................................................................................................................... 14 Figure 13................................................................................................................................................................................... 16 Figure 14................................................................................................................................................................................... 17 Figure 15................................................................................................................................................................................... 19 Figure 16................................................................................................................................................................................... 20 A. Introduce Today, society and technology develop rapidly, especially in the age of digitalization and the internet. In this context, databases play an extremely important role. We are not simply a place to store information, but are also pillars of global connection and data sharing. Databases have changed the way they work, helping to create innovative applications and services such as social networks, e-commerce and artificial intelligence. We enable business organizations to provide data to customers, track sales revenue and predict market trends. Databases also play an important role in the fields of medicine, science and many other fields. In this ASM I will show you the basics of databases as well as apply them to a simple system.[1] B. Content I. Database Design

1. Definition of Database

  • Database is a collection of organized and stored information in a structured way so that it can be easily accessed, managed and updated. It is an important part of an information system, where data is organized into tables, relationships, and other components to meet the specific needs of an organization or application. Databases help organize data logically and efficiently, from storing personal information to managing large-scale enterprise data. It provides quick data retrieval, protects data integrity, and supports information sharing among members of the organization.
  • Different types of databases can be used depending on specific requirements, including relational databases, non-relational databases (NoSQL databases), and non-relational databases (NoSQL databases). Visual data (Graph Database), each type has separate applications in different situations.[2]

Figure 2

  • Advantages of flat file databases:
    • Simple and easy to understand: Flat file databases have a simple structure that is easy to store and understand. No in-depth knowledge of database management is required.
    • Easy to create and manage: Creating and managing flat file databases is usually simple and requires no complexity. You can use regular text tools to edit data.
    • Easy integration: Data in a flat file database can be easily exported and imported from different applications, so integration with existing applications and systems is usually not complicated.
    • Good for simple data: Flat file databases are suitable for applications with simple data such as contacts, product lists, or application configurations.
  • Disadvantages of flat file databases:
    • Limited scalability: When data becomes complex or relationships between data tables are needed, flat file databases have difficulty being scalable and efficient.
    • Difficulty in retrieving data: Retrieving and filtering data from flat file databases can become quite difficult and slow when the data is large.
    • Weak security and integrity: Flat file databases typically do not provide the same advanced security and access control features as relational database management systems. b. Centralized Database:
  • A centralized database is a specific kind of database that saves information there. Users find it convenient to use various programs to access the saved data from various locations.
  • The authentication mechanism is present in these programs so that users can access data safely.
  • The Central Library, which maintains a central database of each library at a college or institution, is an example of a centralized database. Figure 3
  • Advantages of Centralized Database:
    • It has reduced the risk associated with data management, i.e., data manipulation won't damage the main data.
    • As it manages data in a central repository, data consistency is preserved.
    • Better data quality is provided, allowing businesses to set data standards.
    • Because fewer providers are needed to manage the data sets, it is less expensive.
  • Disadvantages of Centralized Database:
    • The centralized database's size contributes to a longer response time while retrieving data.
    • Updating such a large database system is difficult.
    • Any server failure will result in the loss of all data, which might be a significant loss. c. Distributed Database:
  • Data is dispersed among several database systems within an organization, as opposed to a centralized database system, in distributed systems. Communications links connect these database systems.
  • These links make it easier for consumers to obtain the data.

Figure 5

  • Properties of Relational Database:
    • A method Atomicity: This guarantees that the data operation will end either successfully or unsuccessfully. The 'all or nothing' approach is used. As an illustration, a transaction will either be committed or canceled.
    • The letter C stands for consistency, which signifies that each action we do on the data should retain both its prior and subsequent values. For instance, the account balance should be accurate both before and after the transaction, meaning it should remain conserved.
    • I'm talking about isolation here because multiple users may be simultaneously accessing the database for data. As a result, the data should continue to be isolated. One transaction consequence, for instance, shouldn't be apparent to the effects of other transactions in the database when numerous transactions happen at once.
    • Durability, or D, assures that data modifications should last permanently when the operation is finished and the data is committed. e. NoSQL Database:
  • SQL-Free/Not Only A variety of different data sets can be stored in a SQL database type.It is not a relational database because it stores data in a variety of formats in addition to tabular form. It was created as the need for creating contemporary applications grew.
  • In order to meet the demands, NoSQL offered a wide range of database technologies. The following four types of NoSQL databases can also be distinguished:

Figure 6

  • Key-value storage: It is the most basic form of database storage, storing each item as a key (or attribute name) with its value.
  • Document-oriented Database: a kind of database that uses documents similar to JSON to store data. By employing the same document-model format as utilized in the application code, it aids developers in saving data.
  • Graph Databases: It is used to store enormous amounts of data in a form resembling a graph. Social networking websites most frequently make use of the graph database.
  • Wide-column stores: It is comparable to how relational databases represent data. Instead of being stored in rows, the data is gathered together in these big columns. f. Cloud Database:
  • A specific kind of database that runs on the cloud computing platform and stores data in a virtual environment. For database access, it offers consumers a range of cloud computing services (SaaS, PaaS, IaaS, etc.). There are several cloud platforms, however the following are your best choices:
  • Amazon Web Services(AWS)
  • Microsoft Azure
  • Kamatera
  • PhonixNAP
  • ScienceSoft
  • Google Cloud SQL

Figure 8 h. Network Databases:

  • The database frequently adopts the network data model. In this case, data is represented as a network of interconnected nodes. In contrast to a hierarchical database, it allows each record to have several children and parent nodes to build a generic graph structure.

Figure 9 II. Relational Database Management System(DBMS)

  1. Define of DBMS
  • DBMS is software designed to be able to identify, perform operations, retrieve and manage data in the Database. A DBMS is typically capable of manipulating data itself, data formats, field names, record structures, and file structures. It also defines rules for validating and manipulating data.
  • With DBMS, users can edit/delete/add data without needing framework programs. Query programming languages like SQL are often bundled with DBMSs to make it easier for programmers to interact with the data they need. (https://quantrimang.com/)

Figure 11

  • RDBMS refers to the database program itself, whereas a relational database refers to the kind of database that RDBMS handles. The software is the one that runs queries on the data, adding, updating, and looking for values. The data may be represented visually by an RDBMS as well.
  • For instance, it might provide data in tables, much like a spreadsheet, allowing you to view and even modify specific values. You can design forms in several RDBMS programs that will make it easier to enter, amend, and delete data.
  • RDBMSs are used by the majority of well-known DBMS programs. Oracle Database, MySQL, Microsoft SQL Server, and IBM DB2 are a few examples. Although several of these programs can support non- relational databases, relational database management is their main function.
  • Oracle NoSQL Database, IBM Domino, and Apache HBase are a few examples of non-relational databases. Other DBMS tools that support NoSQL and are not RDBMSs are used to manage these kinds of databases.
  1. Popular RDBMSs: a. MySQL: (https://www.mysql.com/)
  • MySQL is the most popular free open source database management system in the world, MySQL, is widely used in the creation of applications. Because MySQL is a quick, dependable, and simple-to-use database management system, it can run on many different operating systems and offer a wide range of powerful utility features. MySQL is appropriate for applications that access databases on the Internet because of its great speed and security.

Figure 12

  • Feature of MySQL:
    • Based on SQL (Structured Query Language) queries, MySQL is a relational database management system (RDBMS).
    • It is one of the most widely used languages for organizing and gaining access to table records.
    • Under the terms of the GNU license, MySQL is free and open-source software. The Oracle Corporation backs it.
  • The most important features of MySQL:
    • RDBMS: MySQL is one. To access and manage the table's records, this database language is based on SQL queries.
    • Easy to use: Using MySQL is simple. We merely need to learn the fundamentals of SQL. With just a few straightforward SQL queries, MySQL may be created and used.
    • It is protected: MySQL has a strong data security layer that shields private information from outsiders. Additionally, MySQL encrypts passwords.
    • Client/Server Architecture: MySQL operates in accordance with this type of architecture. A database server (MySQL) and an arbitrary number of clients (application programs) are present and interact with the server.
    • Free to download: Since MySQL is open source, we can get it for free from the company's website.

Figure 13

  • Features of Oracle:
    • It is constantly accessible and active. Oracle Data Guard capability enables highly availability databases. Due to its functionality, the secondary database can serve as a backup copy of the primary database in the event of a failure. As a result, none of the regular procedures, including backups and partial failures, interfere with the use of databases.
    • Security: Oracle has a system in place for managing and accessing the database that guards against unauthorized use. Because of the Oracle Advanced Security features, it offers great security. Data encryption is supported by TDE both at the source and after export. Application-level redaction takes place. Other security features offered by Oracle include Oracle Label Security and Oracle Database Vault, which controls user privileges.
    • Scalability: RAC (Real Application Cluster) and portability are characteristics that make an Oracle database scalable in accordance with usage. It provides features like rolling instance migrations, conducting upgrades, preserving application continuity, quality of service management, etc. in a clustered environment.
    • Oracle offers solutions for enhancing performance, including Oracle Advanced Compression, Oracle Database In-Memory, Oracle Real Application Testing, and Oracle TimesTen Application-Tier Database Cache. Their major goal is to achieve the best level of system performance.
    • Analytics: Oracle offers the following analytics-related products and services:
      • OLAP (Oracle Analytic Processing) is a version of Oracle that is used to do intricate analytical calculations on corporate data.
  • Oracle Advanced Analytics helps companies develop predictive business models through data and text mining, statistical data computing, and the technical integration of Oracle R Enterprise and Oracle Data Mining.
  • Database management tool Oracle Multitenant combines a single container database with numerous pluggable databases in a consolidated form. c. Microsoft SQL server
  • Microsoft SQL Server is a robust relational database management system (RDBMS) designed to support a wide range of transaction processing, business intelligence, and analytics applications within corporate IT environments. It stands as one of the top three leading database technologies, sharing this distinction with Oracle Database and IBM's DB2.
  • Similar to other RDBMS software, Microsoft SQL Server is built upon SQL, a standardized programming language employed by database administrators (DBAs) and IT professionals for the management of databases and the retrieval of data stored within them. SQL Server specifically relies on Transact-SQL (T-SQL), an implementation of SQL developed by Microsoft that introduces a set of proprietary programming extensions to augment the capabilities of the standard language. Figure 14
  • Features of Microsoft SQL Server:
  • Intelligent Query Processing Enhancements: Microsoft SQL Server includes intelligent query processing features that improve the performance of queries and optimize execution plans.