Database - Design & Implementation - 1
Upcoming SlideShare
Loading in...5
×
 

Database - Design & Implementation - 1

on

  • 3,382 views

 

Statistics

Views

Total Views
3,382
Views on SlideShare
3,382
Embed Views
0

Actions

Likes
0
Downloads
83
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • ----- Meeting Notes (12/28/11 19:20) -----

Database - Design & Implementation - 1 Database - Design & Implementation - 1 Presentation Transcript

  • TRIVUz Academy DB01 Class Id:DATABASEDesign & ImplementationTRIVUz Academy MS Alam TRIVUz Founder, TRIVUz Network
  • TRIVUz AcademyRecap PF01 & PF02 TRIVUz Academy
  • Recap We meet a customer We understand his needs We make a plan We scratch the design Database Design TRIVUz Academywww.trivuzacademy.com www.trivuzacademy.com
  • We are going to learn Brief introduction on Database Array Array Functions Global Array Loop for, do…while, for each Functions Database Design TRIVUz Academywww.trivuzacademy.com
  • DATABASE Brief IntroductionTRIVUz Academy
  • DATABASE Brief Introduction What is Database? Often abbreviated DB. A collection of information organized in such a way that a computer program can quickly select desired pieces of data. You can think of a database as an electronic filing system.TRIVUz Academy
  • DATABASE Brief Introduction What is Database? Traditional databases are organized by fields, records, and files.  A field is a single piece of information;  a record is one complete set of fields;  and a file is a collection of records.TRIVUz Academy
  • DATABASE Brief Introduction What is Database? For example, a telephone book is analogous to a file. It contains a list of records, each of which consists of three fields: name, address, and telephone number.TRIVUz Academy
  • DATABASE Brief Introduction What is Database? For example, a telephone book is analogous to a file. It contains a list of records, each of which consists of three fields: name, address, and telephone number. Name Address Phone Number Mr. Khan Banani, Dhaka 02-01020304 Farah Zebin Uttara, Dhaka 02-23344556 Robindranath Uttara, Dhaka 02-44543212TRIVUz Academy
  • DATABASE Brief Introduction DBMS To access information from a database, you need a database management system (DBMS). This is a collection of programs that enables you to enter, organize, and select data in a database.TRIVUz Academy
  • DATABASE Brief Introduction RDBMS A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. Most popular databases currently in use are based on the relational database model.TRIVUz Academy
  • DATABASE Brief Introduction RDBMS A short definition of an RDBMS is: A DBMS in which data is stored in tables and the relationships among the data are also stored in tables. The data can be accessed or reassembled in many different ways without having to change the table forms.TRIVUz Academy
  • DATABASE Brief Introduction RDBMS A short definition of an RDBMS is: A DBMS in which data is stored in tables and the relationships among the data are also stored in tables. The data can be accessed or reassembled in many different ways without having to change the table forms.TRIVUz Academy
  • DATABASE Brief Introduction History The database concept The database concept has evolved since the 1960s to ease increasing difficulties in designing, building, and maintaining complex information systems (typically with many concurrent end-users, and with a diverse large amount of data). It has evolved together with database management systems which enable the effective handling of databases.TRIVUz Academy
  • DATABASE Brief Introduction History Evolution of database and DBMS technology The introduction of the term database coincided with the availability of direct-access storage (disks and drums) from the mid-1960s onwards. The term represented a contrast with the tape-based systems of the past, allowing shared interactive use rather than daily batch processing.TRIVUz Academy
  • DATABASE Brief Introduction History Evolution of database and DBMS technology In the earliest database systems, efficiency was perhaps the primary concern, but it was already recognized that there were other important objectives. One of the key aims was to make the data independent of the logic of application programs, so that the same data could be made available to different applications.TRIVUz Academy
  • DATABASE Brief Introduction History Evolution of database and DBMS technology The first generation of database systems were navigational, applications typically accessed data by following pointers from one record to another. The two main data models at this time were the hierarchical model, epitomized by IBMs IMS system, and the Codasyl model (Network model), implemented in a number of products such as IDMS.TRIVUz Academy
  • DATABASE Brief Introduction History Evolution of database and DBMS technology The Relational model, first proposed in 1970 by Edgar F. Codd, departed from this tradition by insisting that applications should search for data by content, rather than by following links.TRIVUz Academy
  • DATABASE Brief Introduction History Evolution of database and DBMS technology Relational systems placed heavy demands on processing resources, and it was not until the mid 1980s that computing hardware became powerful enough to allow them to be widely deployed. By the early 1990s, however, relational systems were dominant for all large- scale data processing applications, and they remain dominant today (2011) except in niche areas.TRIVUz Academy
  • DATABASE Brief Introduction History Evolution of database and DBMS technology The dominant database language is the standard SQL for the Relational model, which has influenced database languages also for other data models.TRIVUz Academy
  • DATABASE Quick Look SQL ??? What is SQL? SQL, or Structured Query Language, is a specialized type of programming language developed to work with relational databases such as MySQL, Oracle, Microsoft SQL Server, PostgreSQL, Informix, and others. The SQL standard is defined by ANSI, the American National Standards Institute in their ISO/IEC 9075:1992 document. (The standard is commonly referred to as ANSI SQL-92.) Every relational database applies its own version of the SQL standard; many enhance that standard. Standardizing the programming language allows the devel- oper to address the database in much the same way from platform to platform — and every major platform has such products written for it. Table 1-2 compares some popular relational-database products as illustrative examples.TRIVUz Academy
  • DATABASE Brief Introduction History Ancient to modern http://math.hws.edu/vaughn/cpsc/343/2003/history.ht mlTRIVUz Academy
  • DATABASE Brief Introduction History General-purpose DBMS A DBMS has evolved into a complex software system and its development typically requires thousands of person-years of development effort. Some general- purpose DBMSs, like Oracle, Microsoft SQL server, and IBM DB2, have been in on-going development and enhancement for thirty years or more.TRIVUz Academy
  • DATABASE Brief Introduction History Types of people involved Three types of people are involved with a general-purpose DBMS: 1. DBMS developers - These are the people that design and build the DBMS product, and the only ones who touch its code. They are typically the employees of a DBMS vendor (e.g., Oracle, IBM, Microsoft, Sybase), or, in the case of Open source DBMSs (e.g., MySQL), volunteers or people supported by interested companies and organizations. They are typically skilled systems programmers. DBMS development is a complicated task, and some of the popular DBMSs have been under development and enhancement (also to follow progress in technology) for decades.TRIVUz Academy
  • DATABASE Brief Introduction History Types of people involved 2. Application developers and Database administrators - These are the people that design and build a database-based application that uses the DBMS. The latter group members design the needed database and maintain it. The first group members write the needed application programs which the application comprises. Both are well familiar with the DBMS product and use its user interfaces (as well as usually other tools) for their work. Sometimes the application itself is packaged and sold as a separate product, which may include the DBMS inside (see Embedded database; subject to proper DBMS licensing), or sold separately as an add-on to the DBMS.TRIVUz Academy
  • DATABASE Brief Introduction History Types of people involved 3. Applications end-users : (e.g., accountants, insurance people, medical doctors, etc.) – These people know the application and its end-user interfaces, but need not know nor understand the underlying DBMS. Thus, though they are the intended and main beneficiaries of a DBMS, they are only indirectly involved with it.TRIVUz Academy
  • DATABASE Brief Introduction Advantages The speed, accuracy, reporting and thoroughness of electronic databases make them critical to today’s 24/7 high-speed exchange of information.TRIVUz Academy
  • DATABASE Brief Introduction Advantages Speed: Format means quick storage and retrieval of information. Users and applications have a quick means for asynchronous reads and writes of data.TRIVUz Academy
  • DATABASE Brief Introduction Advantages Accuracy: Given careful data input, databases provide accurate and consistent results based on their data.TRIVUz Academy
  • DATABASE Brief Introduction Advantages Reporting: Information can be gathered, quantified, and custom-analyzed with greater flexibility.TRIVUz Academy
  • DATABASE Brief Introduction Advantages Thoroughness: Databases can store and report results as complete and detailed as their holdings — at electronic speed.TRIVUz Academy
  • DATABASE Brief Introduction Advantages Thoroughness: Databases can store and report results as complete and detailed as their holdings — at electronic speed.TRIVUz Academy
  • DATABASE Choose RDBMS Existing RDBMSTRIVUz Academy
  • DATABASE Introducing MySQL What is MySQL? MySQL is the worlds most popular open source RDBMS.TRIVUz Academy
  • DATABASE Introducing MySQL Why MySQL? MySQL is the worlds most popular open source RDBMS. MySQL is used from many large scale web sites including Google and NASA, and is a very strong competitor to even the likes of Microsoft SQL Server and Oracle. MySQL is incredibly fast, provides support for full text searches, and is widely supported.TRIVUz Academy
  • DATABASE Introducing MySQL Comparison of SQL ImplementationsTRIVUz Academy
  • DATABASE Introducing MySQL MySQL Enterprise-Level Database FeaturesTRIVUz Academy
  • DATABASE Introducing MySQL MySQL Enterprise-Level Database FeaturesTRIVUz Academy
  • DATABASE Introducing MySQL What MySQL Does Bes  Web applications: Web applications typically feature many reads and few writes. MySQL is fast and can meet the demands of Internet speed. In my experience, MySQL has proven time and again that it outperforms other RDBMS products in Web applications.  Enterprise-level applications: MySQL offers support directly through the parent company, MySQL AB. MySQL’s feature set includes just about every- thing that an enterprise-level application would need. Refer back to Table 1-4 for more details.  Open-source support: MySQL AB is responsive to requests for features as well. MySQL is open-source; everyone is welcome to download and extend the code to meet his or her needs.TRIVUz Academy
  • DATABASE Introducing MySQL What MySQL Does Bes  Low overhead: MySQL runs comfortably for many applications on an Intel Pentium- class computer with 32 MB of RAM or less. I wouldn’t recommend running an enterprise-level MySQL implementation on such a system, but consider the utter futility of trying to run a Web application on Internet Information Server with Microsoft SQL Server that runs under Windows 2000 on a Pentium-class computer with 32 MB of RAM.  Available large table size: MySQL tables can grow large, though they do sometimes encounter file-size limitations of the host operating system. Some architectures, however, can accommodate up to 8 terabytes (TB) per table using MySQL.  Stability: All software is in development. Some features in MySQL are newer than others, making them possibly less stable than others. Table 1-6 shows some of the features within MySQL and their stability level.TRIVUz Academy
  • DATABASE Database Concepts & Design What is data? What is database? Why use a Database? How are database used?TRIVUz Academy
  • DATABASE Database Concepts & Design Database Design Database design is the process of determining and organizing the information to track. Many iterations of a database design occur as you try to achieve an efficient design and maximize your use of resources.TRIVUz Academy
  • DATABASE Database Concepts & Design The Database Life Cycle • Requirements analysis • Logical design of the database • Physical design of the database • Implementation and subsequent modification of the databaseTRIVUz Academy
  • DATABASE Database Design Requirement Analysis Gather information on the business process and items Analysis and Document them properlyTRIVUz Academy
  • DATABASE Database Design Logical Design Entities and attributes At a basic level of a data model are entities — objects that you are interested in as part of the data model you are creating. Example – Marksheet Entities have identifying qualities — attributes. For example, the Marksheet entity has such attributes as StudentID, Subject and Marks.TRIVUz Academy
  • DATABASE Database Design Logical Design Entities Marksheet Attributes StudentID, Subject, MarksTRIVUz Academy
  • DATABASE Database Design Example Entities Marksheet Attributes StudentID, Subject, Marks Table: marksheet Student ID Subject Marks 1001 Math 78 1003 Math 85 1005 Math 34TRIVUz Academy
  • DATABASE Database Design Okay, we designed our database. We got all our Entity & attributes. What now?TRIVUz Academy
  • DATABASE Database Design Next… We have to create our physical database.TRIVUz Academy
  • DATABASE SQL IntroductionTRIVUz Academy
  • DATABASE SQL Introduction What is SQL? SQL, or Structured Query Language, is a specialized type of programming language developed to work with relational databases such as MySQL, Oracle, Microsoft SQL Server, PostgreSQL, Informix, and others.TRIVUz Academy
  • DATABASE SQL Introduction What is SQL? The SQL standard is defined by ANSI, the American National Standards Institute in their ISO/IEC 9075:1992 document. (The standard is commonly referred to as ANSI SQL-92.) Every relational database applies its own version of the SQL standard; many enhance that standard. Standardizing the programming language allows the devel- oper to address the database in much the same way from platform to platform — and every major platform has such products written for it. Table 1-2 compares some popular relational-database products as illustrative examples.TRIVUz Academy
  • DATABASE SQL Example Creating our Tables Syntax CREATE [TEMPORARY] TABLE [IF NOT EXISTS] <tablename> [(<create_statement>,...)] [table_options] [select_statement]TRIVUz Academy
  • DATABASE SQL Example Creating our Tables Code CREATE TABLE marksheet ( marks_id int(11) NOT NULL PRIMARY KEY, student_id int(11), subject varchar(255), marks varchar(255) );TRIVUz Academy
  • Thank You MS Alam TRIVUz Founder, TRIVUz Academy trivuz@gmail.com