Sunday, December 29, 2019

Programming SQLite in C Tutorial Two

This tutorial is the second in a series on programming SQLite in C. SQLite stores a collection of tables in a single file database, usually ending in .db. Each table is like a spreadsheet, it consists of a number of columns and each row has values. If it helps, think of each row as being a struct, with the columns in the table corresponding to the  fields in the struct. A table can have as many rows as will fit on a disk. There is an upper limit but its huge 18,446,744,073,709,551,616 to be precise. A table can have up to 2,000 columns or if you recompile the source, you can max it to an awesome 32,767 columns. The SQLite API To use SQLite, we need to make calls to the API. You can find an introduction to this API on the official Introduction to SQLite C/C Interface web page. Its a collection of functions and easy to use. First, we need a handle to the database. This is of type sqlite3 and is returned by a call to sqlite3_open( filename, **ppDB). After that, we execute the SQL. Lets have a slight digression first though and create a usable database and some tables using SQLiteSpy. (See the previous tutorial for links to that and the SQLite Database Browser). Events and Venues The database about.DB will hold three tables to manage events at several venues. These events will be parties, discos, and concerts and will take place at five venues (alpha, beta, charlie, delta, and echo). When you are modeling something like this, it often helps to start with a spreadsheet. For simplicities sake, Ill just store a date not a time. The spreadsheet has three columns: Dates, Venue, Event Type and about ten events like this. Dates run from 21st to 30th of June 2013. Now SQLite has no explicit date type, so its easier and faster to store it as an int and the same way that Excel uses dates (days since Jan 1, 1900) have int values 41446 to 41455. If you put the dates in a spreadsheet then format the date column as a number with 0 decimal places, it looks something like this: Now we could store this data in one table and for such a simple example, it would probably be acceptable. However good database design practice requires some normalization. Unique data items like venue type should be in its own table and the event types (party etc) should also be in one. Finally, as we can have multiple event types at multiple venues, ( a many to many relationship) we need a third table to hold these. The three tables are: venues - holds all five venueseventtypes - holds all three event typesevents - holds the date plus venue id plus event type id. I also added a description field for this event eg Jims Birthday. The first two tables hold the data types so venues have names alpha to echo. Ive added an integer id as well and created an index for that. With the small numbers of venues (5) and event types (3), it could be done without an index, but with larger tables, it will get very slow. So any column that is likely to be searched on, add an index, preferably integer The SQL to create this is: The index on the events table has date, id-event, the event type, and venue. That means we can query the event table for all events on a date, all events at a venue,all parties etc and combinations of those such as all parties at a venue etc. After running the SQL create table queries, the three tables are created. Note Ive put all that sql in the text file create.sql and it includes data for populating some of the three tables. If you put ; on the end of the lines as Ive done in create.sql then you can batch and execute all the commands in one go. Without the ; you have to run each one by itself. In SQLiteSpy, just click F9 to run everything. Ive also included sql to drop all three tables inside multi-line comments using /* .. */ same as in C. Just select the three lines and do ctrl F9 to execute the selected text. These commands insert  the five venues: Again Ive included commented out text to empty tables, with the delete from lines. Theres no undo so be careful with these! Amazingly, with all the data loaded (admittedly not much) the entire database file on disk is only 7KB. Event Data Rather than build up a bunch of ten insert statements, I used Excel to create a .csv file for the event data and then used the SQLite3 command line utility (that comes with SQLite) and the following commands to import it. Note: Any line with a period (.) prefix is a command. Use .help to view all commands. To run SQL just type it in with no period prefix. You have to use double blackslashes \\ in the import path for each folder. Only do the last line after the .import has succeeded. When SQLite3 runs the default separator is a : so it has to be changed to a comma before the import. Back to the Code Now we have a fully populated database, lets write the C code to run this SQL query which returns a list of parties, with description, dates and venues. New to SQL? Read What is SQL? This does a join using the idvenue column between the events and venues table so we get the name of the venue not its int idvenue value. SQLite C API Functions There are many functions but we only need a handful. The order of processing is: Open database with sqlite3_open(), exit if have error opening it.Prepare the SQL with sqlite3_prepare()Loop using slqite3_step() until no more records(In the loop) process each column with sqlite3_column...Finally call sqlite3_close(db) Theres an optional step after calling sqlite3_prepare where any passed in parameters are bound but well save that for a future tutorial. So in the program listed below the pseudo code for the major steps are: The sql returns three values so if sqlite3.step() SQLITE_ROW then the values are copied from the appropriate column types. Ive used int and text. I display the date as a number but feel free to convert it to a date.​ Listing of Example Code

