logo资料库

Getting Started with OrientDB.docx

第1页 / 共226页
第2页 / 共226页
第3页 / 共226页
第4页 / 共226页
第5页 / 共226页
第6页 / 共226页
第7页 / 共226页
第8页 / 共226页
资料共226页,剩余部分请下载后查看
Claudio Tesoriero
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Installing OrientDB
Standard Edition
Graphed Edition
Key/Value Edition
Enterprise Edition
Installing from the latest stable release
Installing the Standard Edition
Installing the Graphed Edition
Compiling from the latest source snapshot
Running the test suite
Installing as a daemon/service
Linux systems
Windows systems
Summary
Administering OrientDB
Configuration
orientdb-server-config.xml
orientdb-dserver-config.xml
The OrientDB console
OrientDB data files
Classes
Abstract classes
Security
Rules
Roles
Users
Server users
Record-level security
The OrientDB Studio
The Database section
The Query section
The Document section
The Functions section
The Graph section
The Raw access section
The root user
Back up / restore
Using the console
Using the OrientDB Studio
Automatic backup
Summary
Programming OrientDB
Data types
Extended SQL
Creating a database
Creating classes
Inserting records
Deleting records
Reading and updating records
Fields
Embedded documents
Containers
Schema-full classes and the mixed-mode schema
Relationships
One-to-one and one-to-many relationships
Embedded relationships
Many-to-many relationships
Referenced relationships
Traversing the relationships
SQL functions
The graph database
Using the JDBC driver
Other language drivers such as PHP
The native Java API
Opening a connection
Connection pools
Executing SQL queries
Executing SQL commands
Create, load, update, and delete a document
Object database support
RESTful APIs
Transactions
Transactions within REST calls
Summary
Performance Tuning
Caching
General Optimizations
The JVM optimization
Memory and cache
Mapping files
Connections
Transactions
Massive insertions
Datafile fragmentation
The profiler
Query tips
The explain command
Indexes
Looking for @rid values
Summary
Advanced Features
Embedded mode
Server-side code
Server-side function features
Creating a function
Usage
Java API
RESTful calls
Special variables
Hooks
Triggers
Gremlin support
Gephi
Clustering
How it works
Replication
Configuration and setup
Sending e-mails through OrientDB
Usage
Summary
Index
Symbols
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
S
T
U
W
Thank you for buying
About Packt Open Source
Writing for Packt
Microsoft SQL Server 2012 Integration Services:
Java Persistence with MyBatis 3
Microsoft SQL Server 2012 Security Cookbook
Getting Started with NoSQL
Getting Started with OrientDB A practical guide to learn, deploy, and customize OrientDB Claudio Tesoriero BIRMINGHAM - MUMBAI
Getting Started with OrientDB Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: August 2013 Production Reference: 2131113 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78216-995-6 www.packtpub.com Cover Image by Abhishek Pandey (abhishek.pandey1210@gmail.com)
Credits Author Claudio Tesoriero Reviewers Andrey Lomakin Artem Orobets Acquisition Editor Kunal Parikh Commissioning Editor Harsha Bharwani Technical Editors Krishnaveni Haridas Mrunmayee Patil Project Coordinator Deenar Satam Proofreaders Kelly Hutchinson Joanna McMahon Indexers Tejal Soni Priya Subramani Graphics Abhinash Sahu Production Coordinator Arvindkumar Gupta Cover Work Arvindkumar Gupta
About the Author Claudio Tesoriero is an OrientDB Certified Developer and a senior software engineer with 20 years of experience in Information Technology. He started his career with the Italian Ministry of the Treasury before moving on to work for the Bull Group (www.bull.com), where he got involved in projects developed for Telecom Italia (www.telecomitalia.it) and in R&D projects developed in collaboration with the Rome Tor Vergata University. He then worked for FutureSpace Spa (www.futurespace.it) and he participated in the implementation of various projects for the government administration at the time. Currently, he is the cofounder of BaasBox, a solution of Backend as a Service based on the Play! Framework and OrientDB. First and foremost, I would like to thank Packt Publishing and all the staff, especially Miss Harsha Bharwani and Mr. Siddhant Shetty, for giving me the opportunity to write about OrientDB, which I think is one of the most powerful NoSQL databases currently available. I would also like to thank Luca Garulli, CEO at Orient Technologies Ltd., for his great job on OrientDB and for the support and help he has given to me and other enthusiastic OrientDB fans, and of course for the great time we spent together during our dinners of pizza. I would like to also say a big thank you to my wife Micol and my children Beatrice and Elisa for their patience and support.
About the Reviewers Andrey Lomakin is working as a software architect in Return On Intelligence projects. He is an active committer of the OrientDB project, he is an author of composite and hash indexes. He has implemented several improvements in the SQL engine, mostly related to index usage. His main areas of expertise include high performance computing and modern approaches to the implementation of business logic in enterprise applications: EDA, CQRS, Qi4j, and so on. I want to thank two people who have always supported me in my work on the OrientDB project. They are my mother, and my best friend Marina Melnik. Without their support, many already implemented features would still be in the planning stage.
Artem Orobets is a committer of the OrientDB community. He has provided contributions such as the introduction of composite indexes, improvements in index creation and processing speed, and improvements in query language. He is currently working as a software engineer at Orient Technologies Ltd., where he designs and maintains OrientDB. I would like to thank my parents, grandparents, and family. This book is dedicated to the friends who have supported me through my many endeavors, to those who have contributed to OrientDB, and also to those who have developed such an amazing project.
www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. comand as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? Fully searchable across every book published by Packt • • Copy and paste, print and bookmark content • On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
分享到:
收藏