Saturday, December 21, 2019

Explain What Happened to the Gore-Tex. Brand After the...

Case study notes This case study explores a very unique organisation: W.L. Gore Associates. It explores the role of organisational management and culture within a very innovative firm, which is responsible for some very well-known products such as the famous Gore-Tex fabric, and yet few people know much about this remarkable organisation. It is operated in a way similar to that of a cooperative such as The John Lewis Partnership in the UK, where the employees are also owners. In addition, the organisation seeks to minimise management with the emphasis on action and creativity. Case study questions 1. Explain what happened to the Gore-Tex brand after the patent expired. What activity can firms use to try to maintain any advantage developed†¦show more content†¦It is a well-trodden path of a technology-push strategy. The strategy is now being challenged by competitors who are entering the markets and offering competing products often inferior but competitively priced. Gore will need to decide whether to try to compete on the price or to develop a brand for which consumers are willing to pay a premium. 6. Using CIM (Figure 1.9) illustrate the innovation process within W.L. Gore. CIM has four processes around the outside and the entrepreneur in the middle. We can try to use this to identify key activities within the innovation process: Natural sciences cycle Many innovations are applications of existing technology; in such cases, this part of the framework may not be used. In the Gore-Tex case, the new science is the creation of PTFE, but this was back in the 1960s. Integrated engineering cycle As with so many innovations, this is where most of the technical effort takes place. Gore has spent the past 50 years applying PTFE to many different applications and they keep finding new uses for the technology. The stretching of PTFE to create lots of tiny holes in it led to the breathable membrane – maybe other firms would have seen this as a fault and thrown the technology away. It is the curiosity in the Ramp;D scientists which often leads to new product ideas. Differentiated services cycle During this phase, the technology is adapted to meet specific needs of

Thursday, December 12, 2019

Analyse The Service Management System And Strategy of Amazon

Question: Discuss about the Analyse The Service Management System And Strategy of Amazon. Answer: Introduction The following text discusses the service management of the company named Amazon and how the different service model of applies to the company. The objective of the study is given. The focus is given to the ITIL (information technology Infrastructure library) service management process (Zurich, 2017). Five stages of this infrastructure is explained. The part of the system that applies to Amazon are discusses. The different operational activity that applies to the Amazon internet base system is given. Amazon is known as the customer-oriented company and operates on higher margin of profit, though there are, some challenges that they faces are crucial to eliminate. The internal business model operation and other strategies that they have applied are discussed. The more focus is given on the customer service segment and customer relationship management system as the company is famous for their customer oriented tech and management. Based on the analysis the recommendation for improvement in the service strategy is also given (Jurkscheit, 2014). Objective of the study The primary objective of the study is to analyse the different service management framework and implementation strategy of Amazon. While analysing the different aspects, theories and models of service management implementation the recommendation for the improvement of their different business process in alignment with the needed architecture of planning and implementation of the service management will be given in the report. The secondary objective is to apply the theories and models, which are foundation of any service management department and part of organisation. Aligning the theories will be given much emphasis throughout the project (Zurich, 2017). Scope of the study Through this study and research the service management implementation and customer relationship management, which is an essential part of service recovery management system, will be thoroughly discussed. The analysis of the internal and external service management system will be discussed which will further help me build the foundation for further study and increase the domain of the knowledge of any reader of the report, including myself. Background of the company Since the last two decades, Jeff Bezos found the most popular ecommerce sight that has gain the attention of customers worldwide is Amazon and it in 1995. The virtual platform has changed many times over the decades and known as the largest online store. According to the annual report of the company, they serve four kinds of customers consumers, content creators, enterprises, and sellers. The company serves its customers through their official website called Amazon.com. The company operates in the information technology business and therefore the It service process and management system will be discussed in the text (Mohammed Syed, 2015). Key findings and issues The framework that helps companies developing the IT structure in their company is known as the ITIL (Information technology Infrastructure Library) service strategy. The IT service management system is a five-stage process. The company is known as the most successful implementer of customer oriented relationship Management Company (Al Mourad Hussain, 2014). The five stages are Demand management This part goes as designing the strategy that involves portfolio management, financial management, defining the market and preparing for execution (Al Mourad Hussain, 2014). Information security management Capacity and availability management and service catalogue management and supplier management comes under this service design process. Service asset and configuration management Asset management, planning, support, also the validation, and testing of the process and release and deployment and change as well as knowledge management, these are the part of the process of this phase Common service operation activities Problem management and request fulfilments, incidents and access management of the company is known as the service operation process Improvement This part of the phase gives emphasis in improvement of the strategy by reporting and measuring the plans and strategies that have been implemented for continuation of the service improvement (Jurkscheit, 2014). IT service management strategy used by the Amazon Information system The company is totally orientated around the information system that they have to give more of their concentration in improving with the trend and demand of their customers. The first of the suppliers are Digital Alpha services. Then again, the company renovated their system analysis software that included Epiphany, logistics system from manugistics and new DBMS from oracle. Suppliers and communication system For communication with the suppliers, Amazon dealt with Excelon for business-to-business integration system. In addition, Amazon Web Services have been developed for simple storage services for systems developed by Amazon. This service is enabled by the company to store products and data of huge number of customers. In addition, it includes the Customer relationship management system that includes data mining, wish lists and searching through the customers information, which is fast, reliable and secured at every moment (Beloglazove et al., 2012). To track the fraudsters the company they have a technology called Smart Analysis Search(SAS). This reduces the systems malwares and chance of trapping the fraud, by analyzing behavioral pattern, so that the customers as well as the system is secured from further disadvantages of online threats(Klaus, 2013). The company has enabled Service Oriented Architecture (SOA). Thus it has mainly distributed and decentralized the platform of the website and applications. The information system thus is scalable and robust. The SOA concentrate in integrating multiple applications rather than focusing on handling bigger process control. Transaction processing system This system comes under the service process or operational activities that the company operates in. Every customer has a different profile in Amazon. The system lets the customers to personalizing their profile and web tools to help them shopping. The one click purchase system, card transactions, and email communication, direct shipping of products functions operates very efficiently and with one click system. No need to fulfill the order forms every time one makes a purchase. The server is enabled to provide information about their registration required from previous customers (Klaus, 2013).. Information security system Secured transaction system is provided for the customers and debit and credit card information is encrypted while performing the requirement of purchase. The security in the internet is information system is incorporated for further improvement. Based on linking the data among the search and search engine as well as the information from search tools are gathered and mined for their clear and thorough recommendation system. The searches of the customers and queries are patterned and tracked along their plan of enhancing the searching experience and interactive platform are optimized for maximum customer satisfaction (Salovaara, 2015). Interactive searching system Amazon uses the interactive searching option that enables the systems to connect to the customers desired items from the catalogue, gaining information from the search tools (Klaus, 2013). ERP system Amazon uses the ERP of Oracle for the resources that they need from different resources. The automated service of taking order and connecting the need to the nearest distribution center of the delivery is also a part of their enterprise resource system. This system fastens the order taking and fulfillment process by the tracking the order and eliminates any mistakes due to distributional deficiency (Lucio-Nieto et al., 2012). Customer relationship management Customer selection and customer acquisition strategies of Amazon are done by creating database store of the customers account. Wish lists and review systems that are based on the favorite chosen items by customers. This also helps in direct marketing as they have acquired the 3 million customers in 3 months because of their review systems. Customer retention strategy is also the impeccable of the company as results shows that 40% of their listed customers are frequent customer of Amazon (Grnroos et al. 2013). The market place has become competitive in the field in the last years and therefore, the competitive environment have pushed them to extent their customers base. Internal challenges The company operates in a business model that has high pressure and extreme load. The rapidly evolving business models also poses challenges for the company. The trends in industry segment and internet usage pattern are also ever changing which poses risk for the company. Though the company operates on high margin, offering the lowest price to their customers can have negative influence in their bottom line (Lucio-Nieto et al., 2012). The revenue that they operate on is much more dependent upon the cloud service that they give others. The main concern of them is to operate on higher margin rather than losing the medium class customer base of their organisation. Maintaining the suppliers relationship is also very important though dominating their suppliers has been regarded as a grave issue for Amazon being the global leader in ecommerce business (Salovaara, 2015). External challenges The growth and development of Amazon prime in international market has been challenging in the initial years. Flip kart, which has been developed by the two of the ex Amazon employees has ripped the company from its chances of first mover advantage of entering India. Amazons 40% of the revenue from its global market sales, which is Germany, Japan, the UK and other significant geographical area. Snapdeal, eBay, Jabong are main competitors of them in India (Grnroos et al. 2013). In China, the other competitor is Alibaba, which is better established than eBay and Amazon. The biggest initial public offering was given over in China and the market share of the company failed due to their strong presence. Many global and giant retailers are coming online with their own products as well as their optimised websites , which is also challenging for the company to handle as they will have certainly some advantage in terms of following through their customers retention strategy by giving good cus tomer loyalty programs (Osborne et al., 2013). Challenges they face as customers behaviour and demands change The exchange rate risk is always there, which threatens the company and the customer preference in purchase decision of different products. The push strategy in increasing their sale works for them by using the search data and analysing the data by mining. Though the evolving nature of market is always, there Amazons adaptive technology is efficient enough to identify the market trend and predicting the behavioural pattern of their purchase decision. Recommendations to improve on the Service Strategy From the above discussions and analysis, the following strategies to improve their internal and external services can be suggested for Amazon. Competing the in this field has become challenging as the Capital Investment in developing this sectors business is less. Therefore, the competitors are investing a large amount in these sectors. The competitors also include the retail shops of global market. So more and consistent investment in business is required to remain in the future competition (Badinelli et al., 2012). Not only developing the products of their own but also the innovation of better service management and more smooth communication must be implemented in their operation system. The transition of the storage service of the companies from DBMS to clouds must be used (Iden Eikebrokk, 2013) More research and development in identifying the behavioural pattern of their customers and gathering web tools must be used to enrich their customer service and relationship management. Global expansion of the in significant strategic places where supply chain and logistics management activities will be rather effective as well as efficient in purpose of meeting the demand and also the capacity of Amazon will maximise their margin. The procurement from the suppliers and in global context is a huge step but Amazon has advantage of having all the right resource to source from (Buytaert et al., 2014). Drone delivery system and integration of adaptive technologies must also be suggested to be incorporated to the company. Conclusions Therefore, from the above discussion and analysis of the service management system it can be concluded that Amazon is in a position of Global leader in ecommerce field. The most important part of their service management system is the customer relationship management. The ERP and supply chain and logistics management that they use are efficiently optimised. The different operational activity that applies to the Amazon internet base system is given. The external and internal challenges that they faces are discussed in the above text too. The recommendation for further improvement in their service strategy is also given in the above discussion. References Al Mourad, M. B., Hussain, M. (2014). The impact of cloud computing on ITIL service strategy processes.International Journal of Computer and Communication Engineering,3(5), 367. Badinelli, R., Barile, S., Ng, I., Polese, F., Saviano, M., Di Nauta, P. (2012). Viable service systems and decision making in service management.Journal of Service Management,23(4), 498-526. Beloglazov, A., Abawajy, J., Buyya, R. (2012). Energy-aware resource allocation heuristics for efficient management of data centers for cloud computing.Future generation computer systems,28(5), 755-768. Buytaert, W., Zulkafli, Z., Grainger, S., Acosta, L., Alemie, T. C., Bastiaensen, J., ... Foggin, M. (2014). Citizen science in hydrology and water resources: opportunities for knowledge generation, ecosystem service management, and sustainable development.Frontiers in Earth Science,2, 26. Grnroos, C., Edvardsson, B., Sheth, J. N. (2013).Service management. SAGE Publications. Iden, J., Eikebrokk, T. R. (2013). Implementing IT Service Management: A systematic literature review.International Journal of Information Management,33(3), 512-523. Jurkscheit, J. (2014).An analysis of the success factors in implementing an ITIL-based IT Change and Release Management Application: Based on the IBM Change and Configuration Management Database (CCMDB). Anchor Academic Publishing (aap_verlag). Klaus, P. (2013). The case of Amazon. com: towards a conceptual framework of online customer service experience (OCSE) using the emerging consensus technique (ECT).Journal of Services Marketing,27(6), 443-457. Lucio-Nieto, T., Colomo-Palacios, R., Soto-Acosta, P., Popa, S., Amescua-Seco, A. (2012). Implementing an IT service information management framework: The case of COTEMAR.International Journal of Information Management,32(6), 589-594. Mohammed, F. A., Syed, A. M. R. (2015). Data Framework Management System. Munteanu, V. I., Edmonds, A., Bohnert, T. M., Fortis, T. F. (2014, December). Cloud incident management, challenges, research directions, and architectural approach. InProceedings of the 2014 IEEE/ACM 7th International Conference on Utility and Cloud Computing(pp. 786-791). IEEE Computer Society. Osborne, S. P., Radnor, Z., Nasi, G. (2013). A new theory for public service management? Toward a (public) service-dominant approach.The American Review of Public Administration,43(2), 135-158. Salovaara, A. (2015). Developing Service Design Management Processes Towards ITIL Compliance. Zurich, L. B. (2017). Service Operations and Management.